diff options
-rw-r--r-- | .gitignore | 13 | ||||
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | X11/xresources | 2 | ||||
-rw-r--r-- | doas.conf | 1 | ||||
-rw-r--r-- | gtk-2.0/gtkrc | 7 | ||||
-rw-r--r-- | gtk-3.0/settings.ini | 12 | ||||
-rw-r--r-- | hypr/hypridle.conf | 2 | ||||
-rw-r--r-- | hypr/hyprland.conf | 165 | ||||
-rwxr-xr-x | installers/vimplug_nvim.sh | 4 | ||||
-rw-r--r-- | kitty/kitty.conf | 6 | ||||
-rw-r--r-- | nvim/init.lua | 6 | ||||
-rw-r--r-- | nvim/init.vim | 306 | ||||
-rw-r--r-- | nvim/lua/colorscheme.lua | 8 | ||||
-rw-r--r-- | nvim/lua/keymaps.lua | 97 | ||||
-rw-r--r-- | nvim/lua/lsp.lua | 22 | ||||
-rw-r--r-- | nvim/lua/options.lua | 86 | ||||
-rw-r--r-- | nvim/lua/plugins.lua | 62 | ||||
-rw-r--r-- | nvim/lua/term.lua | 51 | ||||
-rw-r--r-- | nwg-bar/bar.json | 22 | ||||
-rw-r--r-- | nwg-bar/style.css | 35 | ||||
-rw-r--r-- | python/pythonrc | 48 | ||||
-rw-r--r-- | sh/aliases | 23 | ||||
-rw-r--r-- | sh/profile | 12 | ||||
-rw-r--r-- | tofi/colors | 12 | ||||
-rw-r--r-- | vim/vimrc | 15 | ||||
-rw-r--r-- | waybar/config | 31 | ||||
-rw-r--r-- | waybar/style.css | 29 | ||||
-rw-r--r-- | xsettingsd/xsettingsd.conf | 2 | ||||
-rw-r--r-- | yay/config.json | 6 | ||||
-rw-r--r-- | zsh/zshenv | 1 | ||||
-rw-r--r-- | zsh/zshrc | 23 |
31 files changed, 653 insertions, 468 deletions
@@ -1,3 +1,4 @@ +@companion-app/ 5DB5/ 5db5/ abook/ @@ -27,6 +28,7 @@ calibre/ calibre/conversion carla/ cava/ +CCL Cross-platform Framework/ cef_user_data .charles.config chromium/ @@ -52,6 +54,7 @@ Element/ emacs/ EmeraldWallet/ enchant/ +enigma/ Epic/ Etherdyne/ evolution/ @@ -111,6 +114,7 @@ kde.org/ keepassxc/ khal/ kicad/ +kid3rc Kitware/ kritadisplayrc kritarc @@ -121,6 +125,7 @@ lbry/ LBRY/ LBRY-GTK/ lbry-viewer/ +libaccounts-glib/ libfm/ libreoffice/ LibrePCB/ @@ -165,7 +170,7 @@ notmuch/ npm/ nssdb/ NuGet/ -nvim/plugged/ +nvim/lazy-lock.json nwg-look/ nwg-outputs/ obs-studio/ @@ -174,6 +179,7 @@ okularpartrc okularrc openrazer/ package-lock.json +parallel/ pavucontrol.ini pcmanfm/ pcmanfm-qt/ @@ -193,6 +199,7 @@ Portmaster/ PreSonus/ print-manager/ profanity/profrc +Proton/ Proton AG/ protonfixes/ protonmail/ @@ -238,6 +245,7 @@ SNAPSHOT PLAYER/ snownews/urls.opml solaar/ sonobus/ +spicy/ spotifyd/ spotify-tui/ straw-viewer/ @@ -263,6 +271,7 @@ transmission-daemon/ tremc/ Trolltech.conf .tsrc +tuxclocker.conf ubports-installer/ ultravnc-viewer/ UNDERTALE*/ @@ -280,6 +289,7 @@ waybar/config-Hyprland-* waybar/config-river-* weechat/ whoozle.github.io/ +wireshark/ xmonad/.stack-work xmonad/stack.yaml.lock xmonad/xmonad.hi @@ -299,4 +309,5 @@ zsh/hist zsh/.zcompdump zsh/zcompdump zsh/zfunc +zsh/.zkbd/ zsh/.zsh_theme @@ -1,12 +1,11 @@ VIM := $(shell command -v vim 2>/dev/null) -NVIM := $(shell command -v nvim 2>/dev/null) ZCONFS := zsh/zshenv zsh/zshrc SCONFS := sh/profile DCONFS := doas.conf all: -install: install-zshconfigs install-shconfigs vimplug-vim vimplug-nvim +install: install-zshconfigs install-shconfigs vimplug-vim install-zshconfigs: $(ZCONFS) @echo "Installing zsh conf files..." @@ -30,15 +29,6 @@ else @echo "vim not installed." endif -vimplug-nvim: installers/vimplug_nvim.sh -ifdef NVIM - @echo "Installing vim-plug for nvim..." - @$(shell installers/vimplug_nvim.sh) - @echo "Done." -else - @echo "nvim not installed." -endif - doas-conf: $(DCONFS) @echo "Installing doas config files..." @echo "doas.conf..." diff --git a/X11/xresources b/X11/xresources index d5c4550..7115b96 100644 --- a/X11/xresources +++ b/X11/xresources @@ -30,7 +30,7 @@ st.termname: st-256color st.shell: /usr/bin/tmux ! The following options options can be reloaded via USR1 signal. -!st.font: mononoki Nerd Font Mono:pixelsize=12:antialias=true:autohint=true; +!st.font: Fira Code Nerd Font Mono:pixelsize=12:antialias=true:autohint=true; !st.font2: Symbola:pixelsize=12:antialias=true:autohint=true; st.borderpx: 3 ! st alpha @@ -12,6 +12,7 @@ permit nopass :wheel cmd pacman permit nopass :wheel cmd cryptsetup permit nopass :wheel cmd systemctl permit setenv { EDITOR } :wheel cmd visudo args +permit setenv { EDITOR } :wheel cmd vidoas args permit setenv { EDITOR } :wheel cmd vimv permit nopass keepenv zachir as zachir diff --git a/gtk-2.0/gtkrc b/gtk-2.0/gtkrc index 8c1d035..628ed00 100644 --- a/gtk-2.0/gtkrc +++ b/gtk-2.0/gtkrc @@ -1,12 +1,13 @@ # DO NOT EDIT! This file will be overwritten by nwg-look. # Any customization should be done in ~/.gtkrc-2.0.mine instead. -gtk-theme-name="Flat-Remix-GTK-Green-Darkest" +include "/home/zachir/.gtkrc-2.0.mine" +gtk-theme-name="Flat-Remix-GTK-Green-Darkest-Solid" gtk-icon-theme-name="Cosmic" gtk-font-name="Cantarell 11" gtk-cursor-theme-name="BreezeX-Black" -gtk-cursor-theme-size=36 -gtk-toolbar-style=GTK_TOOLBAR_ICONS +gtk-cursor-theme-size=32 +gtk-toolbar-style=3 gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-button-images=0 gtk-menu-images=0 diff --git a/gtk-3.0/settings.ini b/gtk-3.0/settings.ini index 85d3ba5..28ef3a0 100644 --- a/gtk-3.0/settings.ini +++ b/gtk-3.0/settings.ini @@ -1,10 +1,10 @@ [Settings] -gtk-theme-name=Flat-Remix-GTK-Green-Darkest +gtk-theme-name=Flat-Remix-GTK-Green-Darkest-Solid gtk-icon-theme-name=Cosmic gtk-font-name=Cantarell 11 gtk-cursor-theme-name=BreezeX-Black gtk-cursor-theme-size=32 -gtk-toolbar-style=GTK_TOOLBAR_ICONS +gtk-toolbar-style=3 gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-button-images=0 gtk-menu-images=0 @@ -14,4 +14,10 @@ gtk-xft-antialias=1 gtk-xft-hinting=1 gtk-xft-hintstyle=hintslight gtk-xft-rgba=rgb -gtk-application-prefer-dark-theme=0 +gtk-application-prefer-dark-theme=1 +gtk-decoration-layout=icon:minimize,maximize,close +gtk-enable-animations=true +gtk-modules=colorreload-gtk-module +gtk-primary-button-warps-slider=true +gtk-sound-theme-name=ocean +gtk-xft-dpi=98304 diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf index f25f081..4d18296 100644 --- a/hypr/hypridle.conf +++ b/hypr/hypridle.conf @@ -6,7 +6,7 @@ general { listener { timeout = 150 # 2.5min. - on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor. + on-timeout = brightnessctl set 0 # set monitor backlight to minimum, avoid 0 on OLED monitor. on-resume = brightnessctl -r # monitor backlight restore. } diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 8412f87..b9eba3a 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -1,9 +1,8 @@ # See https://wiki.hyprland.org/Configuring/Monitors/ #{{{ Monitor config -monitor = eDP-1, 1920x1080@60, 0x0, 1 -monitor = , preferred, auto, 1 +monitor = DP-2, 1920x1080@75, 0x0, 1 monitor = HDMI-A-1, 1920x1080@75, 1920x0, 1 -monitor = DP-1, 1920x1080@60, 0x0, 1 +monitor = , preferred, auto, 1 #}}} # See https://wiki.hyprland.org/Configuring/Keywords/ for more @@ -19,10 +18,10 @@ exec-once = waybar exec-once = pypr exec-once = lxqt-policykit-agent exec-once = import-gsettings gtk-theme 'Flat-Remix-GTK-Green-Darkest-Solid' -exec-once = import-gsettings icon-theme 'Mint-X-Grey' +exec-once = import-gsettings icon-theme 'COSMIC' exec-once = import-gsettings cursor-theme 'BreezeX-Black' exec-once = xrdb -load "$XDG_CONFIG_HOME"/X11/xresources -#exec-once = com.github.wwmm.easyeffects +exec-once = com.github.wwmm.easyeffects #exec-once = systemctl --user start dunst #exec-once = systemctl --user start hypridle exec-once = dunst @@ -45,6 +44,7 @@ env = XCURSOR_SIZE,32 debug { enable_stdout_logs = false disable_logs = true + full_cm_proto = true } # }}} @@ -69,7 +69,13 @@ input { follow_mouse = 1 mouse_refocus = false touchpad { - natural_scroll = no + disable_while_typing = true + natural_scroll = false + tap_button_map = "lrm" + clickfinger_behavior = true + tap-to-click = true + drag_lock = false + tap-and-drag = true } float_switch_override_focus = 0 sensitivity = 0 # -1.0 - 1.0, 0 means no modification. @@ -102,9 +108,9 @@ misc { disable_splash_rendering = true enable_swallow = true swallow_regex = ^(kitty)$ - swallow_exception_regex = ^(.*ueberzug|n?vim .*|love .*)$ + swallow_exception_regex = ^(wev|.*ueberzug|n?vi?m? .*)$ vfr = true - vrr = 1 + vrr = 3 } #}}} @@ -161,8 +167,9 @@ master { special_scale_factor = 0.55 mfact = 0.55 # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more - new_status = inherit - new_on_top = true + new_status = slave + new_on_top = false + new_on_active = before #no_gaps_when_only = false orientation = left inherit_fullscreen = true @@ -181,6 +188,7 @@ gestures { plugin { hyprsplit { num_workspaces = 9 + persistent_workspaces = true } } #}}} @@ -189,13 +197,16 @@ plugin { # Example windowrule v1 # windowrule = float, ^(kitty)$ # Example windowrule v2 -# windowrulev2 = float, class:^(kitty)$, title:^(kitty)$ +# windowrule = float, class:^(kitty)$, title:^(kitty)$ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more windowrulev2 = float, class:^(lxqt-policykit-agent)$ windowrulev2 = tile, class:^(REAPER)$, title:^(REAPER v[0-9.]* - Registered to [A-Za-z ]* \(Licensed for personal/small business use\))$ windowrulev2 = tile, class:^(REAPER)$, title:^(reaper)$ windowrulev2 = tile, class:^(REAPER)$, title:^(Mixer)$ windowrulev2 = move onscreen cursor -50% -50%, title:^(menu)$ +windowrulev2 = move cursor,class:REAPER,floating:1 +windowrulev2 = nofocus,class:REAPER,title:^(menu)$ +windowrulev2 = nofocus,class:REAPER,title:^$ #}}} #{{{ Mods @@ -250,39 +261,75 @@ bind = $mainMod, N, exec, pypr toggle_special bind = $mainMod SHIFT, N, togglespecialworkspace, minimized #}}} -#{{{ Workspace binds (using split-monitor-workspaces plugin!) +#{{{ Workspace binds (using hyprsplit plugin!) +## Switch workspaces with mainMod + [0-9] +#bind = $mainMod, 1, split:workspace, 1 +#bind = $mainMod, 2, split:workspace, 2 +#bind = $mainMod, 3, split:workspace, 3 +#bind = $mainMod, 4, split:workspace, 4 +#bind = $mainMod, 5, split:workspace, 5 +#bind = $mainMod, 6, split:workspace, 6 +#bind = $mainMod, 7, split:workspace, 7 +#bind = $mainMod, 8, split:workspace, 8 +#bind = $mainMod, 9, split:workspace, 9 +## Move active window to a workspace with mainMod + SHIFT + [0-9] +#bind = $mainMod SHIFT, 1, split:movetoworkspacesilent, 1 +#bind = $mainMod SHIFT, 2, split:movetoworkspacesilent, 2 +#bind = $mainMod SHIFT, 3, split:movetoworkspacesilent, 3 +#bind = $mainMod SHIFT, 4, split:movetoworkspacesilent, 4 +#bind = $mainMod SHIFT, 5, split:movetoworkspacesilent, 5 +#bind = $mainMod SHIFT, 6, split:movetoworkspacesilent, 6 +#bind = $mainMod SHIFT, 7, split:movetoworkspacesilent, 7 +#bind = $mainMod SHIFT, 8, split:movetoworkspacesilent, 8 +#bind = $mainMod SHIFT, 9, split:movetoworkspacesilent, 9 +#bind = $mainMod CONTROL SHIFT, 1, split:movetoworkspace, 1 +#bind = $mainMod CONTROL SHIFT, 2, split:movetoworkspace, 2 +#bind = $mainMod CONTROL SHIFT, 3, split:movetoworkspace, 3 +#bind = $mainMod CONTROL SHIFT, 4, split:movetoworkspace, 4 +#bind = $mainMod CONTROL SHIFT, 5, split:movetoworkspace, 5 +#bind = $mainMod CONTROL SHIFT, 6, split:movetoworkspace, 6 +#bind = $mainMod CONTROL SHIFT, 7, split:movetoworkspace, 7 +#bind = $mainMod CONTROL SHIFT, 8, split:movetoworkspace, 8 +#bind = $mainMod CONTROL SHIFT, 9, split:movetoworkspace, 9 +##bind = $mainMod, mouse_down, split:workspace, e+1 +##bind = $mainMod, mouse_up, split:workspace, e-1 +#bind = $mainMod, G, split:grabroguewindows +#bind = $mainMod, comma, focusmonitor, -1 +#bind = $mainMod, period, focusmonitor, +1 +#bind = $mainMod SHIFT, comma, movewindow, mon:-1 +#bind = $mainMod SHIFT, period, movewindow, mon:+1 +#}}} + +#{{{ Workspace binds (not using hyprsplit plugin) # Switch workspaces with mainMod + [0-9] -bind = $mainMod, 1, split:workspace, 1 -bind = $mainMod, 2, split:workspace, 2 -bind = $mainMod, 3, split:workspace, 3 -bind = $mainMod, 4, split:workspace, 4 -bind = $mainMod, 5, split:workspace, 5 -bind = $mainMod, 6, split:workspace, 6 -bind = $mainMod, 7, split:workspace, 7 -bind = $mainMod, 8, split:workspace, 8 -bind = $mainMod, 9, split:workspace, 9 +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 # Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainMod SHIFT, 1, split:movetoworkspacesilent, 1 -bind = $mainMod SHIFT, 2, split:movetoworkspacesilent, 2 -bind = $mainMod SHIFT, 3, split:movetoworkspacesilent, 3 -bind = $mainMod SHIFT, 4, split:movetoworkspacesilent, 4 -bind = $mainMod SHIFT, 5, split:movetoworkspacesilent, 5 -bind = $mainMod SHIFT, 6, split:movetoworkspacesilent, 6 -bind = $mainMod SHIFT, 7, split:movetoworkspacesilent, 7 -bind = $mainMod SHIFT, 8, split:movetoworkspacesilent, 8 -bind = $mainMod SHIFT, 9, split:movetoworkspacesilent, 9 -bind = $mainMod CONTROL SHIFT, 1, split:movetoworkspace, 1 -bind = $mainMod CONTROL SHIFT, 2, split:movetoworkspace, 2 -bind = $mainMod CONTROL SHIFT, 3, split:movetoworkspace, 3 -bind = $mainMod CONTROL SHIFT, 4, split:movetoworkspace, 4 -bind = $mainMod CONTROL SHIFT, 5, split:movetoworkspace, 5 -bind = $mainMod CONTROL SHIFT, 6, split:movetoworkspace, 6 -bind = $mainMod CONTROL SHIFT, 7, split:movetoworkspace, 7 -bind = $mainMod CONTROL SHIFT, 8, split:movetoworkspace, 8 -bind = $mainMod CONTROL SHIFT, 9, split:movetoworkspace, 9 -#bind = $mainMod, mouse_down, split:workspace, e+1 -#bind = $mainMod, mouse_up, split:workspace, e-1 -bind = $mainMod, G, split:grabroguewindows +bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1 +bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2 +bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3 +bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4 +bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5 +bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6 +bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7 +bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8 +bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9 +bind = $mainMod CONTROL SHIFT, 1, movetoworkspace, 1 +bind = $mainMod CONTROL SHIFT, 2, movetoworkspace, 2 +bind = $mainMod CONTROL SHIFT, 3, movetoworkspace, 3 +bind = $mainMod CONTROL SHIFT, 4, movetoworkspace, 4 +bind = $mainMod CONTROL SHIFT, 5, movetoworkspace, 5 +bind = $mainMod CONTROL SHIFT, 6, movetoworkspace, 6 +bind = $mainMod CONTROL SHIFT, 7, movetoworkspace, 7 +bind = $mainMod CONTROL SHIFT, 8, movetoworkspace, 8 +bind = $mainMod CONTROL SHIFT, 9, movetoworkspace, 9 bind = $mainMod, comma, focusmonitor, -1 bind = $mainMod, period, focusmonitor, +1 bind = $mainMod SHIFT, comma, movewindow, mon:-1 @@ -335,75 +382,75 @@ bind = $mainMod, Comma, exec, acpi-notify.sh #{{{ Scratchpads bind = $mainMod CONTROL, Z, exec, pypr toggle sphtop -$sphtop = ^(sphtop)$ +$sphtop = class:^(sphtop)$ windowrule = float,$sphtop windowrule = workspace special:sphtop silent,$sphtop windowrule = size 50% 50%,$sphtop windowrule = move 25% 25%,$sphtop bind = $mainMod CONTROL, X, exec, pypr toggle spterm -$spterm = ^(spterm)$ +$spterm = class:^(spterm)$ windowrule = float,$spterm -windowrule = workspace special:spterm silent,$dropterm +windowrule = workspace special:spterm silent,$spterm windowrule = size 50% 50%,$spterm windowrule = move 25% 25%,$spterm bind = $mainMod CONTROL, C, exec, pypr toggle sppmxr -$sppmxr = ^(sppmxr)$ +$sppmxr = class:^(sppmxr)$ windowrule = float,$sppmxr windowrule = workspace special:sppmxr silent,$sppmxr windowrule = size 50% 50%,$sppmxr windowrule = move 25% 25%,$sppmxr bind = $mainMod CONTROL, V, exec, pypr toggle spblue -$spblue = ^(spblue)$ +$spblue = class:^(spblue)$ windowrule = float,$spblue windowrule = workspace special:spblue silent,$spblue windowrule = size 50% 50%,$spblue windowrule = move 25% 25%,$spblue bind = $mainMod CONTROL, B, exec, pypr toggle spncmp -$spncmp = ^(spncmp)$ +$spncmp = class:^(spncmp)$ windowrule = float,$spncmp windowrule = workspace special:spncmp silent,$spncmp windowrule = size 50% 50%,$spncmp windowrule = move 25% 25%,$spncmp bind = $mainMod CONTROL, A, exec, pypr toggle spmutt -$spmutt = ^(spmutt)$ +$spmutt = class:^(spmutt)$ windowrule = float,$spmutt windowrule = workspace special:spmutt silent,$spmutt windowrule = size 50% 50%,$spmutt windowrule = move 25% 25%,$spmutt bind = $mainMod CONTROL, S, exec, pypr toggle spprof -$spprof = ^(spprof)$ +$spprof = class:^(spprof)$ windowrule = float,$spprof windowrule = workspace special:spprof silent,$spprof windowrule = size 50% 50%,$spprof windowrule = move 25% 25%,$spprof bind = $mainMod CONTROL, D, exec, pypr toggle spirss -$spirss = ^(spirss)$ +$spirss = class:^(spirss)$ windowrule = float,$spirss windowrule = workspace special:spirss silent,$spirss windowrule = size 50% 50%,$spirss windowrule = move 25% 25%,$spirss bind = $mainMod CONTROL, F, exec, pypr toggle sptodo -$sptodo = ^(sptodo)$ +$sptodo = class:^(sptodo)$ windowrule = float,$sptodo windowrule = workspace special:sptodo silent,$sptodo windowrule = size 50% 50%,$sptodo windowrule = move 25% 25%,$sptodo bind = $mainMod CONTROL, G, exec, pypr toggle sptrmc -$sptrmc = ^(sptrmc)$ +$sptrmc = class:^(sptrmc)$ windowrule = float,$sptrmc windowrule = workspace special:sptrmc silent,$sptrmc windowrule = size 50% 50%,$sptrmc windowrule = move 25% 25%,$sptrmc bind = $mainMod CONTROL, Q, exec, pypr toggle qpwgraph -$spqpwg = ^(org\.rncbc\.qpwgraph)$ +$spqpwg = class:^(org\.rncbc\.qpwgraph)$ windowrule = float,$spqpwg windowrule = workspace special:spqpwg silent,$spqpwg windowrule = size 50% 50%,$spqpwg windowrule = move 25% 25%,$spqpwg bind = $mainMod CONTROL, E, togglespecialworkspace, speasy -$speasy = ^(com\.github\.wwmm\.easyeffects)$ +$speasy = class:^(com\.github\.wwmm\.easyeffects)$ windowrule = float,$speasy windowrule = workspace special:speasy silent,$speasy windowrule = size 50% 50%,$speasy @@ -441,9 +488,9 @@ bind = , XF86AudioNext, exec, playerctl next bind = , XF86AudioMute, exec, volsv -t #bindl = , XF86AudioMicMute, exec, volsv -m bind = , XF86AudioMicMute, exec, volsv -m -bindel = , XF86MonBrightnessUp, exec, bl -i -bindel = , XF86MonBrightnessDown, exec, bl -d -bindl = $mainMod, XF86MonBrightnessUp, exec, bl -I 1 -bindl = $mainMod, XF86MonBrightnessDown, exec, bl -D 1 +bindel = , XF86MonBrightnessUp, exec, bl -x -i +bindel = , XF86MonBrightnessDown, exec, bl -x -d +bindl = $mainMod, XF86MonBrightnessUp, exec, bl -x -I 1 +bindl = $mainMod, XF86MonBrightnessDown, exec, bl -x -D 1 bind = , Print, exec, scrshot #}}} diff --git a/installers/vimplug_nvim.sh b/installers/vimplug_nvim.sh deleted file mode 100755 index feddd03..0000000 --- a/installers/vimplug_nvim.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ - https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim diff --git a/kitty/kitty.conf b/kitty/kitty.conf index 095607b..59a7f5e 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -1151,7 +1151,7 @@ color8 #969896 #: black color1 #89231d -color9 #cc342b +color9 #ec0101 #: red @@ -1170,8 +1170,8 @@ color12 #3971ed #: blue -color5 #784e93 -color13 #a36ac7 +color5 #6e3c85 +color13 #8400c1 #: magenta diff --git a/nvim/init.lua b/nvim/init.lua new file mode 100644 index 0000000..4b295d5 --- /dev/null +++ b/nvim/init.lua @@ -0,0 +1,6 @@ +require('options') +require('keymaps') +require('lsp') +require('plugins') +require('colorscheme') +require('term') diff --git a/nvim/init.vim b/nvim/init.vim deleted file mode 100644 index 812bf3e..0000000 --- a/nvim/init.vim +++ /dev/null @@ -1,306 +0,0 @@ -set runtimepath^=$XDG_CONFIG_HOME/vim -set runtimepath+=$XDG_DATA_HOME/vim -set runtimepath+=$XDG_CONFIG_HOME/vim/after - -set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim -set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after - -let g:netrw_home = $XDG_DATA_HOME."/vim" -call mkdir($XDG_DATA_HOME."/vim/spell", 'p') - -set backupdir=$XDG_STATE_HOME/vim/backup | call mkdir(&backupdir, 'p') -set directory=$XDG_STATE_HOME/vim/swap | call mkdir(&directory, 'p') -set undodir=$XDG_STATE_HOME/vim/undo | call mkdir(&undodir, 'p') -set viewdir=$XDG_STATE_HOME/vim/view | call mkdir(&viewdir, 'p') - -if !has('nvim') | set viminfofile=$XDG_STATE_HOME/vim/viminfo | endif - -" vimplugs {{{ -call plug#begin('~/.config/nvim/plugged') -" colorschemes {{{ -Plug 'tomasiser/vim-code-dark' " codedark color scheme -Plug 'flazz/vim-colorschemes' " meta-color scheme package -Plug 'tomasiser/vim-code-dark' " codedark color scheme -Plug 'flazz/vim-colorschemes' " meta-color scheme package -Plug 'ZachIndigo/vim-preglow' " my old color scheme -" }}} -" language support {{{ -Plug 'axvr/org.vim' " basic org markup language implementation -Plug 'ziglang/zig.vim' " zig programming language -Plug 'jdonaldson/vaxe' " haxe programming language -Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' } " latex live preview support -Plug 'waycrate/swhkd-vim' " swhkd syntax highlighting -Plug 'HiPhish/guile.vim' " guile syntax highlighting -" }}} -" utility {{{ -Plug 'preservim/nerdtree' " directory tree interface -Plug 'Xuyuanp/nerdtree-git-plugin' " git status indicator for nerdtree -Plug 'PhilRunninger/nerdtree-visual-selection' " allows visual selection mode in nerdtree -Plug 'tpope/vim-fugitive' " git command interface -Plug 'junegunn/goyo.vim' " simplify the user interface (distraction-free) [BROKEN] -Plug 'junegunn/limelight.vim' " focus on single paragraph of text at a time -Plug 'vim-airline/vim-airline' " powerline the vim bottom bar -Plug 'nathanaelkane/vim-indent-guides' " indent guides for vim -Plug 'mhinz/vim-signify' " use signs to show diffs -Plug 'tpope/vim-endwise' " auto end functions/if statements -Plug 'tpope/vim-surround' " auto close stuff -Plug 'mattn/emmet-vim' " html css easy formating -Plug 'godlygeek/tabular' " Needed for vim-markdown -Plug 'plasticboy/vim-markdown' " Better markdown support -Plug 'ryanoasis/vim-devicons' " dev icons for nerdtree -" }}} -call plug#end() - -" }}} -" nvim options {{{ - -"" nvimrc: -"" General - -set showmatch " Highlight matching brace - -set number -set relativenumber - -colorscheme Dark2 - -set hlsearch " Highlight all search results -set smartcase " Enable smart-case search -set incsearch " Searches for strings incrementally - -set expandtab " Use spaces instead of tabs -set shiftwidth=2 " Number of auto-indent spaces -set smartindent " Enable smart-indent -set smarttab " Enable smart-tabs -set softtabstop=2 " Number of spaces per Tab - -"" Advanced -set ruler " Show row and column ruler information -set undolevels=1000 " Number of undo levels -set backspace=indent,eol,start " Backspace behaviour -filetype plugin indent on - -"" GUI Config -set guifont=mononoki\ Nerd\ Font\ Mono:h12 - -"hi Normal guibg=NONE ctermbg=NONE -"hi NonText guibg=NONE ctermbg=NONE -"set background=dark - -set foldmethod=marker - -set conceallevel=2 - -" set leader key - -let mapleader="'" - -" emmet {{{ -let g:user_emmet_leader_key='<C-a>' -" }}} - -" zig config {{{ -let g:zig_fmt_autosave = 1 -" }}} - -" latex live preview {{{ -let g:livepreview_previewer = 'zathura' -let g:livepreview_use_biber = 1 -let g:livepreview_cursorhold_recompile = 0 -" }}} - -" vim-markdown {{{ -let g:vim_markdown_folding_disabled = 1 -let g:vim_markdown_folding_level = 3 -let g:vim_markdown_toc_autofit = 1 -let g:vim_markdown_emphasis_multiline = 0 -let g:tex_conceal = "" -let g:vim_markdown_math = 1 -let g:vim_markdown_conceal_code_blocks = 1 -let g:vim_markdown_fenced_languages = ['c++=cpp', 'viml=vim', 'bash=sh', 'ini=dosini'] -let g:vim_markdown_follow_anchor = 1 -let g:vim_markdown_math = 1 -let g:vim_markdown_frontmatter = 1 -let g:vim_markdown_toml_frontmatter = 1 -let g:vim_markdown_strikethrough = 1 -let g:vim_markdown_no_extensions_in_markdown = 1 -let g:vim_markdown_autowrite = 1 -let g:vim_markdown_auto_insert_bullets = 0 -let g:vim_markdown_new_list_item_indent = 0 -let g:vim_markdown_edit_url_in = 'tab' -" }}} - -" NERDTree config {{{ -let g:NERDTreeGitStatusUseNerdFonts = 1 " use nerd fonts -let g:NERDTreeGitStatusShowClean = 1 " default: 0 -let g:NERDTreeDirArrowExpandable = '>' -let g:NERDTreeDirArrowCollapsible = '<' -let g:NERDTreeMapToggleHidden = 'z' -" }}} - -" Goyo config {{{ -let g:goyo_width = '90%' -let g:goyo_height = '100%' -" }}} - -" limelight config {{{ -let g:limelight_conceal_ctermfg = 'gray' -let g:limelight_conceal_guifg = 'gray' -" }}} - -" devicon config {{{ -let g:airline_powerline_fonts = 1 -let g:webdevicons_enable_nerdtree = 1 -" }}} - -" vim-indent-guides config {{{ -let g:indent_guides_enable_on_vim_startup = 0 -" }}} - -" vim-signify config {{{ -set updatetime=100 -" }}} - -" }}} -" Functions {{{ -" Goyo functions {{{ -function! s:goyo_enter() - if executable('tmux') && strlen($TMUX) - silent !tmux set status off - silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z - endif - set noshowmode - set noshowcmd - set scrolloff=999 - Limelight - NERDTreeClose -endfunction -function! s:goyo_leave() - if executable('tmux') && strlen('$TMUX') - silent !tmux set status on - silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z - endif - set showmode - set showcmd - set scrolloff=5 - Limelight! - NERDTree -endfunction -" }}} -" }}} -" Autocommands {{{ -" Goyo autocommands {{{ -autocmd! User GoyoEnter nested call <SID>goyo_enter() -autocmd! User GoyoLeave nested call <SID>goyo_leave() -" }}} -" NERDTree autocmds {{{ -autocmd StdinReadPre * let s:std_in=1 -autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | wincmd p | endif -autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') | - \ execute 'NERDTree' argv()[0] | wincmd p | enew | execute 'cd '.argv()[0] | endif -autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif -autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif -"autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 | - "\ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer;.buf | endif -autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif -" }}} -" custom augroup {{{ -augroup custom - autocmd! - "au BufEnter *.tex :LLPStartPreview - au BufEnter *.md :set textwidth=80 - au BufEnter *.ms :set textwidth=80 - "au BufEnter *.c :colo DevC++ - "au BufEnter *.h :colo DevC++ - "au BufEnter *.cc :colo DevC++ - "au BufEnter *.hh :colo DevC++ - "au BufEnter *.cpp :colo DevC++ - "au BufEnter *.hpp :colo DevC++ - au BufWritePost init.vim :source % - "au BufWritePost *.tex :make - au BufWritePost *sxhkdrc* :!pkill -USR1 -x sxhkd - au BufWritePost .Xresources :!xrdb ~/.Xresources - au BufWritePost .gitignore :!git add .gitignore -augroup end -" }}} -" }}} -" keybindings {{{ - -" direction keys - -inoremap <Down> <C-o>gj -inoremap <Up> <C-o>gk -inoremap <Home> <C-o>g<Home> -inoremap <End> <C-o>g<End> -vnoremap <Down> <C-o>gj -vnoremap <Up> <C-o>gk -vnoremap <Home> <C-o>g<Home> -vnoremap <End> <C-o>g<End> -nnoremap <Down> gj -nnoremap <Up> gk - -" clear search highlights -nnoremap <leader>/ :noh<CR> - -" toggles -nnoremap <leader>tn :set number!<CR> -nnoremap <leader>tr :set relativenumber!<CR> -nnoremap <leader>tt :NERDTreeToggle<CR> - -" tabs -nnoremap <leader>th :tabprevious<CR> -nnoremap <leader>tl :tabnext<CR> -nnoremap <leader>tk :tabnew<CR> -nnoremap <leader>tj :tabclose<CR> - -" splits -nnoremap <leader>wh :vertical resize -1<CR> -nnoremap <leader>wj :resize -1<CR> -nnoremap <leader>wk :resize +1<CR> -nnoremap <leader>wl :vertical resize +1<CR> - -" config -nnoremap <leader>en :e ~/.config/nvim/init.vim<CR> -nnoremap <leader>ec :source %<CR> - -" write as root -nnoremap ZW :w !pkexec tee % >/dev/null - -" Goyo -nnoremap <leader>G :Goyo<CR> - -" windows -nnoremap <C-h> <C-w>h -nnoremap <C-j> <C-w>j -nnoremap <C-k> <C-w>k -nnoremap <C-l> <C-w>l -vnoremap <C-h> <C-w>h -vnoremap <C-j> <C-w>j -vnoremap <C-k> <C-w>k -vnoremap <C-l> <C-w>l - -" files -" these may go away soon -nnoremap <leader>xx :q<CR> -nnoremap <leader>x! :q!<CR> -" these are the new standard -nnoremap <leader>qq :q<CR> -nnoremap <leader>q! :q!<CR> -nnoremap <leader>wq :wq<CR> -nnoremap <leader>ww :w<CR> -nnoremap <leader>ee :e - -" escape for term windows -tnoremap <Esc> <C-\><C-n> - -" vim-plug -nnoremap <leader>pi :PlugInstall<CR> -nnoremap <leader>pu :PlugUpdate<CR> -nnoremap <leader>pU :PlugUpgrade<CR> -nnoremap <leader>pc :PlugClean<CR> - -" fugitive -nnoremap <leader>gp :G pull<CR> -nnoremap <leader>gd :G diff %<CR> - -" }}} diff --git a/nvim/lua/colorscheme.lua b/nvim/lua/colorscheme.lua new file mode 100644 index 0000000..66516fa --- /dev/null +++ b/nvim/lua/colorscheme.lua @@ -0,0 +1,8 @@ +-- define your colorscheme here +local colorscheme = 'badwolf' + +local is_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) +if not is_ok then + vim.notify('colorscheme ' .. colorscheme .. ' not found!') + return +end diff --git a/nvim/lua/keymaps.lua b/nvim/lua/keymaps.lua new file mode 100644 index 0000000..4f4a489 --- /dev/null +++ b/nvim/lua/keymaps.lua @@ -0,0 +1,97 @@ +-- define common options +local opts = { + noremap = true, -- non-recursive + silent = true, -- do not show message +} + +-- set leader key +vim.g.mapleader = "'" + +----------------- +-- Normal mode -- +----------------- + +-- Hint: see `:h vim.map.set()` +-- Better window navigation +vim.keymap.set('n', '<C-h>', '<C-w>h', opts) +vim.keymap.set('n', '<C-j>', '<C-w>j', opts) +vim.keymap.set('n', '<C-k>', '<C-w>k', opts) +vim.keymap.set('n', '<C-l>', '<C-w>l', opts) + +-- Resize with arrows +vim.keymap.set('n', '<C-Up>', ':resize -2<CR>', opts) +vim.keymap.set('n', '<C-Down>', ':resize +2<CR>', opts) +vim.keymap.set('n', '<C-Left>', ':vertical resize -2<CR>', opts) +vim.keymap.set('n', '<C-Right>', ':vertical resize +2<CR>', opts) +vim.keymap.set('n', '<leader>wh :vertical resize', '-1<CR>') +vim.keymap.set('n', '<leader>wj :resize', '-1<CR>') +vim.keymap.set('n', '<leader>wk :resize', '+1<CR>') +vim.keymap.set('n', '<leader>wl :vertical resize', '+1<CR>') + +-- NerdTREE +vim.keymap.set('n', '<leader>tt', ':NERDTreeToggle<CR>') + +-- files +-- these may go away soon +vim.keymap.set('n', '<leader>xx', ':q<CR>') +vim.keymap.set('n', '<leader>x!', ':q!<CR>') + +-- Close with leader +vim.keymap.set('n', '<leader>ww', ':w<CR>', opts) +vim.keymap.set('n', '<leader>qq', ':q<CR>', opts) +vim.keymap.set('n', '<leader>wq', ':wq<CR>', opts) +vim.keymap.set('n', '<leader>q!', ':q!<CR>', opts) +vim.keymap.set('n', '<leader>wq', ':wq<CR>') +vim.keymap.set('n', '<leader>ee :e', '') + +-- Tabs with leader +vim.keymap.set('n', '<leader>th', ':tabprevious<CR>', opts) +vim.keymap.set('n', '<leader>tl', ':tabnext<CR>', opts) +vim.keymap.set('n', '<leader>tk', ':tabnew<CR>', opts) +vim.keymap.set('n', '<leader>tj', ':tabclose<CR>', opts) + +-- Write with sudo +vim.keymap.set('n', 'ZW', ':w !pkexec tee % >/dev/null', opts) + +-- clear search highlights +vim.keymap.set('n', '<leader>/', ':noh<CR>') + +-- toggles +vim.keymap.set('n', '<leader>tn :set', 'number!<CR>') +vim.keymap.set('n', '<leader>tr :set', 'relativenumber!<CR>') + +-- write as root +vim.keymap.set('n', 'ZW', ':w !pkexec tee % >/dev/null') + +-- config +vim.keymap.set('n', '<leader>en', ':e ~/.config/nvim/init.lua<CR>') +vim.keymap.set('n', '<leader>ec', ':source %<CR>') +vim.keymap.set('n', '<leader>er', ':source ~/.config/nvim/init.lua<CR>') + +-- Goyo +vim.keymap.set('n', '<leader>G', ':Goyo<CR>') + +-- fugitive +vim.keymap.set('n', '<leader>gp :G', 'pull<CR>') +vim.keymap.set('n', '<leader>gd :G diff', '%<CR>') + +----------------- +-- Visual mode -- +----------------- + +-- Hint: start visual mode with the same area as the previous area and the same mode +--vim.keymap.set('v', '<', '<gv', opts) +--vim.keymap.set('v', '>', '>gv', opts) + +-- windows +vim.keymap.set('v', '<C-h>', '<C-w>h') +vim.keymap.set('v', '<C-j>', '<C-w>j') +vim.keymap.set('v', '<C-k>', '<C-w>k') +vim.keymap.set('v', '<C-l>', '<C-w>l') + +-------------- +-- TERMINAL -- +-------------- + +-- escape for term windows +vim.keymap.set('t', '<Esc>', '<C-\\><C-n>') diff --git a/nvim/lua/lsp.lua b/nvim/lua/lsp.lua new file mode 100644 index 0000000..343c76b --- /dev/null +++ b/nvim/lua/lsp.lua @@ -0,0 +1,22 @@ +-- Remove Global Default Key mapping +vim.keymap.del("n", "grn") +vim.keymap.del("n", "gra") +vim.keymap.del("n", "grr") +vim.keymap.del("n", "gri") +vim.keymap.del("n", "gO") + +-- Create keymapping +-- LspAttach: After an LSP Client performs "initialize" and attaches to a buffer. +vim.api.nvim_create_autocmd("LspAttach", { + callback = function(args) + local keymap = vim.keymap + local lsp = vim.lsp + local bufopts = { noremap = true, silent = true } + + keymap.set("n", "gr", lsp.buf.references, bufopts) + keymap.set("n", "gd", lsp.buf.definition, bufopts) + keymap.set("n", "<space>rn", lsp.buf.rename, bufopts) + keymap.set("n", "K", lsp.buf.hover, bufopts) + keymap.set("n", "<space>f", lsp.buf.format, bufopts) + end +}) diff --git a/nvim/lua/options.lua b/nvim/lua/options.lua new file mode 100644 index 0000000..ae802be --- /dev/null +++ b/nvim/lua/options.lua @@ -0,0 +1,86 @@ +-- Hint: use `:h <option>` to figure out the meaning if needed +vim.opt.clipboard = 'unnamedplus' -- use system clipboard +vim.opt.completeopt = {'menu', 'menuone', 'noselect'} +vim.opt.mouse = 'a' -- allow the mouse to be used in nvim + +-- Tab +vim.opt.tabstop = 2 -- number of visual spaces per TAB +vim.opt.softtabstop = 2 -- number of spaces in tab when editing +vim.opt.shiftwidth = 2 -- insert 2 spaces on a tab +vim.opt.expandtab = true -- tabs are spaces +vim.opt.smartindent = true +vim.opt.smarttab = true + +-- UI config +vim.opt.number = true -- show absolute number +vim.opt.relativenumber = true -- show relative numbers +vim.opt.cursorline = true -- highlight cursor line underneath cursor horizontally +vim.opt.splitbelow = true -- open new vertical splits bottom +vim.opt.splitright = true -- open new horizontal splits right +-- vim.opt.termguicolors = true -- enable 24-bit RGB color in the TUI +vim.opt.showmode = false -- show the "-- INSERT --" and other hints + +-- Searching +vim.opt.incsearch = true -- search as characters are entered +vim.opt.hlsearch = false -- do not highlight matches +vim.opt.ignorecase = true -- ignore case in searches by default +vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered + +-- Etc +vim.opt.ruler = true -- Show row and column ruler info +vim.opt.undolevels = 1000 -- Number of undo levels +vim.opt.backspace = { "indent", "eol", "start" } -- Backspace behavior +vim.opt.foldmethod = "marker" +vim.opt.conceallevel = 2 + +-- Plugins +-- emmet +vim.g.user_emmet_leader_key = '<C-a>' + +-- zig +vim.g.zig_fmt_autosave = 1 + +-- markdown +vim.g.vim_markdown_folding_disabled = 1 +vim.g.vim_markdown_folding_level = 3 +vim.g.vim_markdown_toc_autofit = 1 +vim.g.vim_markdown_emphasis_multiline = 0 +vim.g.tex_conceal = "" +vim.g.vim_markdown_math = 1 +vim.g.vim_markdown_conceal_code_blocks = 1 +vim.g.vim_markdown_fenced_languages = { 'c++=cpp', 'viml=vim', 'bash=sh', 'ini=dosini' } +vim.g.vim_markdown_follow_anchor = 1 +vim.g.vim_markdown_math = 1 +vim.g.vim_markdown_frontmatter = 1 +vim.g.vim_markdown_toml_frontmatter = 1 +vim.g.vim_markdown_strikethrough = 1 +vim.g.vim_markdown_no_extensions_in_markdown = 1 +vim.g.vim_markdown_autowrite = 1 +vim.g.vim_markdown_auto_insert_bullets = 0 +vim.g.vim_markdown_new_list_item_indent = 0 +vim.g.vim_markdown_edit_url_in = 'tab' + +-- NERDTree +vim.g.NERDTreeGitStatusUseNerdFonts = 1 +vim.g.NERDTreeGitStatusShowClean = 1 +vim.g.NERDTreeDirArrowExpandable = '>' +vim.g.NERDTreeDirArrowCollapsible = '<' +vim.g.NERDTreeMapToggleHidden = 'z' + +-- goyo +vim.g.goyo_width = '90%' +vim.g.goyo_height = '100%' + +-- limelight +vim.g.limelight_conceal_ctermfg = 'gray' +vim.g.limelight_conceal_guifg = 'gray' + +-- devicon +vim.g.airline_powerline_fonts = 1 +vim.g.webdevicons_enable_nerdtree = 1 + +-- vim-indent-guides +vim.g.indent_guides_enable_on_vim_startup = 0 + +-- vim-signify +vim.opt.updatetime = 100 diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua new file mode 100644 index 0000000..f90b09c --- /dev/null +++ b/nvim/lua/plugins.lua @@ -0,0 +1,62 @@ +local lazypath = vim.fn.stdpath("data") .. "lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup({ + -- LSP manager + { "mason-org/mason.nvim", opts = {} }, + { + "mason-org/mason-lspconfig.nvim", + dependencies = { + "mason-org/mason.nvim", + "neovim/nvim-lspconfig", + }, + opts = { + ensure_installed = { "pylsp", "clangd", "rust_analyzer", "zls" }, + }, + }, + { + "neovim/nvim-lspconfig", + config = function() + local lspconfig = require("lspconfig") + + lspconfig.pylsp.setup({}) + end, + }, + "tanvirtin/monokai.nvim", + "lervag/vimtex", + 'tomasiser/vim-code-dark', + 'flazz/vim-colorschemes', + 'ZachIndigo/vim-preglow', + 'axvr/org.vim', + 'ziglang/zig.vim', + 'jdonaldson/vaxe', + 'xuhdev/vim-latex-live-preview', + 'waycrate/swhkd-vim', + 'HiPhish/guile.vim', + 'preservim/nerdtree', + 'Xuyuanp/nerdtree-git-plugin', + 'PhilRunninger/nerdtree-visual-selection', + 'tpope/vim-fugitive', + 'junegunn/goyo.vim', + 'junegunn/limelight.vim', + 'vim-airline/vim-airline', + 'nathanaelkane/vim-indent-guides', + 'mhinz/vim-signify', + 'tpope/vim-endwise', + 'tpope/vim-surround', + 'mattn/emmet-vim', + 'godlygeek/tabular', + 'plasticboy/vim-markdown', + 'ryanoasis/vim-devicons', + {'akinsho/toggleterm.nvim', version = "*", config = true}, +}) diff --git a/nvim/lua/term.lua b/nvim/lua/term.lua new file mode 100644 index 0000000..e7aac4e --- /dev/null +++ b/nvim/lua/term.lua @@ -0,0 +1,51 @@ +require("toggleterm").setup{ + -- size can be a number or function which is passed the current terminal + size = function(term) + if term.direction == "horizontal" then + return 15 + elseif term.direction == "vertical" then + return vim.o.columns * 0.4 + end + end, + open_mapping = [[<leader>`]], -- or { [[<c-\>]], [[<c-¥>]] } if you also use a Japanese keyboard. + hide_numbers = true, -- hide the number column in toggleterm buffers + shade_filetypes = {}, + autochdir = false, -- when neovim changes it current directory the terminal will change it's own when next it's opened + shade_terminals = true, -- NOTE: this option takes priority over highlights specified so if you specify Normal highlights you should set this to false + shading_factor = '-30', -- the percentage by which to lighten dark terminal background, default: -30 + shading_ratio = '-3', -- the ratio of shading factor for light/dark terminal background, default: -3 + start_in_insert = true, + insert_mappings = true, -- whether or not the open mapping applies in insert mode + terminal_mappings = true, -- whether or not the open mapping applies in the opened terminals + persist_size = true, + persist_mode = true, -- if set to true (default) the previous terminal mode will be remembered + direction = 'horizontal', + close_on_exit = true, -- close the terminal window when the process exits + clear_env = false, -- use only environmental variables from `env`, passed to jobstart() + -- Change the default shell. Can be a string or a function returning a string + shell = vim.o.shell, + auto_scroll = true, -- automatically scroll to the bottom on terminal output + -- This field is only relevant if direction is set to 'float' + float_opts = { + -- The border key is *almost* the same as 'nvim_open_win' + -- see :h nvim_open_win for details on borders however + -- the 'curved' border is a custom border type + -- not natively supported but implemented in this plugin. + border = 'single', + -- like `size`, width, height, row, and col can be a number or function which is passed the current terminal + winblend = 3, + title_pos = 'left' + }, + winbar = { + enabled = false, + name_formatter = function(term) -- term: Terminal + return term.name + end + }, + responsiveness = { + -- breakpoint in terms of `vim.o.columns` at which terminals will start to stack on top of each other + -- instead of next to each other + -- default = 0 which means the feature is turned off + horizontal_breakpoint = 135, + } +} diff --git a/nwg-bar/bar.json b/nwg-bar/bar.json new file mode 100644 index 0000000..01a92c3 --- /dev/null +++ b/nwg-bar/bar.json @@ -0,0 +1,22 @@ +[ + { + "label": "Lock", + "exec": "loginctl lock-session", + "icon": "/usr/share/nwg-bar/images/system-lock-screen.svg" + }, + { + "label": "Logout", + "exec": "hyprctl dispatch exit", + "icon": "/usr/share/nwg-bar/images/system-log-out.svg" + }, + { + "label": "Reboot", + "exec": "systemctl reboot", + "icon": "/usr/share/nwg-bar/images/system-reboot.svg" + }, + { + "label": "Shutdown", + "exec": "systemctl -i poweroff", + "icon": "/usr/share/nwg-bar/images/system-shutdown.svg" + } +] diff --git a/nwg-bar/style.css b/nwg-bar/style.css new file mode 100644 index 0000000..023d282 --- /dev/null +++ b/nwg-bar/style.css @@ -0,0 +1,35 @@ +window { + background-color: rgba (0, 0, 0, 1.0) +} + +/* Outer bar container, takes all the window width/height */ +#outer-box { + margin: 0px +} + +/* Inner bar container, surrounds buttons */ +#inner-box { + background-color: rgba (27, 29, 28, 0.85); + border-radius: 10px; + border-style: none; + border-width: 1px; + border-color: rgba (156, 142, 122, 0.7); + padding: 5px; + margin: 5px +} + +button, image { + background: none; + border: none; + box-shadow: none +} + +button { + padding-left: 10px; + padding-right: 10px; + margin: 5px +} + +button:hover { + background-color: rgba (25, 138, 68, 1.0) +} diff --git a/python/pythonrc b/python/pythonrc index cd954b6..c7cf7d5 100644 --- a/python/pythonrc +++ b/python/pythonrc @@ -1,24 +1,40 @@ -def is_vanilla() -> bool: +try: + import atexit + import os import sys - return not hasattr(__builtins__, '__IPYTHON__') and 'bpython' not in sys.argv[0] + from pathlib import Path + import readline +except ImportError as e: + print(f"Couldn't load module. {e}") + sys.exit(1) -def setup_history(): - import os - import atexit - import readline - from pathlib import Path +################ +# TAB COMPLETION # +################## + +try: + readline.parse_and_bind("tab: complete") +except ImportError: + pass + - if state_home := os.environ.get('XDG_STATE_HOME'): - state_home = Path(state_home) - else: - state_home = Path.home() / '.local' / 'state' +### XDG Compliant History File +# See https://gist.github.com/viliampucik/8713b09ff7e4d984b29bfcd7804dc1f4?permalink_comment_id=4582040#gistcomment-4582040 - history: Path = state_home / 'python_history' +# Destroy default history file writing hook (and also tab completion, which is why we manually added it above) +if hasattr(sys, '__interactivehook__'): + del sys.__interactivehook__ - readline.read_history_file(str(history)) - atexit.register(readline.write_history_file, str(history)) +histfile = Path(os.getenv("XDG_CACHE_HOME", Path.home() / ".cache")) / "python_history" +try: + histfile.touch(exist_ok=True) +except FileNotFoundError: # Probably the parent directory doesn't exist + histfile.parent.mkdir(parents=True, exist_ok=True) -if is_vanilla(): - setup_history() +readline.read_history_file(histfile) +# Don't store an obscene amount of history +readline.set_history_length(5000) +# Write to history file on exit +atexit.register(readline.write_history_file, histfile) @@ -18,12 +18,18 @@ case `uname -s` in alias ls="ls -h" ;; "Linux") - alias ls="ls -h $COLOR_FLAGS_GNU" + #alias ls="ls -h $COLOR_FLAGS_GNU" + alias ls="eza" + ;; + "Darwin") + alias ls="eza --color" ;; esac alias ll='ls -l' -alias la='ls -A' -alias lla='ls -lA' +alias lt='ls -l --total-size' +alias lts='ls -l --total-size --sort size --reverse' +alias la='ls -a' +alias lla='ls -la' alias lb='lsblk' alias md='mkdir -p' alias ch='cd $HOME' @@ -33,7 +39,14 @@ alias nv='nvim' alias v='nvim' ## Change utils -alias rm='rm -i' +case `uname -s` in + "OpenBSD" | "Darwin") + alias rm='rm -i' + ;; + "Linux") + alias rm='trash-put' + ;; +esac alias cp='cp -i' alias srsync='rsync -KPUcrtvyz' @@ -79,7 +92,7 @@ alias s='sudo systemctl' #alias ursm='env SVDIR="$HOME/.local/sv/" rsm' # XDG dirs fix -alias svn="svn --config-dir \"$XDG_CONFIG_HOME\"/subversion" +alias svn="svn --config-dir $XDG_CONFIG_HOME/subversion" alias adb="HOME="$XDG_DATA_HOME"/android adb" alias wget="wget --hsts-file=\"$XDG_DATA_HOME/wget-hsts\"" alias yarn="yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config" @@ -22,6 +22,10 @@ export ADB_VENDOR_KEY="$XDG_CONFIG_HOME"/android export LESSHISTFILE=- # Fixing Paths +export RENPY_PATH_TO_SAVES="$XDG_DATA_HOME" +export PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel +export ZPLUG_HOME="$XDG_DATA_HOME/zplug" +export DOTNET_CLI_HOME="$XDG_DATA_HOME"/dotnet export MBSYNCRC="$XDG_CONFIG_HOME"/isync/mbsyncrc export ATOM_HOME="$XDG_DATA_HOME"/atom export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc @@ -50,15 +54,15 @@ export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc export RENPY_PATH_TO_SAVES="$XDG_DATA_HOME" export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc export XAUTHORITY="$XDG_RUNTIME_DIR"/X11/Xauthority -export VIMINIT="set nocp | source ${XDG_CONFIG_HOME:-$HOME.config}/vim/vimrc" +#export VIMINIT="set nocp | source ${XDG_CONFIG_HOME:-$HOME.config}/vim/vimrc" export ANDROID_USER_HOME="$XDG_DATA_HOME"/android export XCURSOR_PATH="/usr/share/icons:$XDG_DATA_HOME/icons" export PYTHONSTARTUP="$XDG_CONFIG_HOME"/python/pythonrc # Scaling -export QT_AUTO_SCREEN_SCALE_FACTOR=0 -export QT_SCALE_FACTOR=1 -export QT_SCREEN_SCALE_FACTORS="1;1;1" +#export QT_AUTO_SCREEN_SCALE_FACTOR=0 +#export QT_SCALE_FACTOR=1 +#export QT_SCREEN_SCALE_FACTORS="1;1;1" export GDK_SCALE=1 export GDK_DPI_SCALE=1 diff --git a/tofi/colors b/tofi/colors index a5f480c..047c875 100644 --- a/tofi/colors +++ b/tofi/colors @@ -1,10 +1,10 @@ background-color = #000000 -outline-color = #39c1ed -border-color = #39c1ed +outline-color = #198844 +border-color = #198844 text-color = #ffffff -prompt-color = #39c1ed +prompt-color = #198844 prompt-background = #000000 -placeholder-color = #39c1ed +placeholder-color = #198844 placeholder-background = #000000 input-color = #ffffff input-background = #000000 @@ -12,6 +12,6 @@ default-result-background = #000000 alternate-result-color = #ffffff alternate-result-background = #000000 selection-color = #000000 -selection-match-color = #198844 -selection-background = #39c1ed +selection-match-color = #39c1ed +selection-background = #198844 @@ -13,10 +13,8 @@ set directory=$XDG_STATE_HOME/vim/swap | call mkdir(&directory, 'p') set undodir=$XDG_STATE_HOME/vim/undo | call mkdir(&undodir, 'p') set viewdir=$XDG_STATE_HOME/vim/view | call mkdir(&viewdir, 'p') -if !has('nvim') | set viminfofile=$XDG_STATE_HOME/vim/viminfo | endif - " vimplugs {{{ -call plug#begin('~/.config/nvim/plugged') +call plug#begin('~/.config/vim/plugged') " colorschemes {{{ Plug 'tomasiser/vim-code-dark' " codedark color scheme Plug 'flazz/vim-colorschemes' " meta-color scheme package @@ -52,9 +50,9 @@ Plug 'ryanoasis/vim-devicons' " dev icons for nerdtree call plug#end() " }}} -" nvim options {{{ +" vim options {{{ -"" nvimrc: +"" vimrc: "" General set showmatch " Highlight matching brace @@ -80,9 +78,6 @@ set undolevels=1000 " Number of undo levels set backspace=indent,eol,start " Backspace behaviour filetype plugin indent on -"" GUI Config -set guifont=mononoki\ Nerd\ Font\ Mono:h12 - "hi Normal guibg=NONE ctermbg=NONE "hi NonText guibg=NONE ctermbg=NONE "set background=dark @@ -260,7 +255,7 @@ nnoremap <leader>wk :resize +1<CR> nnoremap <leader>wl :vertical resize +1<CR> " config -nnoremap <leader>en :e ~/.config/nvim/init.vim<CR> +nnoremap <leader>en :e ~/.config/vim/vimrc<CR> nnoremap <leader>ec :source %<CR> " write as root @@ -303,4 +298,4 @@ nnoremap <leader>pc :PlugClean<CR> nnoremap <leader>gp :G pull<CR> nnoremap <leader>gd :G diff %<CR> -" }}} +" }} diff --git a/waybar/config b/waybar/config index 146b66c..3da2422 100644 --- a/waybar/config +++ b/waybar/config @@ -2,14 +2,14 @@ "layer": "top", "position": "top", "height": 36, - "output": "DP-1", + "output": "DP-2", "spacing": 4, // Choose the order of the modules "modules-left":[ "hyprland/workspaces", "custom/launcher", "hyprland/window"], "modules-center":[], - "modules-right":[ "idle_inhibitor", "pulseaudio", "cpu", "memory", "network", "clock", "tray"], + "modules-right":[ "tray", "mpd", "idle_inhibitor", "temperature#cpu0", "temperature#cpu1", "temperature#gpu0", "temperature#gpu1", "temperature#gpu2", "wireplumber", "cpu", "memory", "network", "clock", "custom/power"], // Modules configuration @@ -38,8 +38,8 @@ "18": "9", }, "persistent-workspaces": { - "DP-1": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], - //"DP-1": [ 10, 11, 12, 13, 14, 15, 16, 17, 18 ], + "DP-2": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], + //"DP-2": [ 10, 11, 12, 13, 14, 15, 16, 17, 18 ], }, "on-scroll-up": "hyprctl dispatch split-workspace e+1", "on-scroll-down": "hyprctl dispatch split-workspace e-1", @@ -158,24 +158,13 @@ "max-length": 22, "on-click-right": "bash ~/.config/rofi/wifi_menu/rofi_wifi_menu" }, - "pulseaudio": { + "wireplumber": { // "scroll-step": 1, // %, can be a float "format": "{volume}% {icon}", - "format-bluetooth": "{volume}% {icon}", - "format-bluetooth-muted": "{icon} {format_source}", - "format-muted": "{format_source}", - "format-source": "", - "format-source-muted": "", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": ["", "", ""] - }, - "on-click": "pavucontrol" + "format-muted": "{volume}% ", + "format-icons": ["", "", ""], + "on-click": "volsv -t", + "scroll-step": 0.1 }, "custom/launcher":{ "format": "", @@ -203,7 +192,7 @@ "modules-left":[ "hyprland/workspaces", "custom/launcher", "hyprland/window"], "modules-center":[], - "modules-right":[ "tray", "mpd", "idle_inhibitor", "temperature#cpu0", "temperature#cpu1", "temperature#gpu0", "temperature#gpu1", "temperature#gpu2", "pulseaudio", "cpu", "memory", "network", "clock"], + "modules-right":[ "tray", "mpd", "idle_inhibitor", "temperature#cpu0", "temperature#cpu1", "temperature#gpu0", "temperature#gpu1", "temperature#gpu2", "wireplumber", "cpu", "memory", "network", "clock", "custom/power"], // Modules configuration diff --git a/waybar/style.css b/waybar/style.css index cf76ed2..e791f99 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -45,7 +45,7 @@ window#waybar.hidden { /* #workspaces button:hover { - background: #39c1ed; + background: #6e3c85; color: black; border-bottom: 3px solid #ffffff; @@ -58,7 +58,7 @@ window#waybar.hidden { /* #workspaces button.active:hover { - background: #39c1ed; + background: #6e3c85; color: black; border-bottom: 3px solid #ffffff; } @@ -81,7 +81,7 @@ window#waybar.hidden { #temperature, #backlight, #network, -#pulseaudio, +#wireplumber, #custom-media, #custom-launcher, #custom-power, @@ -125,7 +125,7 @@ window#waybar.hidden { } #battery.charging, #battery.plugged { - color: #26A65B; + color: #198844; background-color: #1b1d1c; } @@ -180,12 +180,12 @@ label:focus { color: #ffffff; } -#pulseaudio { +#wireplumber { background-color: #1b1d1c; color: #ffffff; } -#pulseaudio.muted { +#wireplumber.muted { background-color: #1b1d1c; color: #198844; } @@ -276,6 +276,23 @@ label:focus { background-color: #eb4d4b; } +#tray { + background-color: transparent; + color: #ffffff; +} + +#tray > .passive { + -gtk-icon-effect: dim; + background-color: #198844; + color: #ffffff; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #198844; + color: #ffffff; +} + #idle_inhibitor { background-color: #1b1d1c; border-radius: 20px 0px 0px 20px; diff --git a/xsettingsd/xsettingsd.conf b/xsettingsd/xsettingsd.conf index e762fa9..c4ab3db 100644 --- a/xsettingsd/xsettingsd.conf +++ b/xsettingsd/xsettingsd.conf @@ -1,4 +1,4 @@ -Net/ThemeName "Flat-Remix-GTK-Green-Darkest" +Net/ThemeName "Flat-Remix-GTK-Green-Darkest-Solid" Net/IconThemeName "Cosmic" Gtk/CursorThemeName "BreezeX-Black" Net/EnableEventSounds 1 diff --git a/yay/config.json b/yay/config.json index 2b64b70..c06f416 100644 --- a/yay/config.json +++ b/yay/config.json @@ -10,7 +10,7 @@ "pacmanconf": "/etc/pacman.conf", "redownload": "no", "answerclean": "All", - "answerdiff": "", + "answerdiff": "All", "answeredit": "", "answerupgrade": "", "gitbin": "git", @@ -36,8 +36,8 @@ "provides": true, "pgpfetch": true, "cleanmenu": true, - "diffmenu": false, - "editmenu": true, + "diffmenu": true, + "editmenu": false, "combinedupgrade": false, "useask": false, "batchinstall": false, @@ -2,5 +2,6 @@ unset HISTFILE export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" export skip_global_compinit=1 +fpath=($XDG_CONFIG_HOME/functions $fpath) [ -f /etc/profile ] && . /etc/profile [ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile" @@ -1,8 +1,17 @@ #zmodload zsh/zprof -if [ -d "$HOME/.zplug" ]; then +if [ -n "$ZPLUG_HOME" ]; then + if [ -d "$ZPLUG_HOME" ]; then + export ZPLUG_INSTALLED="y" + source "$ZPLUG_HOME/init.zsh" + fi +elif [ -d "$XDG_DATA_HOME/zplug" ]; then + export ZPLUG_INSTALLED="y" + source "$XDG_DATA_HOME/zplug/init.zsh" +elif [ -d "$HOME/.zplug" ]; then export ZPLUG_INSTALLED="y" source "$HOME/.zplug/init.zsh" fi +[ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config" HISTFILE="$XDG_CONFIG_HOME/zsh/hist" SAVEHIST=1000 HISTSIZE=1000 @@ -44,9 +53,13 @@ bindkey "${key[End]}" end-of-line bindkey "${key[PageUp]}" history-substring-search-up bindkey "${key[PageDown]}" history-substring-search-down -MYPROMPT=$'%S%F{002}[%n@%m]\UE0B2%F{015}%s%~%S%F{002}\UE0B0%#%s\UE0B0%f ' +if (env | grep -Fq 'DISTROBOX'); then + MYPROMPT=$'%F{000}%K{004}[%n@%m]%F{013}\UE0B2%K{013}%F{000}%~%F{013}%K{004}\UE0B0%F{000}%#%F{004}%k\UE0B0%f ' +else + MYPROMPT=$'%F{000}%K{002}[%n@%m]%F{006}\UE0B2%K{006}%F{000}%~%F{006}%K{002}\UE0B0%F{000}%#%F{002}%k\UE0B0%f ' +fi function zle-line-init zle-keymap-select { - VIM_PROMPT=$'%S%F{012}[%n@%m]\UE0B2%F{015}%s%~%S%F{012}\UE0B0%#%s\UE0B0%f ' + VIM_PROMPT=$'%F{000}%K{012}[%n@%m]%F{006}\UE0B2%K{006}%F{000}%~%F{006}%K{012}\UE0B0%F{000}%#%F{012}%k\UE0B0%f ' PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}" zle reset-prompt } @@ -76,6 +89,8 @@ if [ -n "$ZPLUG_INSTALLED" ]; then fi autoload -Uz compinit -compinit +compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION" + +zstyle ':completion:*' hosts off #zprof |