New configs

This commit is contained in:
Gvidas Juknevičius 2024-05-18 23:46:28 +03:00
parent 7f13ec22ea
commit 5a3ae61e8b
Signed by: MCorange
GPG Key ID: 12B1346D720B7FBB
11 changed files with 235 additions and 58 deletions

View File

@ -20,8 +20,8 @@
####################### #######################
exec --no-startup-id setxkbmap -option 'grp:alt_shift_toggle'
exec --no-startup-id setxkbmap -layout us,lt exec --no-startup-id setxkbmap -layout us,lt
exec --no-startup-id setxkbmap -option 'grp:alt_shift_toggle'
# Font for window titles. Will also be used by the bar unless a different font # Font for window titles. Will also be used by the bar unless a different font
@ -198,7 +198,7 @@ bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart bindsym $mod+Shift+r restart
# keybinding in fancy rofi (automated): # keybinding in fancy rofi (automated):
bindsym F1 exec --no-startup-id ~/.config/i3/scripts/keyhint-2 bindsym $mod+Shift+d exec --no-startup-id ~/.config/i3/scripts/keyhint-2
# alternative # alternative
# keybinding list in editor: # keybinding list in editor:
# bindsym $mod+F1 exec --no-startup-id xed ~/.config/i3/keybindings # bindsym $mod+F1 exec --no-startup-id xed ~/.config/i3/keybindings
@ -290,7 +290,7 @@ bindsym XF86AudioMute exec --no-startup-id ~/.config/i3/scripts/volume_brightnes
bindsym XF86AudioMicMute exec amixer sset Capture toggle bindsym XF86AudioMicMute exec amixer sset Capture toggle
# audio control # audio control
bindsym XF86AudioPlay exec --no-startup-id playerctl play bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
bindsym XF86AudioPause exec --no-startup-id playerctl pause bindsym XF86AudioPause exec --no-startup-id playerctl pause
bindsym XF86AudioNext exec --no-startup-id playerctl next bindsym XF86AudioNext exec --no-startup-id playerctl next
bindsym XF86AudioPrev exec --no-startup-id playerctl previous bindsym XF86AudioPrev exec --no-startup-id playerctl previous
@ -339,19 +339,29 @@ assign [class="alacritty"] $ws1
assign [class="(?i)firefox"] $ws2 assign [class="(?i)firefox"] $ws2
assign [class="Thunar"] $ws3 assign [class="Thunar"] $ws3
assign [class="thunderbird"] $ws4 assign [class="thunderbird"] $ws4
assign [class="Spotify"] $ws4
assign [class="TelegramDesktop"] $ws5 assign [class="TelegramDesktop"] $ws5
assign [class="discord"] $ws5 assign [class="discord"] $ws5
assign [class="Element"] $ws5
assign [class="code"] $ws6 assign [class="code"] $ws6
# automatic set focus new window if it opens on another workspace than the current: # automatic set focus new window if it opens on another workspace than the current:
for_window [class=alacritty] focus for_window [class=alacritty] focus
for_window [class=(?i)firefox] focus for_window [class=(?i)firefox] focus
for_window [class=Thunar] focus for_window [class=Thunar] focus
for_window [class=Thunderbird] focus
for_window [class=TelegramDesktop] focus
for_window [class=discord] focus
for_window [class=code] focus for_window [class=code] focus
#for_window [class=TelegramDesktop] focus
#for_window [class=discord] focus
#for_window [class=element-desktop] focus
for_window [class=spotify] layout tabbed
for_window [class=thunderbird] layout tabbed
for_window [class=TelegramDesktop] layout tabbed
for_window [class=discord] layout tabbed
for_window [class=Element] layout tabbed
############## ##############
# compositor # # compositor #
############## ##############
@ -447,10 +457,13 @@ exec --no-startup-id /usr/bin/dunst
#exec_always --no-startup-id autotiling #exec_always --no-startup-id autotiling
# Autostart apps as you like # Autostart apps as you like
exec --no-startup-id sleep 1 && alacritty exec --no-startup-id alacritty
exec --no-startup-id sleep 1 && firefox exec --no-startup-id firefox
exec --no-startup-id sleep 1 && thunar # exec --no-startup-id thunar
exec --no-startup-id sleep 1 && discord exec --no-startup-id discord
# exec --no-startup-id element-desktop
# exec --no-startup-id thunderbird
# exec --no-startup-id spotify
############### ###############
# system tray # # system tray #
@ -504,12 +517,12 @@ set $darkbluetrans #08052be6
set $darkblue #08052b set $darkblue #08052b
set $lightblue #5294e2 set $lightblue #5294e2
set $urgentred #e53935 set $urgentred #e53935
set $white #ffffff set $white #ffffff
set $black #000000 set $black #000000
set $purple #e345ff set $purple #e345ff
set $darkgrey #383c4a set $darkgrey #383c4a
set $grey #b0b5bd set $grey #b0b5bd
set $mediumgrey #8b8b8b set $mediumgrey #8b8b8b
set $yellowbrown #e1b700 set $yellowbrown #e1b700
# define colors for windows: # define colors for windows:
@ -526,27 +539,28 @@ client.urgent $urgentred $urgentred $white $yellowbrown $yellowbrown
# Start i3bar to display a workspace bar # Start i3bar to display a workspace bar
# (plus the system information i3status finds out, if available) # (plus the system information i3status finds out, if available)
bar { bar {
font pango: Noto Sans Regular 10 font pango: Noto Sans Regular 10
status_command i3blocks -c ~/.config/i3/i3blocks.conf status_command i3blocks -c ~/.config/i3/i3blocks.conf
position bottom position bottom
# i3bar_command i3bar --transparency # i3bar_command i3bar --transparency
# it could be that you have no primary display set: set one (xrandr --output <output> --primary)
# reference: https://i3wm.org/docs/userguide.html#_tray_output # it could be that you have no primary display set: set one (xrandr --output <output> --primary)
#tray_output primary # reference: https://i3wm.org/docs/userguide.html#_tray_output
tray_padding 0 #tray_output primary
tray_padding 0
# When strip_workspace_numbers is set to yes, # When strip_workspace_numbers is set to yes,
# any workspace that has a name of the form # any workspace that has a name of the form
# “[n][:][NAME]” will display only the name. # “[n][:][NAME]” will display only the name.
strip_workspace_numbers yes strip_workspace_numbers yes
##strip_workspace_name no ##strip_workspace_name no
colors { colors {
separator $purple separator $purple
background $darkgrey background $darkgrey
statusline $white statusline $white
# border bg txt indicator # border bg txt indicator
focused_workspace $mediumgrey $grey $darkgrey $purple focused_workspace $mediumgrey $grey $darkgrey $purple
active_workspace $lightblue $mediumgrey $darkgrey $purple active_workspace $lightblue $mediumgrey $darkgrey $purple
inactive_workspace $darkgrey $darkgrey $grey $purple inactive_workspace $darkgrey $darkgrey $grey $purple
urgent_workspace $urgentred $urgentred $white $purple urgent_workspace $urgentred $urgentred $white $purple
@ -608,4 +622,4 @@ bindsym $mod+t exec --no-startup-id rofi -show window \
#exec --no-startup-id greenclip daemon>/dev/null #exec --no-startup-id greenclip daemon>/dev/null
#bindsym $mod+c exec --no-startup-id rofi -modi "clipboard:greenclip print" -show clipboard \ #bindsym $mod+c exec --no-startup-id rofi -modi "clipboard:greenclip print" -show clipboard \
# -config ~/.config/rofi/rofidmenu.rasi # -config ~/.config/rofi/rofidmenu.rasi

View File

@ -62,17 +62,19 @@ full_text= 
color=#7f3fbf color=#7f3fbf
command=i3-msg -q exec thunar ~/ command=i3-msg -q exec thunar ~/
[mail]
full_text= 
#[mail] color=#dbcb75
#full_text=  command=i3-msg -q exec thunderbird
#color=#dbcb75
#command=i3-msg -q exec thunderbird
[simple-2] [simple-2]
full_text=: : full_text=: :
color=#717171 color=#717171
[xomf]
interval=60
command=/home/mcorange/@Projects/personal/tsl/target/release/tsl xomf
# Disk usage # Disk usage
# #
# The directory defaults to $HOME if the instance is not specified. # The directory defaults to $HOME if the instance is not specified.
@ -82,6 +84,7 @@ color=#717171
label= label=
instance=/ instance=/
command=~/.config/i3/scripts/disk command=~/.config/i3/scripts/disk
# command=~/@Projects/personal/tsl/target/release/tsl xomf
interval=30 interval=30
# Memory usage # Memory usage
@ -109,10 +112,11 @@ interval=30
# can be used also for GPU temperature or other temperature sensors lm-sensors detects. # can be used also for GPU temperature or other temperature sensors lm-sensors detects.
# showing name of connected network (enable for wifi use) # showing name of connected network (enable for wifi use)
#[net] [net]
#label= label=
#command=echo "$(LANG=C nmcli d | grep connected | awk '{print $4}')" command=echo "$(LANG=C nmcli d | grep -P 'wifi[\s]+connected' | awk '{print $4}')"
#interval=30 # command=echo "$(LANG=C nmcli d | grep connected | awk '{print $4}')"
interval=30
[bandwidth] [bandwidth]
command=~/.config/i3/scripts/bandwidth2 command=~/.config/i3/scripts/bandwidth2

View File

@ -9,6 +9,8 @@
"hydra.nvim": { "branch": "master", "commit": "55de54543d673824435930ecf533256eea2e565b" }, "hydra.nvim": { "branch": "master", "commit": "55de54543d673824435930ecf533256eea2e565b" },
"kanagawa.nvim": { "branch": "master", "commit": "c19b9023842697ec92caf72cd3599f7dd7be4456" }, "kanagawa.nvim": { "branch": "master", "commit": "c19b9023842697ec92caf72cd3599f7dd7be4456" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lazygit.nvim": { "branch": "main", "commit": "ad3e1ea592f9d13e86e0d4e850224d9d78069508" },
"lsp-inlayhints.nvim": { "branch": "main", "commit": "d981f65c9ae0b6062176f0accb9c151daeda6f16" },
"lsp-zero.nvim": { "branch": "v1.x", "commit": "aa36afcf7a59fbd98008c9a434593c423d3d649a" }, "lsp-zero.nvim": { "branch": "v1.x", "commit": "aa36afcf7a59fbd98008c9a434593c423d3d649a" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "0989bdf4fdf7b5aa4c74131d7ffccc3f399ac788" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "0989bdf4fdf7b5aa4c74131d7ffccc3f399ac788" },
"mason.nvim": { "branch": "main", "commit": "e110bc3be1a7309617cecd77bfe4bf86ba1b8134" }, "mason.nvim": { "branch": "main", "commit": "e110bc3be1a7309617cecd77bfe4bf86ba1b8134" },
@ -17,5 +19,6 @@
"nvim-lspconfig": { "branch": "master", "commit": "e47ccfae775f0d572ef0f3a7d245f043b259dafc" }, "nvim-lspconfig": { "branch": "master", "commit": "e47ccfae775f0d572ef0f3a7d245f043b259dafc" },
"nvim-tree.lua": { "branch": "master", "commit": "b8c3a23e76f861d5f0ff3f6714b9b56388984d0b" }, "nvim-tree.lua": { "branch": "master", "commit": "b8c3a23e76f861d5f0ff3f6714b9b56388984d0b" },
"nvim-treesitter": { "branch": "master", "commit": "8cd2b230174efbf7b5d9f49fe2f90bda6b5eb16e" }, "nvim-treesitter": { "branch": "master", "commit": "8cd2b230174efbf7b5d9f49fe2f90bda6b5eb16e" },
"nvim-web-devicons": { "branch": "master", "commit": "db0c864375c198cacc171ff373e76bfce2a85045" } "nvim-web-devicons": { "branch": "master", "commit": "db0c864375c198cacc171ff373e76bfce2a85045" },
"plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" }
} }

View File

@ -0,0 +1,19 @@
return {
"kdheepak/lazygit.nvim",
cmd = {
"LazyGit",
"LazyGitConfig",
"LazyGitCurrentFile",
"LazyGitFilter",
"LazyGitFilterCurrentFile",
},
-- optional for floating window border decoration
dependencies = {
"nvim-lua/plenary.nvim",
},
-- setting the keybinding for LazyGit with 'keys' is recommended in
-- order to load the plugin when the command is run for the first time
keys = {
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" }
}
}

View File

@ -6,6 +6,7 @@ return {
{'neovim/nvim-lspconfig'}, -- Required {'neovim/nvim-lspconfig'}, -- Required
{'williamboman/mason.nvim'}, -- Optional {'williamboman/mason.nvim'}, -- Optional
{'williamboman/mason-lspconfig.nvim'}, -- Optional {'williamboman/mason-lspconfig.nvim'}, -- Optional
{'lvimuser/lsp-inlayhints.nvim'},
-- Autocompletion -- Autocompletion
{'hrsh7th/nvim-cmp'}, -- Required {'hrsh7th/nvim-cmp'}, -- Required
@ -21,18 +22,29 @@ return {
}, },
init = function() init = function()
local lsp_zero = require('lsp-zero') local lsp_zero = require('lsp-zero')
local ih = require('lsp-inlayhints')
ih.setup()
lsp_zero.on_attach(function(client, bufnr) lsp_zero.on_attach(function(client, bufnr)
-- see :help lsp-zero-keybindings -- see :help lsp-zero-keybindings
-- to learn the available actions -- to learn the available actions
lsp_zero.default_keymaps({buffer = bufnr}) lsp_zero.default_keymaps({buffer = bufnr})
-- ih.on_attach(client, bufnr)
end) end)
require('mason').setup({}) require('mason').setup({})
require('mason-lspconfig').setup({ require('mason-lspconfig').setup({
ensure_installed = {}, ensure_installed = {},
handlers = { handlers = {
lsp_zero.default_setup, function(server_name)
}, require('lspconfig')[server_name].setup({
on_attach = function(client, bufnr)
ih.on_attach(client, bufnr)
end,
})
end,
},
}) })
-- require('lspconfig').clangd.setup({})
end end
}; };

View File

@ -13,7 +13,7 @@ return {
}, },
-- Install parsers synchronously (only applied to `ensure_installed`) -- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false, sync_install = true,
-- Automatically install missing parsers when entering buffer -- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
@ -35,7 +35,7 @@ return {
disable = { }, disable = { },
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files -- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
disable = function(lang, buf) disable = function(lang, buf)
local max_filesize = 100 * 1024 -- 100 KB local max_filesize = 1024 * 1024 * 1-- 1 MB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then if ok and stats and stats.size > max_filesize then
return true return true
@ -46,7 +46,7 @@ return {
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights. -- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages -- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false, additional_vim_regex_highlighting = true,
}, },
} }
end end

View File

@ -0,0 +1,38 @@
" Vim syntax file
" Language: MClang
" Maintainer: MCorange
" Maintainer: xomf
if exists("b:current_syntax")
finish
endif
syn keyword MCLangKeywords contained memory fn const in inline include assert with returns typedef structdef if else elif end done then while do
syn keyword MCLangInstructions contained divmod div mod _dbg_print eq lt gt le ge ne shr shl bor band not dup swap drop over rot syscall0 syscall1 syscall2 syscall3 syscall4 syscall5 syscall6
syn keyword MCLangTypes contained void u8 u16 u32 u64 ptr char
syn keyword MCLangBool contained true false
syn keyword MCLangConst contained NULL
" i8 i16 i32 i64 f32 f64
syn match MCLangComment '//.*'
syn match MCLangIdentifier '(?<=^|\\s)([a-z|A-Z|_|\\-][0-9|a-z|A-Z|_|\\-]+\\([a-z|A-Z|_|\\-][0-9|a-z|A-Z|_|\\-]+\\)|[a-z|A-Z|_|\\-][0-9|a-z|A-Z|_|\\-]+)(?:\\s|$)'
syn match MCLangNumber '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b(?!\\$)'
syn region MCLangString start='"' end='"' contained
syn region MCLangChar start='\'' end='\'' contained
let b:current_syntax = "MCLang"
hi def link MCLangComment Comment
hi def link MCLangTypes Type
hi def link MCLangString Constant
hi def link MCLangChar Character
hi def link MCLangNumber Constant
hi def link MCLangConst Constant
hi def link MCLangBool Boolean
hi def link MCLangInstructions Operator
hi def link MCLangKeywords Keyword
hi def link MCLangIdentifier Identifier

View File

@ -0,0 +1,49 @@
include "std.mcl"
structdef Uwu do
owo do u64 end
twt do u64 end
done
structdef Foo do
buz do u64 end
uwu do Uwu end
done
memory s_foo Foo end
//? Comments :3
// extern fn a with void returns void then done
// inline fn b with void returns void then done
// export fn c with void returns void then done
// fn putd with int returns void then drop done
fn main with void returns void then
s_foo.uwu.twt 69 write64
s_foo.uwu.twt read64 _dbg_print
// 1 2 add
// 69 _dbg_print
// "Hewo\n" puts
// if 3 4 eq do
// "omg what impossible!\n"
// else if 1 1 eq do
// "whaaaaaaaaa\n"
// else
// "finally, some good soup\n"
// done
// puts
// 10
// while dup 0 gt do
// "uwu " puts
// dup _dbg_print
// 1 sub
// done
done

View File

@ -1,7 +1,17 @@
[user] [user]
name = MCorange99 name = MCorange99
email = gvidasjuknevicius2@gmail.com email = mcorange@mcorangehq.xyz
signingkey = AFCD0DBD8A3B07EB821AB5EC5BE6B533CB76FE86
[init] [init]
defaultBranch = main defaultBranch = main
[pull] [pull]
rebase = false rebase = false
[core]
editor = nvim
[safe]
directory = /opt/gf
[push]
autoSetupRemote = true
default = current
[commit]
gpgsign = true

10
.zshrc
View File

@ -25,7 +25,17 @@ fi
# Aliases # Aliases
alias vim="nvim" alias vim="nvim"
alias yt-dlp="yt-dlp -o \"%(title)s.%(ext)s\"" alias yt-dlp="yt-dlp -o \"%(title)s.%(ext)s\""
alias gpg="gpg --allow-non-selfsigned-uid"
alias ysap="curl ysap.daveeddy.com"
# Aditional Paths # Aditional Paths
export PATH="$PATH:/usr/lib/ruby/gems/3.0.0/gems" export PATH="$PATH:/usr/lib/ruby/gems/3.0.0/gems"
# custom functions
function displayqr() {
qrencode -o - $1 | display -
}
# Created by `pipx` on 2024-04-13 08:08:20
export PATH="$PATH:/home/mcorange/.local/bin"

18
copy.sh Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/bash
set -e
PWD=`pwd`
function copy() {
echo "$HOME/$1 -> $PWD/$1"
mkdir -p `dirname $PWD/$1`
cp -r $HOME/$1 `dirname $PWD/$1`
}
copy ".config/i3"
copy ".config/nvim"
copy ".gitconfig"
copy ".zshrc"
copy ".postgresql.conf"
copy ".zshenv"