diff options
71 files changed, 1337 insertions, 373 deletions
@@ -1,3 +1,6 @@ +@companion-app/ +5DB5/ +5db5/ abook/ Applied Computer Music Technologies/ AHM 5050 v3/ @@ -7,9 +10,11 @@ Amp Locker/ Amp Locker.settings amsynth/ ardour*/ +audacity/ Audio Assault/ autostart/ Binance/ +Blackmagic Design/ Blacksun/ Blacksun.settings blender/ @@ -23,6 +28,7 @@ calibre/ calibre/conversion carla/ cava/ +CCL Cross-platform Framework/ cef_user_data .charles.config chromium/ @@ -35,6 +41,7 @@ computerrc computerrc.sh configstore/ cordless/config.json +cosmic/ dconf/ dde-printer.ini DELTARUNE/ @@ -47,6 +54,7 @@ Element/ emacs/ EmeraldWallet/ enchant/ +enigma/ Epic/ Etherdyne/ evolution/ @@ -63,18 +71,20 @@ ghb/ GIMP/ git/ glib-2.0/ +glow/ gnome-control-center/ gnome-initial-setup-done gnome-session/ +go/ goa-1.0/ godot/ gomuks/ -gtk-2.0/ -gtk-3.0/ -gtkrc -gtkrc-2.0 +gtk-2.0/* +!gtk-2.0/gtkrc +gtk-3.0/* +!gtk-3.0/settings.ini +gtk-4.0/ guitarix/ -<<<<<<< HEAD Hellbeast v2/ Hellbeast v2.settings htop/htoprc @@ -104,15 +114,18 @@ kde.org/ keepassxc/ khal/ kicad/ +kid3rc Kitware/ kritadisplayrc kritarc ksh/history +kwalletrc lab/ lbry/ LBRY/ LBRY-GTK/ lbry-viewer/ +libaccounts-glib/ libfm/ libreoffice/ LibrePCB/ @@ -122,6 +135,7 @@ lkjb/ lsp-plugins/ lutris/ lxqt/ +MangoHud/ menus/ mgba/ micro/buffers/ @@ -156,7 +170,7 @@ notmuch/ npm/ nssdb/ NuGet/ -nvim/plugged/ +nvim/lazy-lock.json nwg-look/ nwg-outputs/ obs-studio/ @@ -164,6 +178,8 @@ odysee-nativefier*/ okularpartrc okularrc openrazer/ +package-lock.json +parallel/ pavucontrol.ini pcmanfm/ pcmanfm-qt/ @@ -183,12 +199,14 @@ Portmaster/ PreSonus/ print-manager/ profanity/profrc +Proton/ Proton AG/ protonfixes/ protonmail/ protonvpn/ pulse/ pupgui/ +qobuz-dl/ qrcp/ qt5ct/* !qt5ct/qt5ct.conf @@ -201,6 +219,7 @@ qutebrowser/jmatrix-rules r2modman/ r2modmanPlus-local/ raveloxmidi/ +razergenie/ rclone/ ReAmp Studio R1/ ReAmp Studio R1.settings @@ -209,7 +228,11 @@ remmina/ Resonant DSP/ retroarch/ rncbc.org/ +.rt64/ rtorrent/ +runit/sv/*/supervise +runit/sv/*/*/supervise +runit/runsvdir/* RVXX EXEX.settings RVXX v2/ RVXX v2.settings @@ -218,13 +241,18 @@ Serenity/ Session/ Shibalba EXEX.settings sh/weather +SNAPSHOT PLAYER/ snownews/urls.opml solaar/ +sonobus/ +spicy/ spotifyd/ spotify-tui/ straw-viewer/ +strawberry/ subversion/ SUPERHOT/ +suyu/ switcher/ syncthing/ Synergy/ @@ -243,14 +271,16 @@ transmission-daemon/ tremc/ Trolltech.conf .tsrc +tuxclocker.conf ubports-installer/ ultravnc-viewer/ UNDERTALE*/ unity3d/ Valve Corporation/ vdirsyncer/ +vkBasalt/ VeraCrypt/ -vim/ +vim/* !vim/vimrc VirtualBox/ vlc/vlc-qt-interface.conf @@ -259,6 +289,7 @@ waybar/config-Hyprland-* waybar/config-river-* weechat/ whoozle.github.io/ +wireshark/ xmonad/.stack-work xmonad/stack.yaml.lock xmonad/xmonad.hi @@ -266,14 +297,17 @@ xmonad/xmonad.o xmonad/xmonad-x86_64-linux xsettingsd/ yabridgectl/ +yarn/ ytfzf/subscriptions yuzu/ zec-qt-wallet-org/ Zelda64Recompiled/ zirless/ zoomus.conf +zoom.conf zsh/hist zsh/.zcompdump zsh/zcompdump zsh/zfunc +zsh/.zkbd/ zsh/.zsh_theme @@ -1,31 +1,24 @@ VIM := $(shell command -v vim 2>/dev/null) -NVIM := $(shell command -v nvim 2>/dev/null) -XCONFS := X11/Xresources -ZCONFS := zsh/.zshenv +ZCONFS := zsh/zshenv zsh/zshrc SCONFS := sh/profile DCONFS := doas.conf all: -install: install-xconfigs install-shconfigs install-zshconfigs vimplug-vim vimplug-nvim +install: install-zshconfigs install-shconfigs vimplug-vim -install-xconfigs: $(XCONFS) - @echo "Installing Xorg conf files..." - @echo "Xresources..." - @ln -sf `pwd`/X11/Xresources ~/.Xresources +install-zshconfigs: $(ZCONFS) + @echo "Installing zsh conf files..." + @echo ".zshenv..." + @ln -sf `pwd`/zsh/zshenv ~/.zshenv + @echo ".zshrc..." + @ln -sf `pwd`/zsh/zshrc ~/.zshrc @echo "Done." install-shconfigs: $(SCONFS) - @echo "Installing SH conf files..." + @echo "Installing sh conf files..." @echo ".profile..." @ln -sf `pwd`/sh/profile ~/.profile - @echo "Done." - -install-zshconfigs: $(ZCONFS) - @echo "Installing zsh conf files..." - @echo ".zshenv..." - @ln -sf `pwd`/zsh/.zshenv ~/.zshenv - @echo "Done." vimplug-vim: installers/vimplug_vim.sh ifdef VIM @@ -36,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 diff --git a/autostart.sh b/autostart.sh index 3616220..42eb092 100755 --- a/autostart.sh +++ b/autostart.sh @@ -24,7 +24,6 @@ if [ -n "${WAYLAND_DISPLAY}${DISPLAY}" ]; then runifnot waybar import-gsettings gtk-theme 'Flat-Remix-GTK-Green-Darkest-Solid' import-gsettings icon-theme 'Mint-X-Grey' - import-gsettings cursor-theme 'Adwaita' xrdb "$XDG_CONFIG_HOME/X11/xresources" fi diff --git a/darkman/config.yaml b/darkman/config.yaml new file mode 100644 index 0000000..5cf7ee4 --- /dev/null +++ b/darkman/config.yaml @@ -0,0 +1,3 @@ +usegeoclue: false +dbusserver: true +portal: true @@ -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/environment.d/cursor.conf b/environment.d/cursor.conf new file mode 100644 index 0000000..9b9ef2b --- /dev/null +++ b/environment.d/cursor.conf @@ -0,0 +1,2 @@ +XCURSOR_THEME=BreezeX-Black +XCURSOR_SIZE=32 diff --git a/gtk-2.0/gtkrc b/gtk-2.0/gtkrc new file mode 100644 index 0000000..628ed00 --- /dev/null +++ b/gtk-2.0/gtkrc @@ -0,0 +1,19 @@ +# DO NOT EDIT! This file will be overwritten by nwg-look. +# Any customization should be done in ~/.gtkrc-2.0.mine instead. + +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=32 +gtk-toolbar-style=3 +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=0 +gtk-menu-images=0 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=0 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle="hintslight" +gtk-xft-rgba="rgb" diff --git a/gtk-3.0/settings.ini b/gtk-3.0/settings.ini new file mode 100644 index 0000000..28ef3a0 --- /dev/null +++ b/gtk-3.0/settings.ini @@ -0,0 +1,23 @@ +[Settings] +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=3 +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=0 +gtk-menu-images=0 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=0 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintslight +gtk-xft-rgba=rgb +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/handlr/handlr.toml b/handlr/handlr.toml new file mode 100644 index 0000000..58e04ba --- /dev/null +++ b/handlr/handlr.toml @@ -0,0 +1,4 @@ +enable_selector = false +selector = "tofi -c ~/.conifg/tofi/cosmic --prompt-text 'Open With: '" +term_exec_args = '-e' +expand_wildcards = false diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf index 9b6ea02..4d18296 100644 --- a/hypr/hypridle.conf +++ b/hypr/hypridle.conf @@ -1,13 +1,34 @@ general { - lock_cmd = hyprlock # dbus/sysd lock command (loginctl lock-session) - unlock_cmd = # same as above, but unlock - before_sleep_cmd = swaylock # command ran before sleep - after_sleep_cmd = # command ran after sleep - ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam) + lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances. + before_sleep_cmd = loginctl lock-session # lock before suspend. + after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display. } listener { - timeout = 600 # in seconds - on-timeout = loginctl lock-session # command to run when timeout has passed - on-resume = # command to run when activity is detected after timeout has fired. + timeout = 150 # 2.5min. + on-timeout = brightnessctl set 0 # set monitor backlight to minimum, avoid 0 on OLED monitor. + on-resume = brightnessctl -r # monitor backlight restore. +} + +# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight. +listener { + timeout = 150 # 2.5min. + on-timeout = brightnessctl -sd led::kbd_backlight set 0 # turn off keyboard backlight. + on-resume = brightnessctl -rd led::kbd_backlight # turn on keyboard backlight. +} + +listener { + timeout = 300 # 5min + on-timeout = loginctl lock-session # lock screen when timeout has passed +} + +listener { + timeout = 330 # 5.5min + on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed + on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. +} + +listener { + timeout = 1800 # 30min + on-timeout = systemctl suspend # suspend pc } diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 4824e6f..b9eba3a 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -1,8 +1,8 @@ # See https://wiki.hyprland.org/Configuring/Monitors/ #{{{ Monitor config -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 @@ -13,24 +13,25 @@ monitor = DP-1, 1920x1080@60, 0x0, 1 exec-once = xdph exec-once = hyprpm reload -n exec-once = hyprpaper -exec-once = hypridle +#exec-once = hypridle exec-once = waybar exec-once = pypr exec-once = lxqt-policykit-agent -exec-once = systemctl --user start dunst 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 cursor-theme 'Breeze' +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 = mpd -exec-once = systemctl --user import-environment DISPLAY -exec-once = systemctl --user import-environment WAYLAND_DISPLAY +#exec-once = systemctl --user start dunst +#exec-once = systemctl --user start hypridle +exec-once = dunst +exec-once = hypridle +#exec-once = mpd #}}} #{{{ env # Environment variables set at launch -env = HYPRCURSOR_THEME,BreezeHypr +env = HYPRCURSOR_THEME,theme_BreezeX-Black env = HYPRCURSOR_SIZE,32 env = XCURSOR_THEME,BreezeX-Black env = XCURSOR_SIZE,32 @@ -41,8 +42,17 @@ env = XCURSOR_SIZE,32 # Debug {{{ debug { - enable_stdout_logs = true - disable_logs = false + enable_stdout_logs = false + disable_logs = true + full_cm_proto = true +} +# }}} + +# device {{{ +$LAPTOP_TP_ENABLED = true +device { + name = synps/2-synaptics-touchpad + enabled = $LAPTOP_TP_ENABLED } # }}} @@ -59,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. @@ -77,7 +93,12 @@ general { col.active_border = rgba(198844ee) col.inactive_border = rgba(1b1d1cee) layout = master - no_cursor_warps = false +} +#}}} + +#{{{ cursor +cursor { + no_warps = false } #}}} @@ -87,9 +108,9 @@ misc { disable_splash_rendering = true enable_swallow = true swallow_regex = ^(kitty)$ - swallow_exception_regex = ^(.*)(ueberzug)$ + swallow_exception_regex = ^(wev|.*ueberzug|n?vi?m? .*)$ vfr = true - vrr = 1 + vrr = 3 } #}}} @@ -97,17 +118,21 @@ misc { decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more rounding = 10 - drop_shadow = yes - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) #{{{ Blur options blur { enabled = true size = 3 passes = 1 new_optimizations = true - xray = true + xray = false + } + #}}} + #{{{ Shadow options + shadow { + enabled = false + range = 4 + render_power = 3 + color = 0xee1a1a1a } #}}} } @@ -142,11 +167,13 @@ master { special_scale_factor = 0.55 mfact = 0.55 # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more - new_is_master = false - new_on_top = true - no_gaps_when_only = false + new_status = slave + new_on_top = false + new_on_active = before + #no_gaps_when_only = false orientation = left inherit_fullscreen = true + drop_at_cursor = true } #}}} @@ -161,6 +188,7 @@ gestures { plugin { hyprsplit { num_workspaces = 9 + persistent_workspaces = true } } #}}} @@ -169,22 +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 -windowrule = windowdance, ^(oneshot)$ -windowrule = windowdance, title:^(UNDERTALE)$ -windowrule = fullscreen, ^(Xephyr)$ -windowrule = float, title:^(LibreWolf - Choose User Profile)$ -windowrule = float, ^(xdg-desktop-portal-gtk) -windowrule = float, title:^(UNDERTALE)$ -windowrule = float, ^(Tk)$ -windowrule = float, ^(lxqt-policykit-agent)$ -windowrulev2 = stayfocused, title:^()$, class:^(steam)$ -windowrulev2 = minsize 1 1, title:^()$, class:^(steam)$ -windowrulev2 = tile, class:^(REAPER)$, title:^(.*REAPER v[0-9.]* - Licensed for personal/small business use)$ -windowrule = tile, ^(WebApp-Qobuz[0-9]*)$ -windowrulev2 = float, title:^(menu)$ -#windowrulev2 = forceinput, title:^(menu)$ +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 @@ -224,6 +246,10 @@ bind = $mainMod, O, splitratio, exact 0.69 #MASTER #bind = $mainMod CONTROL, K, moveintogroup, u #}}} +#{{{ Device binds +bind = $mainMod, Backspace, exec, touchpad.sh +#}}} + #{{{ WC binds bind = $mainMod SHIFT, Q, killactive, bind = $mainMod SHIFT, E, exit, @@ -235,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 @@ -292,8 +354,8 @@ submap = reset #}}} #{{{ Menu bindings -bind = $mainMod, R, exec, exec sh -c "$(tofi-drun -c ~/.config/tofi/themes/dmenu_vertical --prompt-text Run:)" -bind = $mainMod, D, exec, exec sh -c "$(tofi-run -c ~/.config/tofi/themes/dmenu_vertical --prompt-text Run:)" +bind = $mainMod, R, exec, sh -c "$(tofi-drun -c ~/.config/tofi/themes/dmenu_vertical --prompt-text Run:)" +bind = $mainMod, D, exec, sh -c "$(tofi-run -c ~/.config/tofi/themes/dmenu_vertical --prompt-text Run:)" bind = $mainMod $secdMod, Q, exec, qbc bind = $mainMod $secdMod, W, exec, lwc bind = $mainMod $secdMod, E, exec, mbc @@ -314,80 +376,81 @@ bind = $mainMod, Q, exec, loginctl lock-session bind = $mainMod $secdMod CONTROL, Q, exec, systemctl suspend bind = $mainMod SHIFT, G, exec, get-app-id bind = $mainMod Control, M, exec, volsv -m +bind = $mainMod, Comma, exec, acpi-notify.sh #bind = $mainMod CONTROL, R, exec, startx -- /usr/bin/Xephyr -screen 1920x1080 :1 #}}} #{{{ 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 @@ -425,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/hypr/hyprlock.conf b/hypr/hyprlock.conf index 84d08ae..dc05411 100644 --- a/hypr/hyprlock.conf +++ b/hypr/hyprlock.conf @@ -1,9 +1,9 @@ general { - disable_loading_bar = false - hide_cursor = false - grace = 0 - no_fade_in = false - no_fade_out = false + disable_loading_bar = true + hide_cursor = true + grace = 15 + no_fade_in = true + no_fade_out = true ignore_empty_input = false } 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 ceeaf72..59a7f5e 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -879,7 +879,7 @@ resize_draw_strategy static #: insensitive, from the set [0-9A-Z]. Specify your preference as a #: string of characters. -# confirm_os_window_close -1 +confirm_os_window_close 0 #: Ask for confirmation when closing an OS window or a tab with at #: least this number of kitty windows in it by window manager (e.g. @@ -913,7 +913,7 @@ resize_draw_strategy static #: The second number is the margin between the tab bar and the #: contents of the current tab. -# tab_bar_style fade +tab_bar_style powerline #: The tab bar style, can be one of: @@ -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 @@ -1833,7 +1833,7 @@ map kitty_mod+g show_last_command_output #:: map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R -map f1 launch --stdin-source=@last_cmd_output --type=background wl-copy +#:: map f1 launch --stdin-source=@last_cmd_output --type=background wl-copy #:: To get the output of the first command on the screen, use #:: @first_cmd_output_on_screen. To get the output of the last jumped diff --git a/lf/cleaner b/lf/cleaner new file mode 100755 index 0000000..af197ee --- /dev/null +++ b/lf/cleaner @@ -0,0 +1,2 @@ +#!/bin/sh +exec kitten icat --clear --stdin no --transfer-mode memory </dev/null >/dev/tty @@ -1,9 +1,8 @@ set ratios 1:2:3 -set cleaner ctpvclear -set previewer ctpv -&ctpv -s $id . -&ctpvquit $id +set previewer ~/.config/lf/previewer +set cleaner ~/.config/lf/cleaner # Basic Settings +set sixel true set preview true set drawbox false set icons true @@ -51,9 +50,9 @@ cmd chmod ${{ printf "Mode Bits: " read ans - for file in "$fx" + echo "$fx" | while read file do - chmod $ans $file + chmod "$ans" "$file" done }} diff --git a/lf/previewer b/lf/previewer new file mode 100755 index 0000000..24db043 --- /dev/null +++ b/lf/previewer @@ -0,0 +1,36 @@ +#!/bin/sh +draw() { + kitten icat --stdin no --transfer-mode memory --place "${w}x${h}@${x}x${y}" "$1" </dev/null >/dev/tty + exit 1 +} + +file="$1" +w="$2" +h="$3" +x="$4" +y="$5" + +case "$(file -Lb --mime-type "$file")" in + image/*) + draw "$file" + ;; + video/*) + # vidthumb is from here: + # https://raw.githubusercontent.com/duganchen/kitty-pistol-previewer/main/vidthumb + draw "$(vidthumb "$file")" + ;; + application/pdf) + CACHE=$(mktemp /tmp/thumbcache.XXXXX) + pdftoppm -png -f 1 -singlefile "$1" "$CACHE" + draw "$CACHE.png" + rm -f "$CACHE" "$CACHE.png" + ;; + application/epub+zip|application/epub) + CACHE=$(mktemp /tmp/thumbcache.XXXXX) + epub-thumbnailer "$1" "$CACHE" 1024 + $HOME/.config/lf/image draw "$CACHE" + rm -f "$CACHE" "$CACHE.png" + ;; +esac + +pistol "$file" diff --git a/nsxiv/exec/key-handler b/nsxiv/exec/key-handler index 9e78004..53099e4 100755 --- a/nsxiv/exec/key-handler +++ b/nsxiv/exec/key-handler @@ -7,7 +7,7 @@ while read file; do cp "$file" ~/Pictures/background.png ;; *) - convert "$file" ~/Pictures/background.png + magick "$file" ~/Pictures/background.png ;; esac t -r hyprpaper diff --git a/nvim/after/ftplugin/rust.vim b/nvim/after/ftplugin/rust.vim new file mode 100644 index 0000000..7a152a7 --- /dev/null +++ b/nvim/after/ftplugin/rust.vim @@ -0,0 +1,2 @@ +:set formatoptions+=t +:set textwidth=80 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/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 new file mode 100644 index 0000000..c7cf7d5 --- /dev/null +++ b/python/pythonrc @@ -0,0 +1,40 @@ +try: + import atexit + import os + import sys + from pathlib import Path + import readline +except ImportError as e: + print(f"Couldn't load module. {e}") + sys.exit(1) + + +################ +# TAB COMPLETION # +################## + +try: + readline.parse_and_bind("tab: complete") +except ImportError: + pass + + +### XDG Compliant History File +# See https://gist.github.com/viliampucik/8713b09ff7e4d984b29bfcd7804dc1f4?permalink_comment_id=4582040#gistcomment-4582040 + +# 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__ + + +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) + +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) diff --git a/qt5ct/qt5ct.conf b/qt5ct/qt5ct.conf index 516eaab..964da53 100644 --- a/qt5ct/qt5ct.conf +++ b/qt5ct/qt5ct.conf @@ -1,13 +1,13 @@ [Appearance] -color_scheme_path=/usr/share/qt5ct/colors/darker.conf -custom_palette=false -icon_theme=Mint-X-Grey -standard_dialogs=xdgdesktopportal +color_scheme_path=/home/zachir/.config/qt5ct/style-colors.conf +custom_palette=true +icon_theme=Cosmic +standard_dialogs=gtk2 style=gtk2 [Fonts] -fixed=@Variant(\0\0\0@\0\0\0\x1e\0\x44\0\x65\0j\0\x61\0V\0u\0 \0L\0G\0\x43\0 \0S\0\x61\0n\0s@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10) -general=@Variant(\0\0\0@\0\0\0\x1e\0\x44\0\x65\0j\0\x61\0V\0u\0 \0L\0G\0\x43\0 \0S\0\x61\0n\0s@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10) +fixed="DejaVu LGC Sans,12,-1,5,50,0,0,0,0,0" +general="DejaVu LGC Sans,12,-1,5,50,0,0,0,0,0" [Interface] activate_item_on_single_click=1 @@ -25,7 +25,7 @@ underline_shortcut=1 wheel_scroll_lines=3 [SettingsWindow] -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x1\x95\0\0\0\xfb\0\0\x5\x45\0\0\x3\x93\0\0\x1\x96\0\0\0\xfc\0\0\x5\x44\0\0\x3\x92\0\0\0\0\0\0\0\0\a\x80\0\0\x1\x96\0\0\0\xfc\0\0\x5\x44\0\0\x3\x92) +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0H\0\0\x2T\0\0\x3\xdb\0\0\x4/\0\0\0H\0\0\x2T\0\0\x3\xdb\0\0\x4/\0\0\0\0\0\0\0\0\a\x80\0\0\0H\0\0\x2T\0\0\x3\xdb\0\0\x4/) [Troubleshooting] force_raster_widgets=1 diff --git a/qt6ct/qt6ct.conf b/qt6ct/qt6ct.conf index 810fb94..5d9a12c 100644 --- a/qt6ct/qt6ct.conf +++ b/qt6ct/qt6ct.conf @@ -1,8 +1,8 @@ [Appearance] color_scheme_path=/usr/share/qt6ct/colors/airy.conf custom_palette=false -icon_theme=Mint-X -standard_dialogs=xdgdesktopportal +icon_theme=Cosmic +standard_dialogs=gtk2 style=qt6gtk2 [Fonts] @@ -12,7 +12,7 @@ general="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1" [Interface] activate_item_on_single_click=1 buttonbox_layout=0 -cursor_flash_time=1000 +cursor_flash_time=1200 dialog_buttons_have_icons=1 double_click_interval=400 gui_effects=@Invalid() @@ -25,7 +25,7 @@ underline_shortcut=1 wheel_scroll_lines=3 [SettingsWindow] -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x3\x42\0\0\x3\xe7\0\0\0\0\0\0\0\0\0\0\x2\xde\0\0\x2\x46\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\x3\x42\0\0\x3\xe7) +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\xff\xff\xff\xfd\xff\xff\xff\xe2\0\0\a<\0\0\x3\xf9\0\0\0\0\0\0\0\0\0\0\a9\0\0\x3\xf6\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\a9\0\0\x3\xf6) [Troubleshooting] force_raster_widgets=1 diff --git a/runit/conf/logind.conf b/runit/conf/logind.conf new file mode 100644 index 0000000..c31f33a --- /dev/null +++ b/runit/conf/logind.conf @@ -0,0 +1,54 @@ +# This file is part of elogind. +# +# elogind is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# Entries in this file show the compile time defaults. +# You can change settings by editing this file. +# Defaults can be restored by simply deleting this file. +# +# See logind.conf(5) for details. + +[Login] +KillUserProcesses=yes +#KillOnlyUsers= +#KillExcludeUsers=root +#InhibitDelayMaxSec=5 +#HandlePowerKey=poweroff +#HandleSuspendKey=suspend +#HandleHibernateKey=hibernate +#HandleLidSwitch=suspend +#HandleLidSwitchExternalPower=suspend +#HandleLidSwitchDocked=ignore +#PowerKeyIgnoreInhibited=no +#SuspendKeyIgnoreInhibited=no +#HibernateKeyIgnoreInhibited=no +#LidSwitchIgnoreInhibited=yes +#HoldoffTimeoutSec=30s +#IdleAction=ignore +#IdleActionSec=30min +#RuntimeDirectorySize=10% +#RuntimeDirectoryInodes=400k +#RemoveIPC=yes +#InhibitorsMax=8192 +#SessionsMax=8192 + +[Sleep] +#AllowSuspend=yes +#AllowHibernation=yes +#AllowSuspendThenHibernate=yes +#AllowHybridSleep=yes +#AllowPowerOffInterrupts=no +#BroadcastPowerOffInterrupts=yes +#AllowSuspendInterrupts=no +#BroadcastSuspendInterrupts=yes +#HandleNvidiaSleep=no +#SuspendState=mem standby freeze +#SuspendMode= +#HibernateState=disk +#HibernateMode=platform shutdown +#HybridSleepState=disk +#HybridSleepMode=suspend platform shutdown +#HibernateDelaySec=10800 diff --git a/runit/sv/dunst/conf b/runit/sv/dunst/conf new file mode 100644 index 0000000..88353ef --- /dev/null +++ b/runit/sv/dunst/conf @@ -0,0 +1,9 @@ +# -*- mode: sh; -*- + +# Additional command line arguments for pipewire(1). +OPTS='' + +# Setting this to 1 enables logging, any other value - disables. +LOGGING_ENABLE=1 +# The directory will be created for you, if logging is enabled. +LOG_DIR="$HOME/.local/var/log/dunst" diff --git a/runit/sv/dunst/log/run b/runit/sv/dunst/log/run new file mode 100755 index 0000000..09818ce --- /dev/null +++ b/runit/sv/dunst/log/run @@ -0,0 +1,12 @@ +#!/bin/sh + +[ -r ../conf ] && . ../conf + +if [ "${LOGGING_ENABLE}x" = "1x" ]; then + # Create the log directory if not exists. + [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}" + + exec svlogd -tt "${LOG_DIR:-}" +else + exec chpst -b mpd-log-null cat >/dev/null +fi diff --git a/runit/sv/dunst/run b/runit/sv/dunst/run new file mode 100755 index 0000000..1c0aa88 --- /dev/null +++ b/runit/sv/dunst/run @@ -0,0 +1,5 @@ +#!/bin/sh + +[ -r ./conf ] && . ./conf + +exec dunst ${OPTS:-} 2>&1 diff --git a/runit/sv/mako/conf b/runit/sv/mako/conf new file mode 100644 index 0000000..6bb79d1 --- /dev/null +++ b/runit/sv/mako/conf @@ -0,0 +1,9 @@ +# -*- mode: sh; -*- + +# Additional command line arguments for pipewire(1). +OPTS='' + +# Setting this to 1 enables logging, any other value - disables. +LOGGING_ENABLE=1 +# The directory will be created for you, if logging is enabled. +LOG_DIR="$HOME/.local/var/log/mako" diff --git a/runit/sv/mako/down b/runit/sv/mako/down new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/runit/sv/mako/down diff --git a/runit/sv/mako/log/run b/runit/sv/mako/log/run new file mode 100755 index 0000000..09818ce --- /dev/null +++ b/runit/sv/mako/log/run @@ -0,0 +1,12 @@ +#!/bin/sh + +[ -r ../conf ] && . ../conf + +if [ "${LOGGING_ENABLE}x" = "1x" ]; then + # Create the log directory if not exists. + [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}" + + exec svlogd -tt "${LOG_DIR:-}" +else + exec chpst -b mpd-log-null cat >/dev/null +fi diff --git a/runit/sv/mako/run b/runit/sv/mako/run new file mode 100755 index 0000000..266f521 --- /dev/null +++ b/runit/sv/mako/run @@ -0,0 +1,5 @@ +#!/bin/sh + +[ -r ./conf ] && . ./conf + +exec mako ${OPTS:-} 2>&1 diff --git a/runit/sv/mpd-mpris/conf b/runit/sv/mpd-mpris/conf new file mode 100644 index 0000000..7b43455 --- /dev/null +++ b/runit/sv/mpd-mpris/conf @@ -0,0 +1,9 @@ +# -*- mode: sh; -*- + +# Additional command line arguments for pipewire(1). +OPTS='-network unix' + +# Setting this to 1 enables logging, any other value - disables. +LOGGING_ENABLE=0 +# The directory will be created for you, if logging is enabled. +LOG_DIR="$HOME/.local/var/log/mpd-mpris" diff --git a/runit/sv/mpd-mpris/log/run b/runit/sv/mpd-mpris/log/run new file mode 100755 index 0000000..09818ce --- /dev/null +++ b/runit/sv/mpd-mpris/log/run @@ -0,0 +1,12 @@ +#!/bin/sh + +[ -r ../conf ] && . ../conf + +if [ "${LOGGING_ENABLE}x" = "1x" ]; then + # Create the log directory if not exists. + [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}" + + exec svlogd -tt "${LOG_DIR:-}" +else + exec chpst -b mpd-log-null cat >/dev/null +fi diff --git a/runit/sv/mpd-mpris/run b/runit/sv/mpd-mpris/run new file mode 100755 index 0000000..3883e70 --- /dev/null +++ b/runit/sv/mpd-mpris/run @@ -0,0 +1,8 @@ +#!/bin/sh + +# Wait for the PipeWire Pulse daemon to start. +sv check "$HOME/.config/runit/sv/mpd" >/dev/null || exit 1 + +[ -r ./conf ] && . ./conf + +exec mpd-mpris ${OPTS:--network unix} 2>&1 diff --git a/runit/sv/mpd-notification/conf b/runit/sv/mpd-notification/conf new file mode 100644 index 0000000..e0b9aa3 --- /dev/null +++ b/runit/sv/mpd-notification/conf @@ -0,0 +1,9 @@ +# -*- mode: sh; -*- + +# Additional command line arguments for pipewire(1). +OPTS='' + +# Setting this to 1 enables logging, any other value - disables. +LOGGING_ENABLE=0 +# The directory will be created for you, if logging is enabled. +LOG_DIR="$HOME/.local/var/log/mpd-notification" diff --git a/runit/sv/mpd-notification/log/run b/runit/sv/mpd-notification/log/run new file mode 100755 index 0000000..09818ce --- /dev/null +++ b/runit/sv/mpd-notification/log/run @@ -0,0 +1,12 @@ +#!/bin/sh + +[ -r ../conf ] && . ../conf + +if [ "${LOGGING_ENABLE}x" = "1x" ]; then + # Create the log directory if not exists. + [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}" + + exec svlogd -tt "${LOG_DIR:-}" +else + exec chpst -b mpd-log-null cat >/dev/null +fi diff --git a/runit/sv/mpd-notification/run b/runit/sv/mpd-notification/run new file mode 100755 index 0000000..a643d56 --- /dev/null +++ b/runit/sv/mpd-notification/run @@ -0,0 +1,9 @@ +#!/bin/sh + +# Wait for the PipeWire Pulse daemon to start. +sv check "$HOME/.config/runit/sv/mpd" >/dev/null || exit 1 +sv check "$HOME/.config/runit/sv/mako" >/dev/null || exit 1 + +[ -r ./conf ] && . ./conf + +exec mpd-notification ${OPTS:-} 2>&1 diff --git a/runit/sv/mpd/conf b/runit/sv/mpd/conf new file mode 100644 index 0000000..ca3a82f --- /dev/null +++ b/runit/sv/mpd/conf @@ -0,0 +1,9 @@ +# -*- mode: sh; -*- + +# Additional command line arguments for pipewire(1). +OPTS='' + +# Setting this to 1 enables logging, any other value - disables. +LOGGING_ENABLE=0 +# The directory will be created for you, if logging is enabled. +LOG_DIR="$HOME/.local/var/log/mpd" diff --git a/runit/sv/mpd/log/run b/runit/sv/mpd/log/run new file mode 100755 index 0000000..09818ce --- /dev/null +++ b/runit/sv/mpd/log/run @@ -0,0 +1,12 @@ +#!/bin/sh + +[ -r ../conf ] && . ../conf + +if [ "${LOGGING_ENABLE}x" = "1x" ]; then + # Create the log directory if not exists. + [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}" + + exec svlogd -tt "${LOG_DIR:-}" +else + exec chpst -b mpd-log-null cat >/dev/null +fi diff --git a/runit/sv/mpd/run b/runit/sv/mpd/run new file mode 100755 index 0000000..b57d5ac --- /dev/null +++ b/runit/sv/mpd/run @@ -0,0 +1,8 @@ +#!/bin/sh + +# Wait for the PipeWire Pulse daemon to start. +sv check "$HOME/.config/runit/sv/pipewire-pulse" >/dev/null || exit 1 + +[ -r ./conf ] && . ./conf + +exec mpd --no-daemon --stderr ${OPTS:-} 2>&1 diff --git a/runit/sv/pipewire-pulse/conf b/runit/sv/pipewire-pulse/conf new file mode 100644 index 0000000..606eac5 --- /dev/null +++ b/runit/sv/pipewire-pulse/conf @@ -0,0 +1,12 @@ +# -*- mode: sh; -*- + +# Additional command line arguments for pipewire-pulse. +OPTS='' + +# Setting this to 1 enables logging, any other value - disables. +LOGGING_ENABLE=0 +# Set the pipewire log level. +# See: https://docs.pipewire.org/page_daemon.html#sec_logging +LOG_LEVEL=1 +# The directory will be created for you, if logging is enabled. +LOG_DIR="$HOME/.local/var/log/pipewire-pulse" diff --git a/runit/sv/pipewire-pulse/log/run b/runit/sv/pipewire-pulse/log/run new file mode 100755 index 0000000..ba8236e --- /dev/null +++ b/runit/sv/pipewire-pulse/log/run @@ -0,0 +1,12 @@ +#!/bin/sh + +[ -r ../conf ] && . ../conf + +if [ "${LOGGING_ENABLE}x" = "1x" ]; then + # Create the log directory if not exists. + [ -d "${LOG_DIR}" ] || mkdir -p "${LOG_DIR}" + + exec svlogd -tt "${LOG_DIR}" +else + exec chpst -b pipewire-pulse-log-null cat >/dev/null +fi diff --git a/runit/sv/pipewire-pulse/run b/runit/sv/pipewire-pulse/run new file mode 100755 index 0000000..0e43d6f --- /dev/null +++ b/runit/sv/pipewire-pulse/run @@ -0,0 +1,12 @@ +#!/bin/sh + +# Wait for the PipeWire Media Session daemon to start. +sv check "$HOME/.config/runit/sv/wireplumber" >/dev/null || exit 1 + +[ -r ./conf ] && . ./conf + +if [ "${LOGGING_ENABLE}x" = "1x" -a -n "${LOG_LEVEL}" ]; then + export PIPEWIRE_DEBUG="${LOG_LEVEL}" +fi + +exec pipewire-pulse ${OPTS:-} 2>&1 diff --git a/runit/sv/wireplumber/conf b/runit/sv/wireplumber/conf new file mode 100644 index 0000000..d712f03 --- /dev/null +++ b/runit/sv/wireplumber/conf @@ -0,0 +1,12 @@ +# -*- mode: sh; -*- + +# Additional command line arguments for wireplumber. +OPTS='' + +# Setting this to 1 enables logging, any other value - disables. +LOGGING_ENABLE=0 +# Set the wireplumber log level. +# See: https://pipewire.pages.freedesktop.org/wireplumber/daemon-logging.html +LOG_LEVEL=2 +# The directory will be created for you, if logging is enabled. +LOG_DIR="$HOME/.local/var/log/wireplumber" diff --git a/runit/sv/wireplumber/log/run b/runit/sv/wireplumber/log/run new file mode 100755 index 0000000..aa89d14 --- /dev/null +++ b/runit/sv/wireplumber/log/run @@ -0,0 +1,12 @@ +#!/bin/sh + +[ -r ../conf ] && . ../conf + +if [ "${LOGGING_ENABLE}x" == "1x" ]; then + # Create the log directory if not exists. + [ -d "${LOG_DIR}" ] || mkdir -p "${LOG_DIR}" + + exec svlogd -tt "${LOG_DIR}" +else + exec chpst -b wireplumber-log-null cat >/dev/null +fi diff --git a/runit/sv/wireplumber/run b/runit/sv/wireplumber/run new file mode 100755 index 0000000..5fb9edc --- /dev/null +++ b/runit/sv/wireplumber/run @@ -0,0 +1,12 @@ +#!/bin/sh + +# Wait for the PipeWire daemon to start. +sv check "$HOME/.config/runit/sv/pipewire" >/dev/null || exit 1 + +[ -r ./conf ] && . ./conf + +if [ "${LOGGING_ENABLE}x" = "1x" -a -n "${LOG_LEVEL}" ]; then + export WIREPLUMBER_DEBUG="${LOG_LEVEL}" +fi + +exec wireplumber ${OPTS:-} 2>&1 @@ -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,4 +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" @@ -3,7 +3,7 @@ export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"} export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"} export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"} . "$HOME/.config/user-dirs.dirs" -export XDG_CURRENT_DESKTOP="i3" +export XDG_CURRENT_DESKTOP="Hyprland" export XDG_DOCUMENTS_DIR=${HOME}/Documents export XDG_DOWNLOAD_DIR=${HOME}/Downloads export XDG_DESKTOP_DIR=${HOME}/Desktop @@ -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 @@ -36,7 +40,7 @@ export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages export RXVT_SOCKET="$XDG_RUNTIME_DIR"/urxvtd export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc -export ZDOTDIR=$HOME/.config/zsh +#export ZDOTDIR=$HOME/.config/zsh export CARGO_HOME="$XDG_DATA_HOME"/cargo export RUSTUP_HOME="$XDG_DATA_HOME"/rustup export WEECHAT_HOME="$XDG_CONFIG_HOME"/weechat @@ -50,17 +54,20 @@ 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 # Theming -export QT_QPA_PLATFORMTHEME=qt5ct +export QT_QPA_PLATFORMTHEME=qt6ct # Fix wayland stuff export MOZ_ENABLE_WAYLAND=1 @@ -113,6 +120,7 @@ addtopath "$HOME/.local/bin/blocks" addtopath "$HOME/.local/bin/ignore" addtopath "$HOME/.local/bin/volsv" addtopath "$HOME/.local/bin" +addtopath "$HOME/Downloads/Grayjay.Desktop-linux-x64-v2" addtopath "$HOME/.local/bin/flatpak-sc" addtopath "$HOME/.local/share/flatpak/exports/bin/" addtopath "$CARGO_HOME/bin" @@ -127,3 +135,17 @@ addtopath "/var/lib/flatpak/exports/bin" unset -f addtopath unset USERPATH unset PATHS + +command_not_found_handle() { +# don't run if not in a container + if [ ! -e /run/.containerenv ] && [ ! -e /.dockerenv ]; then + exit 127 + fi + + distrobox-host-exec "${@}" +} +if [ -n "${ZSH_VERSION-}" ]; then + command_not_found_handler() { + command_not_found_handle "$@" + } +fi diff --git a/tofi/colors b/tofi/colors new file mode 100644 index 0000000..047c875 --- /dev/null +++ b/tofi/colors @@ -0,0 +1,17 @@ +background-color = #000000 +outline-color = #198844 +border-color = #198844 +text-color = #ffffff +prompt-color = #198844 +prompt-background = #000000 +placeholder-color = #198844 +placeholder-background = #000000 +input-color = #ffffff +input-background = #000000 +default-result-background = #000000 +alternate-result-color = #ffffff +alternate-result-background = #000000 +selection-color = #000000 +selection-match-color = #39c1ed +selection-background = #198844 + diff --git a/tofi/cosmic b/tofi/cosmic new file mode 100644 index 0000000..9a5b4be --- /dev/null +++ b/tofi/cosmic @@ -0,0 +1,22 @@ +include = "themes/colors" + +hidden-character = "*" +anchor = top +width = 100% +height = 32 +horizontal = true +font-size = 18 +prompt-text = "" +font = Fira Code Nerd Font Mono +outline-width = 0 +border-width = 0 +min-input-width = 424 +result-spacing = 15 +padding-top = 0 +padding-bottom = 0 +padding-left = 0 +padding-right = 0 +history = false +selection-background-padding = 12 +result-spacing = 24 +require-match=false diff --git a/tofi/themes/colors b/tofi/themes/colors index a5f480c..047c875 100644 --- a/tofi/themes/colors +++ b/tofi/themes/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 diff --git a/nvim/init.vim b/vim/vimrc index 42fe34d..01156b5 100644 --- a/nvim/init.vim +++ b/vim/vimrc @@ -1,5 +1,20 @@ +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') + " 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 @@ -35,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 @@ -45,7 +60,7 @@ set showmatch " Highlight matching brace set number set relativenumber -colorscheme 256-grayvim +colorscheme Dark2 set hlsearch " Highlight all search results set smartcase " Enable smart-case search @@ -63,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 @@ -190,7 +202,7 @@ autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif " custom augroup {{{ augroup custom autocmd! - au BufEnter *.tex :LLPStartPreview + "au BufEnter *.tex :LLPStartPreview au BufEnter *.md :set textwidth=80 au BufEnter *.ms :set textwidth=80 "au BufEnter *.c :colo DevC++ @@ -200,7 +212,7 @@ augroup custom "au BufEnter *.cpp :colo DevC++ "au BufEnter *.hpp :colo DevC++ au BufWritePost init.vim :source % - au BufWritePost *.tex :make + "au BufWritePost *.tex :make au BufWritePost *sxhkdrc* :!pkill -USR1 -x sxhkd au BufWritePost .Xresources :!xrdb ~/.Xresources au BufWritePost .gitignore :!git add .gitignore @@ -243,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 @@ -286,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 2e6b691..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", @@ -104,42 +104,42 @@ }, "temperature#cpu0": { // "thermal-zone": 2, - "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "hwmon-path": "/sys/class/hwmon/hwmon3/temp1_input", "critical-threshold": 80, - // "format-critical": "CPU TCT {temperatureC}°C {icon}", - "format": "C{temperatureC}°C", + "format-critical": "CPU TCT {temperatureC}°C {icon}", + "format": "", "format-icons": ["", "", ""] }, "temperature#cpu1": { // "thermal-zone": 2, - "hwmon-path": "/sys/class/hwmon/hwmon2/temp3_input", + "hwmon-path": "/sys/class/hwmon/hwmon3/temp3_input", "critical-threshold": 80, - // "format-critical": "CPU TCC {temperatureC}°C {icon}", - "format": "C{temperatureC}°C", + "format-critical": "CPU TCC {temperatureC}°C {icon}", + "format": "", "format-icons": ["", "", ""] }, "temperature#gpu0": { // "thermal-zone": 2, - "hwmon-path": "/sys/class/hwmon/hwmon1/temp1_input", + "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", "critical-threshold": 100, - // "format-critical": "GPU EDG {temperatureC}°C {icon}", - "format": "G{temperatureC}°C", //°C + "format-critical": "GPU EDG {temperatureC}°C {icon}", + "format": "", //°C "format-icons": ["", "", ""] }, "temperature#gpu1": { // "thermal-zone": 2, - "hwmon-path": "/sys/class/hwmon/hwmon1/temp2_input", + "hwmon-path": "/sys/class/hwmon/hwmon2/temp2_input", "critical-threshold": 110, - // "format-critical": "GPU JUN {temperatureC}°C {icon}", - "format": "G{temperatureC}°C", + "format-critical": "GPU JUN {temperatureC}°C {icon}", + "format": "", "format-icons": ["", "", ""] }, "temperature#gpu2": { // "thermal-zone": 2, - "hwmon-path": "/sys/class/hwmon/hwmon1/temp3_input", + "hwmon-path": "/sys/class/hwmon/hwmon2/temp3_input", "critical-threshold": 105, - // "format-critical": "GPU MEM {temperatureC}°C {icon}", - "format": "G{temperatureC}°C", + "format-critical": "GPU MEM {temperatureC}°C {icon}", + "format": "", "format-icons": ["", "", ""] }, "backlight": { @@ -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":[ "mpd", "idle_inhibitor", "temperature#cpu0", "temperature#cpu1", "temperature#gpu0", "temperature#gpu1", "temperature#gpu2", "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 @@ -232,8 +221,8 @@ "18": "9", }, "persistent-workspaces": { - //"HDMI-A-1": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], - "HDMI-A-1": [ 10, 11, 12, 13, 14, 15, 16, 17, 18 ], + "HDMI-A-1": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], + //"HDMI-A-1": [ 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", @@ -298,42 +287,42 @@ }, "temperature#cpu0": { // "thermal-zone": 2, - "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "hwmon-path": "/sys/class/hwmon/hwmon3/temp1_input", "critical-threshold": 80, - // "format-critical": "CPU TCT {temperatureC}°C {icon}", - "format": "C{temperatureC}°C", + "format-critical": "CPU TCT {temperatureC}°C {icon}", + "format": "", "format-icons": ["", "", ""] }, "temperature#cpu1": { // "thermal-zone": 2, - "hwmon-path": "/sys/class/hwmon/hwmon2/temp3_input", + "hwmon-path": "/sys/class/hwmon/hwmon3/temp3_input", "critical-threshold": 80, - // "format-critical": "CPU TCC {temperatureC}°C {icon}", - "format": "C{temperatureC}°C", + "format-critical": "CPU TCC {temperatureC}°C {icon}", + "format": "", "format-icons": ["", "", ""] }, "temperature#gpu0": { // "thermal-zone": 2, - "hwmon-path": "/sys/class/hwmon/hwmon1/temp1_input", + "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", "critical-threshold": 100, - // "format-critical": "GPU EDG {temperatureC}°C {icon}", - "format": "G{temperatureC}°C", //°C + "format-critical": "GPU EDG {temperatureC}°C {icon}", + "format": "", "format-icons": ["", "", ""] }, "temperature#gpu1": { // "thermal-zone": 2, - "hwmon-path": "/sys/class/hwmon/hwmon1/temp2_input", + "hwmon-path": "/sys/class/hwmon/hwmon2/temp2_input", "critical-threshold": 110, - // "format-critical": "GPU JUN {temperatureC}°C {icon}", - "format": "G{temperatureC}°C", + "format-critical": "GPU JUN {temperatureC}°C {icon}", + "format": "", "format-icons": ["", "", ""] }, "temperature#gpu2": { // "thermal-zone": 2, - "hwmon-path": "/sys/class/hwmon/hwmon1/temp3_input", + "hwmon-path": "/sys/class/hwmon/hwmon2/temp3_input", "critical-threshold": 105, - // "format-critical": "GPU MEM {temperatureC}°C {icon}", - "format": "G{temperatureC}°C", + "format-critical": "GPU MEM {temperatureC}°C {icon}", + "format": "", "format-icons": ["", "", ""] }, "backlight": { diff --git a/waybar/style.css b/waybar/style.css index cf2ad88..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, @@ -91,7 +91,6 @@ window#waybar.hidden { #custom-wallpaper, #tags, #taskbar, -#tray, #mode, #idle_inhibitor, #mpd { @@ -126,7 +125,7 @@ window#waybar.hidden { } #battery.charging, #battery.plugged { - color: #26A65B; + color: #198844; background-color: #1b1d1c; } @@ -181,12 +180,12 @@ label:focus { color: #ffffff; } -#pulseaudio { +#wireplumber { background-color: #1b1d1c; color: #ffffff; } -#pulseaudio.muted { +#wireplumber.muted { background-color: #1b1d1c; color: #198844; } @@ -278,7 +277,7 @@ label:focus { } #tray { - background-color: #198844; + background-color: transparent; color: #ffffff; } diff --git a/xdg-desktop-portal/portals.conf b/xdg-desktop-portal/portals.conf new file mode 100644 index 0000000..b1a274e --- /dev/null +++ b/xdg-desktop-portal/portals.conf @@ -0,0 +1,4 @@ +[preferred] +default=hyprland +org.freedesktop.impl.portal.FileChooser=gtk +org.freedesktop.impl.portal.Settings=darkman diff --git a/xsettingsd/xsettingsd.conf b/xsettingsd/xsettingsd.conf index 27d09c3..c4ab3db 100644 --- a/xsettingsd/xsettingsd.conf +++ b/xsettingsd/xsettingsd.conf @@ -1,5 +1,5 @@ Net/ThemeName "Flat-Remix-GTK-Green-Darkest-Solid" -Net/IconThemeName "Mint-X" +Net/IconThemeName "Cosmic" Gtk/CursorThemeName "BreezeX-Black" Net/EnableEventSounds 1 EnableInputFeedbackSounds 0 diff --git a/yay/config.json b/yay/config.json index 0e764be..c06f416 100644 --- a/yay/config.json +++ b/yay/config.json @@ -1,7 +1,7 @@ { "aururl": "https://aur.archlinux.org", - "buildDir": "$HOME/.cache/yay", - "absdir": "$HOME/.cache/yay/abs", + "aurrpcurl": "https://aur.archlinux.org/rpc?", + "buildDir": "/home/zachir/.cache/yay", "editor": "nvim", "editorflags": "", "makepkgbin": "makepkg", @@ -9,9 +9,8 @@ "pacmanbin": "pacman", "pacmanconf": "/etc/pacman.conf", "redownload": "no", - "rebuild": "no", - "answerclean": "", - "answerdiff": "", + "answerclean": "All", + "answerdiff": "All", "answeredit": "", "answerupgrade": "", "gitbin": "git", @@ -21,23 +20,31 @@ "sortby": "votes", "searchby": "name-desc", "gitflags": "", - "removemake": "ask", + "removemake": "yes", "sudobin": "sudo", "sudoflags": "", + "version": "12.4.2", "requestsplitn": 150, - "sortmode": 0, "completionrefreshtime": 7, - "sudoloop": false, + "maxconcurrentdownloads": 1, + "bottomup": true, + "sudoloop": true, "timeupdate": false, "devel": false, - "cleanAfter": false, + "cleanAfter": true, + "keepSrc": false, "provides": true, "pgpfetch": true, - "upgrademenu": true, "cleanmenu": true, "diffmenu": true, - "editmenu": true, + "editmenu": false, "combinedupgrade": false, "useask": false, - "batchinstall": false + "batchinstall": false, + "singlelineresults": false, + "separatesources": true, + "debug": false, + "rpc": true, + "doubleconfirm": true, + "rebuild": "no" } diff --git a/zsh/.zlogout b/zsh/.zlogout deleted file mode 100644 index 33666be..0000000 --- a/zsh/.zlogout +++ /dev/null @@ -1 +0,0 @@ -rm -rf /tmp/xorg-awake diff --git a/zsh/.zprofile b/zsh/.zprofile deleted file mode 100644 index 1eae5e7..0000000 --- a/zsh/.zprofile +++ /dev/null @@ -1,6 +0,0 @@ -#export GDK_DPI_SCALE=0.7 - -#gnome_schema=org.gnome.desktop.interface -# -#gsettings set $gnome_schema gtk-theme 'Plata-Noir-Compact' -#gsettings set $gnome_schema icon-theme 'Papirus-Dark' diff --git a/zsh/.zshrc b/zsh/.zshrc deleted file mode 100644 index 00be912..0000000 --- a/zsh/.zshrc +++ /dev/null @@ -1,99 +0,0 @@ -HISTFILE="$ZDOTDIR"/hist -SAVEHIST=1000 -HISTSIZE=1000 -setopt APPEND_HISTORY -setopt HIST_FIND_NO_DUPS -setopt HIST_EXPIRE_DUPS_FIRST -setopt HIST_VERIFY -setopt HIST_IGNORE_DUPS -setopt INC_APPEND_HISTORY -setopt HIST_REDUCE_BLANKS - -_SH="zsh" - -if [ -f "$XDG_CONFIG_HOME"/sh/aliases ]; then - source "$XDG_CONFIG_HOME"/sh/aliases -fi -if [ -f "$XDG_CONFIG_HOME"/sh/functions ]; then - source "$XDG_CONFIG_HOME"/sh/functions -fi - -if [ -n "$ZDOTDIR"/.zshrc -a -f "$ZDOTDIR"/.zshrc ]; then - alias e='source "$ZDOTDIR"/.zshrc' -elif [ -f "$HOME"/.zshrc ]; then - alias e='source ~/.zshrc' -fi - -bindkey "^?" backward-delete-char - -# bindkey -v - -if [ "$TERM" = "st-256color" ] || [ "$TERM" = "xterm-256color" ]; then - function zle-line-init () { echoti smkx } - function zle-line-finish () { echoti rmkx } - - zle -N zle-line-init - zle -N zle-line-finish -fi - -unset COLOR1 -ZSHTHEMERC="${ZDOTDIR:-$HOME}/.zsh_theme" -[ -f "$ZSHTHEMERC" ] && . "$ZSHTHEMERC" - -if [ -z "$COLOR1" ]; then - case "$(whoami)" in - zachir) COLOR1="014" ;; - git) COLOR1="013" ;; - subsonic) COLOR1="012" ;; - *) COLOR1="015" ;; - esac -fi - -MYPROMPT='%B%S%F{'"$COLOR1"'}[%n@%m]:%f%s%F{015}%~%f%S%F{'"$COLOR1"'}%#%f%s%b ' -function zle-line-init zle-keymap-select { - VIM_PROMPT="%B%F{012}[%n@%m]:%f%F{015}%~%f%F{012}%#%f%b " - PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}" - #PS1="$PROMPT $KEYMAP" - zle reset-prompt -} - -unset COLOR1 - -zle -N zle-line-init -zle -N zle-keymap-select -export KEYTIMEOUT=1 - -fpath+="$ZDOTDIR/zfunc" - -autoload -Uz compinit promptinit -compinit -d $CONFIG/zcompdump -promptinit -autoload -Uz up-line-or-beginning-search down-line-or-beginning-search -zle -N up-line-or-beginning-search -zle -N down-line-or-beginning-search - -zstyle ':completion:*' menu select -zstyle ':completion::complete:*' gain-privileges 1 -zstyle ':completion:*' rehash true - -setopt COMPLETE_ALIASES -setopt AUTO_CD - -typeset -g -A key - -key[Up]="${terminfo[kcuu1]}" -key[Down]="${terminfo[kcud1]}" -key[Left]="${terminfo[kcub1]}" -key[Right]="${terminfo[kcuf1]}" -key[Shift-Tab]="${terminfo[kcbt]}" -key[Delete]="${terminfo[kdch1]}" - -[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search -bindkey -- '^[[A' up-line-or-beginning-search -bindkey -- '^[[B' down-line-or-beginning-search -[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search -[[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char -[[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char -[[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete -[[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char - @@ -1,4 +1,7 @@ # ZSH SPECIFIC CONFIGS 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" diff --git a/zsh/zshrc b/zsh/zshrc new file mode 100644 index 0000000..c25f285 --- /dev/null +++ b/zsh/zshrc @@ -0,0 +1,96 @@ +#zmodload zsh/zprof +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 +setopt APPEND_HISTORY +setopt HIST_FIND_NO_DUPS +setopt HIST_EXPIRE_DUPS_FIRST +setopt HIST_VERIFY +setopt HIST_IGNORE_DUPS +setopt INC_APPEND_HISTORY +setopt HIST_REDUCE_BLANKS +setopt COMPLETE_ALIASES +setopt AUTO_CD + +_SH="zsh" + +if [ -f "$XDG_CONFIG_HOME"/sh/aliases ]; then + source "$XDG_CONFIG_HOME"/sh/aliases +fi +if [ -f "$XDG_CONFIG_HOME"/sh/functions ]; then + source "$XDG_CONFIG_HOME"/sh/functions +fi + +if [ -f "$XDG_CONFIG_HOME/zsh/zshrc" ]; then + alias e='source "$XDG_CONFIG_HOME/zsh/zshrc"' +elif [ -f "$XDG_CONFIG_HOME/zshrc" ]; then + alias e='source "$XDG_CONFIG_HOME/zshrc"' +elif [ -f "$HOME"/.zshrc ]; then + alias e='source ~/.zshrc' +fi + +source ~/.zkbd/$TERM-${${DISPLAY:t}:-$VENDOR-$OSTYPE} + +#autoload zkbd; zkbd +bindkey -v +bindkey "${key[Backspace]}" backward-delete-char +bindkey "${key[Delete]}" delete-char +bindkey "${key[Home]}" beginning-of-line +bindkey "${key[End]}" end-of-line +bindkey "${key[PageUp]}" history-substring-search-up +bindkey "${key[PageDown]}" history-substring-search-down + +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=$'%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 +} + +zle -N zle-line-init +zle -N zle-keymap-select +export KEYTIMEOUT=1 + +fpath+="$XDG_CONFIG_HOME/zsh/zfunc" + +if [ -n "$ZPLUG_INSTALLED" ]; then + # zsh history substring search + zplug "zsh-users/zsh-history-substring-search", as:plugin + + bindkey "${key[Up]}" history-substring-search-up + bindkey "${key[Down]}" history-substring-search-down + bindkey -M vicmd "${key[Up]}" history-substring-search-up + bindkey -M vicmd "${key[Down]}" history-substring-search-down + bindkey -M vicmd "k" history-substring-search-up + bindkey -M vicmd "j" history-substring-search-down + + # zsh syntax highlighting + zplug "zsh-users/zsh-syntax-highlighting", defer:2 + + # load zsh plugins + zplug load +fi + +autoload -Uz compinit +compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION" + +zstyle ':completion:*' hosts off + +#zprof |