diff --git a/.config/i3/config b/.config/i3/config index fadcfd3..84a6503 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -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 -option 'grp:alt_shift_toggle' # 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 # 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 # keybinding list in editor: # 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 # 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 XF86AudioNext exec --no-startup-id playerctl next bindsym XF86AudioPrev exec --no-startup-id playerctl previous @@ -339,19 +339,29 @@ assign [class="alacritty"] $ws1 assign [class="(?i)firefox"] $ws2 assign [class="Thunar"] $ws3 assign [class="thunderbird"] $ws4 +assign [class="Spotify"] $ws4 assign [class="TelegramDesktop"] $ws5 assign [class="discord"] $ws5 +assign [class="Element"] $ws5 assign [class="code"] $ws6 # automatic set focus new window if it opens on another workspace than the current: for_window [class=alacritty] focus for_window [class=(?i)firefox] 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=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 # ############## @@ -447,10 +457,13 @@ exec --no-startup-id /usr/bin/dunst #exec_always --no-startup-id autotiling # Autostart apps as you like -exec --no-startup-id sleep 1 && alacritty -exec --no-startup-id sleep 1 && firefox -exec --no-startup-id sleep 1 && thunar -exec --no-startup-id sleep 1 && discord +exec --no-startup-id alacritty +exec --no-startup-id firefox +# exec --no-startup-id thunar +exec --no-startup-id discord +# exec --no-startup-id element-desktop +# exec --no-startup-id thunderbird +# exec --no-startup-id spotify ############### # system tray # @@ -504,12 +517,12 @@ set $darkbluetrans #08052be6 set $darkblue #08052b set $lightblue #5294e2 set $urgentred #e53935 -set $white #ffffff -set $black #000000 -set $purple #e345ff -set $darkgrey #383c4a -set $grey #b0b5bd -set $mediumgrey #8b8b8b +set $white #ffffff +set $black #000000 +set $purple #e345ff +set $darkgrey #383c4a +set $grey #b0b5bd +set $mediumgrey #8b8b8b set $yellowbrown #e1b700 # define colors for windows: @@ -526,27 +539,28 @@ client.urgent $urgentred $urgentred $white $yellowbrown $yellowbrown # Start i3bar to display a workspace bar # (plus the system information i3status finds out, if available) bar { - font pango: Noto Sans Regular 10 - status_command i3blocks -c ~/.config/i3/i3blocks.conf - position bottom -# i3bar_command i3bar --transparency -# it could be that you have no primary display set: set one (xrandr --output --primary) -# reference: https://i3wm.org/docs/userguide.html#_tray_output - #tray_output primary - tray_padding 0 + font pango: Noto Sans Regular 10 + status_command i3blocks -c ~/.config/i3/i3blocks.conf + position bottom + # i3bar_command i3bar --transparency + + # it could be that you have no primary display set: set one (xrandr --output --primary) + # reference: https://i3wm.org/docs/userguide.html#_tray_output + #tray_output primary + tray_padding 0 -# When strip_workspace_numbers is set to yes, -# any workspace that has a name of the form -# “[n][:][NAME]” will display only the name. -strip_workspace_numbers yes -##strip_workspace_name no + # When strip_workspace_numbers is set to yes, + # any workspace that has a name of the form + # “[n][:][NAME]” will display only the name. + strip_workspace_numbers yes + ##strip_workspace_name no - colors { - separator $purple - background $darkgrey - statusline $white -# border bg txt indicator - focused_workspace $mediumgrey $grey $darkgrey $purple + colors { + separator $purple + background $darkgrey + statusline $white + # border bg txt indicator + focused_workspace $mediumgrey $grey $darkgrey $purple active_workspace $lightblue $mediumgrey $darkgrey $purple inactive_workspace $darkgrey $darkgrey $grey $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 #bindsym $mod+c exec --no-startup-id rofi -modi "clipboard:greenclip print" -show clipboard \ -# -config ~/.config/rofi/rofidmenu.rasi +# -config ~/.config/rofi/rofidmenu.rasi diff --git a/.config/i3/i3blocks.conf b/.config/i3/i3blocks.conf index 07666a3..f159479 100644 --- a/.config/i3/i3blocks.conf +++ b/.config/i3/i3blocks.conf @@ -62,17 +62,19 @@ full_text=  color=#7f3fbf command=i3-msg -q exec thunar ~/ - - -#[mail] -#full_text=  -#color=#dbcb75 -#command=i3-msg -q exec thunderbird +[mail] +full_text=  +color=#dbcb75 +command=i3-msg -q exec thunderbird [simple-2] full_text=: : color=#717171 +[xomf] +interval=60 +command=/home/mcorange/@Projects/personal/tsl/target/release/tsl xomf + # Disk usage # # The directory defaults to $HOME if the instance is not specified. @@ -82,6 +84,7 @@ color=#717171 label= instance=/ command=~/.config/i3/scripts/disk +# command=~/@Projects/personal/tsl/target/release/tsl xomf interval=30 # Memory usage @@ -109,10 +112,11 @@ interval=30 # can be used also for GPU temperature or other temperature sensors lm-sensors detects. # showing name of connected network (enable for wifi use) -#[net] -#label= -#command=echo "$(LANG=C nmcli d | grep connected | awk '{print $4}')" -#interval=30 +[net] +label= +command=echo "$(LANG=C nmcli d | grep -P 'wifi[\s]+connected' | awk '{print $4}')" +# command=echo "$(LANG=C nmcli d | grep connected | awk '{print $4}')" +interval=30 [bandwidth] command=~/.config/i3/scripts/bandwidth2 diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 76e75d4..4bdce2a 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -9,6 +9,8 @@ "hydra.nvim": { "branch": "master", "commit": "55de54543d673824435930ecf533256eea2e565b" }, "kanagawa.nvim": { "branch": "master", "commit": "c19b9023842697ec92caf72cd3599f7dd7be4456" }, "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" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "0989bdf4fdf7b5aa4c74131d7ffccc3f399ac788" }, "mason.nvim": { "branch": "main", "commit": "e110bc3be1a7309617cecd77bfe4bf86ba1b8134" }, @@ -17,5 +19,6 @@ "nvim-lspconfig": { "branch": "master", "commit": "e47ccfae775f0d572ef0f3a7d245f043b259dafc" }, "nvim-tree.lua": { "branch": "master", "commit": "b8c3a23e76f861d5f0ff3f6714b9b56388984d0b" }, "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" } } \ No newline at end of file diff --git a/.config/nvim/lua/plugins/lazygit.lua b/.config/nvim/lua/plugins/lazygit.lua new file mode 100644 index 0000000..c5be984 --- /dev/null +++ b/.config/nvim/lua/plugins/lazygit.lua @@ -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 = { + { "lg", "LazyGit", desc = "LazyGit" } + } +} diff --git a/.config/nvim/lua/plugins/lua-zero.lua b/.config/nvim/lua/plugins/lua-zero.lua index 2d286c3..e4c1b2f 100644 --- a/.config/nvim/lua/plugins/lua-zero.lua +++ b/.config/nvim/lua/plugins/lua-zero.lua @@ -6,6 +6,7 @@ return { {'neovim/nvim-lspconfig'}, -- Required {'williamboman/mason.nvim'}, -- Optional {'williamboman/mason-lspconfig.nvim'}, -- Optional + {'lvimuser/lsp-inlayhints.nvim'}, -- Autocompletion {'hrsh7th/nvim-cmp'}, -- Required @@ -21,18 +22,29 @@ return { }, init = function() local lsp_zero = require('lsp-zero') + local ih = require('lsp-inlayhints') + ih.setup() lsp_zero.on_attach(function(client, bufnr) - -- see :help lsp-zero-keybindings - -- to learn the available actions - lsp_zero.default_keymaps({buffer = bufnr}) + -- see :help lsp-zero-keybindings + -- to learn the available actions + lsp_zero.default_keymaps({buffer = bufnr}) + -- ih.on_attach(client, bufnr) end) require('mason').setup({}) require('mason-lspconfig').setup({ - ensure_installed = {}, - handlers = { - lsp_zero.default_setup, - }, + ensure_installed = {}, + handlers = { + 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 }; diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua index b110f00..1b3fe27 100644 --- a/.config/nvim/lua/plugins/treesitter.lua +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -13,7 +13,7 @@ return { }, -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, + sync_install = true, -- Automatically install missing parsers when entering buffer -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally @@ -35,7 +35,7 @@ return { disable = { }, -- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files 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)) if ok and stats and stats.size > max_filesize then return true @@ -46,7 +46,7 @@ return { -- 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. -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, + additional_vim_regex_highlighting = true, }, } end diff --git a/.config/nvim/syntax/mclang.vim b/.config/nvim/syntax/mclang.vim new file mode 100644 index 0000000..894b8b5 --- /dev/null +++ b/.config/nvim/syntax/mclang.vim @@ -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 + + + diff --git a/.config/nvim/syntax/test.mcl b/.config/nvim/syntax/test.mcl new file mode 100644 index 0000000..a7131f2 --- /dev/null +++ b/.config/nvim/syntax/test.mcl @@ -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 diff --git a/.gitconfig b/.gitconfig index db6851f..e2fa83b 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,7 +1,17 @@ [user] name = MCorange99 - email = gvidasjuknevicius2@gmail.com + email = mcorange@mcorangehq.xyz + signingkey = AFCD0DBD8A3B07EB821AB5EC5BE6B533CB76FE86 [init] defaultBranch = main [pull] rebase = false +[core] + editor = nvim +[safe] + directory = /opt/gf +[push] + autoSetupRemote = true + default = current +[commit] + gpgsign = true diff --git a/.zshrc b/.zshrc index 72cc45f..ce31a6e 100644 --- a/.zshrc +++ b/.zshrc @@ -25,7 +25,17 @@ fi # Aliases alias vim="nvim" 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 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" diff --git a/copy.sh b/copy.sh new file mode 100755 index 0000000..0ef49f1 --- /dev/null +++ b/copy.sh @@ -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"