From e58fd2b158686e7911f68dafa1dc1d71f789c4a4 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Wed, 25 Sep 2024 14:50:17 -0500 Subject: Remove swaylock from hypridle and stop hyprlock fades Before, hypridle would launch swaylock before sleeping, but hyprlock when receiving the loginctl lock-session command. This has been fixed. In addition, hyprlock no longer fades. --- hypr/hypridle.conf | 2 +- hypr/hyprlock.conf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf index 9b6ea02..39ed177 100644 --- a/hypr/hypridle.conf +++ b/hypr/hypridle.conf @@ -1,7 +1,7 @@ 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 + before_sleep_cmd = hyprlock # 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) } diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf index 84d08ae..24208d6 100644 --- a/hypr/hyprlock.conf +++ b/hypr/hyprlock.conf @@ -2,8 +2,8 @@ general { disable_loading_bar = false hide_cursor = false grace = 0 - no_fade_in = false - no_fade_out = false + no_fade_in = true + no_fade_out = true ignore_empty_input = false } -- cgit v1.2.3 From 98c3c50c85ea56eff874e20ded11f22eaa2fa401 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Wed, 25 Sep 2024 14:51:14 -0500 Subject: Remove deprecated hyprland windowrules The Hyprland rules windowdance and forceinput seem to have been deprecated, and now cause an error in the newest version of Hyprland, so this removes those lines. --- hypr/hyprland.conf | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 652d4e1..2eac30c 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -182,9 +182,6 @@ plugin { # Example windowrule v2 # windowrulev2 = float, class:^(kitty)$, title:^(kitty)$ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more -windowrule = windowdance, ^(oneshot)$ -windowrule = windowdance, title:^(UNDERTALE)$ -windowrule = windowdance, title:^(Rhythm Doctor)$ windowrule = fullscreen, ^(Xephyr)$ windowrule = float, title:^(LibreWolf - Choose User Profile)$ windowrule = float, ^(xdg-desktop-portal-gtk) @@ -197,8 +194,6 @@ windowrulev2 = stayfocused, title:^(menu)$,class:^(yabridge-host.exe.so)$ windowrulev2 = minsize 1 1, title:^(menu)$,class:^(yabridge-host.exe.so)$ windowrulev2 = float, class:^(yabridge-host.exe.so)$, title:^(menu)$ windowrulev2 = float, floating:0, title:^(menu*) -windowrulev2 = forceinput, title:^(menu*) -windowrulev2 = windowdance, title:^(menu*) windowrule = workspace 2, title:^(REAPER .*initializing.*)$ windowrulev2 = tile, class:^(REAPER)$, title:^(.*REAPER v[0-9.]* - Licensed for personal/small business use)$ windowrule = tile, ^(WebApp-Qobuz[0-9]*)$ -- cgit v1.2.3 From 145327e622abb7c2000bc65f17c0ef741c061358 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Wed, 25 Sep 2024 14:52:45 -0500 Subject: Set persistent workspaces on eDP-1 in waybar This was already being done on HDMI-A-1 and eDP-1, so now this is also done for eDP-1 to make it a little more cross-platform friendly. --- waybar/config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/waybar/config b/waybar/config index e2dcc50..7a54e0c 100644 --- a/waybar/config +++ b/waybar/config @@ -40,8 +40,7 @@ "18": "9", }, "persistent-workspaces": { - "DP-1": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], - "HDMI-A-1": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], + "eDP-1": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], }, "on-scroll-up": "hyprctl dispatch split-workspace e+1", "on-scroll-down": "hyprctl dispatch split-workspace e-1", -- cgit v1.2.3 From 3489c08e374d6cde5c0268ccb356a6907f9a0d1a Mon Sep 17 00:00:00 2001 From: ZachIR Date: Wed, 25 Sep 2024 15:02:14 -0500 Subject: Ignore more directories --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 5bbe4db..f22368b 100644 --- a/.gitignore +++ b/.gitignore @@ -67,6 +67,7 @@ glib-2.0/ gnome-control-center/ gnome-initial-setup-done gnome-session/ +go/ goa-1.0/ godot/ gomuks/ @@ -108,6 +109,7 @@ Kitware/ kritadisplayrc kritarc ksh/history +kwalletrc lab/ lbry/ LBRY/ @@ -210,6 +212,7 @@ remmina/ Resonant DSP/ retroarch/ rncbc.org/ +.rt64/ rtorrent/ runit/sv/*/supervise runit/sv/*/*/supervise -- cgit v1.2.3 From 4adc7a808f10ec4133bf16fbceea49ec6ed1560a Mon Sep 17 00:00:00 2001 From: ZachIR Date: Thu, 31 Oct 2024 12:05:06 -0500 Subject: Add suspend timeout to hypridle --- hypr/hypridle.conf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf index 39ed177..df2b123 100644 --- a/hypr/hypridle.conf +++ b/hypr/hypridle.conf @@ -7,7 +7,13 @@ general { } listener { - timeout = 600 # in seconds + timeout = 300 # 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. } + +listener { + timeout = 360 # in seconds + on-timeout = systemctl suspend # command to run when timeout has passed + on-resume = # command to run when activity is detected after timeout has fired. +} -- cgit v1.2.3 From 5c939654efcbf64c57812d9e670f6f6566ae8be0 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Thu, 31 Oct 2024 12:05:37 -0500 Subject: Change hypridle, dunst, mpd hypr autostart to sysd I have accepted the systemd suck, so these are now mpd user services (although dunst and hypridle still have to be started by Hyprland). --- hypr/hyprland.conf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 2eac30c..9f1d55f 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -14,7 +14,7 @@ monitor = DP-1, 1920x1080@60, 1920x0, 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 @@ -23,7 +23,9 @@ exec-once = import-gsettings icon-theme 'Mint-X-Grey' exec-once = import-gsettings cursor-theme 'Breeze' exec-once = xrdb -load "$XDG_CONFIG_HOME"/X11/xresources exec-once = com.github.wwmm.easyeffects -exec-once = mpd +exec-once = systemctl --user start dunst +exec-once = systemctl --user start hypridle +#exec-once = mpd #}}} #{{{ env -- cgit v1.2.3 From 76b662c7b576f5af9294a1dbdc8b94b35a1059ab Mon Sep 17 00:00:00 2001 From: ZachIR Date: Thu, 31 Oct 2024 12:07:14 -0500 Subject: Float kdenlive popup in Hyprland --- hypr/hyprland.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 9f1d55f..40b1ade 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -190,6 +190,7 @@ windowrule = float, ^(xdg-desktop-portal-gtk) windowrule = float, title:^(UNDERTALE)$ windowrule = float, ^(Tk)$ windowrule = float, ^(lxqt-policykit-agent)$ +windowrule = float, ^(Kdenlive)$ windowrulev2 = stayfocused, title:^()$, class:^(steam)$ windowrulev2 = minsize 1 1, title:^()$, class:^(steam)$ windowrulev2 = stayfocused, title:^(menu)$,class:^(yabridge-host.exe.so)$ -- cgit v1.2.3 From c2595192b158918d570f87dec01c697b7db90d2f Mon Sep 17 00:00:00 2001 From: ZachIR Date: Thu, 31 Oct 2024 12:07:52 -0500 Subject: Add acpi-notify script shortcut to hypr --- hypr/hyprland.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 40b1ade..7b2d664 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -346,6 +346,7 @@ 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 #}}} -- cgit v1.2.3 From f627c6a471c89f3a13ef0dfee411dc6dbf18a0ee Mon Sep 17 00:00:00 2001 From: ZachIR Date: Thu, 31 Oct 2024 12:08:12 -0500 Subject: Add auto-cpufreq zsh completion --- zsh/.zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/zsh/.zshrc b/zsh/.zshrc index 00be912..a00f116 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -97,3 +97,4 @@ bindkey -- '^[[B' down-line-or-beg [[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete [[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char +eval "$(_AUTO_CPUFREQ_COMPLETE=zsh_source auto-cpufreq)" -- cgit v1.2.3 From 1aeb6934e5cd1babd19a56417d35b6fa1904f934 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Tue, 19 Nov 2024 12:43:33 -0600 Subject: Updates hypridle based on upstream The example config file works better than mine did, so I yoinked a bunch of stuff from it. --- hypr/hypridle.conf | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf index df2b123..f25f081 100644 --- a/hypr/hypridle.conf +++ b/hypr/hypridle.conf @@ -1,19 +1,34 @@ general { - lock_cmd = hyprlock # dbus/sysd lock command (loginctl lock-session) - unlock_cmd = # same as above, but unlock - before_sleep_cmd = hyprlock # 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 = 300 # 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 -s set 10 # 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 = 360 # in seconds - on-timeout = systemctl suspend # 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 -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 } -- cgit v1.2.3 From 01432500285b3f0440edddbd3020524f02647701 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Tue, 19 Nov 2024 12:45:02 -0600 Subject: Updates hyprland config to the latest version Shadow became its own category in Decorations, and an option in master disappeared, and a new one got added. --- hypr/hyprland.conf | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 7b2d664..097aa8a 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -110,10 +110,6 @@ misc { decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more rounding = 10 - drop_shadow = no - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) #{{{ Blur options blur { enabled = true @@ -123,6 +119,14 @@ decoration { xray = true } #}}} + #{{{ Shadow options + shadow { + enabled = false + range = 4 + render_power = 3 + color = 0xee1a1a1a + } + #}}} } #}}} @@ -157,9 +161,10 @@ master { # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more new_status = inherit new_on_top = true - no_gaps_when_only = false + #no_gaps_when_only = false orientation = left inherit_fullscreen = true + drop_at_cursor = true } #}}} -- cgit v1.2.3 From bc4303e0ff999fec14463f9405a7fc7add325477 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Tue, 19 Nov 2024 12:46:49 -0600 Subject: Modify hyprlock behavior Hide cursor and loading bar, and ignore empty input. --- hypr/hyprlock.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf index 24208d6..57f9fdd 100644 --- a/hypr/hyprlock.conf +++ b/hypr/hyprlock.conf @@ -1,10 +1,10 @@ general { - disable_loading_bar = false - hide_cursor = false + disable_loading_bar = true + hide_cursor = true grace = 0 no_fade_in = true no_fade_out = true - ignore_empty_input = false + ignore_empty_input = true } background { -- cgit v1.2.3 From 6f57f517e48b6b09ef190c241579cec002cfde3f Mon Sep 17 00:00:00 2001 From: ZachIR Date: Tue, 19 Nov 2024 12:47:56 -0600 Subject: Fix chmod issue with spaces in lf Chmod would not apply properly to files or folders with spaces in the path; this has been fixed now. --- lf/lfrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lf/lfrc b/lf/lfrc index 702fc2d..19c6051 100644 --- a/lf/lfrc +++ b/lf/lfrc @@ -51,9 +51,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 }} -- cgit v1.2.3 From 2b9df77bbc5fa85f94b15b043c659168a606d1db Mon Sep 17 00:00:00 2001 From: ZachIR Date: Tue, 19 Nov 2024 12:49:46 -0600 Subject: Define xdg-desktop-portal defaults Use Hyprland for default, and use lxqt file chooser. --- xdg-desktop-portal/portals.conf | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 xdg-desktop-portal/portals.conf diff --git a/xdg-desktop-portal/portals.conf b/xdg-desktop-portal/portals.conf new file mode 100644 index 0000000..faadd46 --- /dev/null +++ b/xdg-desktop-portal/portals.conf @@ -0,0 +1,3 @@ +[preferred] +default=hyprland +org.freedesktop.impl.portal.FileChooser=lxqt -- cgit v1.2.3 From 44fbfc95f779e5d6bbdaaf250ada4dfcdae5cb2a Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 18 Jan 2025 23:39:25 -0600 Subject: Cleanup zsh configs + add zplug Just a couple plugins for syntax highlighting and history searching, removing a bunch of old unused files, and changing to just accept the standard of using dotfiles in the home directory. --- Makefile | 16 +++++--- installers/set_zshdirs.sh | 13 ------ sh/profile | 2 +- zsh/.zlogout | 1 - zsh/.zprofile | 6 --- zsh/.zshenv | 5 --- zsh/.zshrc | 100 ---------------------------------------------- zsh/zshenv | 6 +++ zsh/zshrc | 72 +++++++++++++++++++++++++++++++++ 9 files changed, 90 insertions(+), 131 deletions(-) delete mode 100755 installers/set_zshdirs.sh delete mode 100644 zsh/.zlogout delete mode 100644 zsh/.zprofile delete mode 100644 zsh/.zshenv delete mode 100644 zsh/.zshrc create mode 100644 zsh/zshenv create mode 100644 zsh/zshrc diff --git a/Makefile b/Makefile index e27af0a..898fe9e 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,26 @@ VIM := $(shell command -v vim 2>/dev/null) NVIM := $(shell command -v nvim 2>/dev/null) -ZCONFS := zsh/.zshenv +ZCONFS := zsh/zshenv zsh/zshrc +SCONFS := sh/profile DCONFS := doas.conf all: -install: install-zshconfigs vimplug-vim vimplug-nvim +install: install-zshconfigs install-shconfigs vimplug-vim vimplug-nvim install-zshconfigs: $(ZCONFS) @echo "Installing zsh conf files..." - @echo "Setting ZSHDOTDIR globally..." - @$(shell sudo installers/set_zshdirs.sh) @echo ".zshenv..." - @ln -sf `pwd`/zsh/.zshenv ~/.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 ".profile..." + @ln -sf `pwd`/sh/profile ~/.profile + vimplug-vim: installers/vimplug_vim.sh ifdef VIM @echo "Installing vim-plug for vim..." diff --git a/installers/set_zshdirs.sh b/installers/set_zshdirs.sh deleted file mode 100755 index 2d82f19..0000000 --- a/installers/set_zshdirs.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -if [ -f /etc/zshenv ]; then - ZSHENV="/etc/zshenv" -elif [ -d /etc/zsh ]; then - ZSHENV="/etc/zsh/zshenv" -else - ZSHENV="/etc/zshenv" -fi - -if ! grep -q "ZDOTDIR" $ZSHENV 2>/dev/null; then - echo "export ZDOTDIR=\"\$HOME\"/.config/zsh" >> $ZSHENV -fi diff --git a/sh/profile b/sh/profile index de79a65..b83d012 100644 --- a/sh/profile +++ b/sh/profile @@ -36,7 +36,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 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/.zshenv b/zsh/.zshenv deleted file mode 100644 index f02f83a..0000000 --- a/zsh/.zshenv +++ /dev/null @@ -1,5 +0,0 @@ -# ZSH SPECIFIC CONFIGS -unset HISTFILE -export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" -[ -f /etc/profile ] && . /etc/profile -[ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile" diff --git a/zsh/.zshrc b/zsh/.zshrc deleted file mode 100644 index a00f116..0000000 --- a/zsh/.zshrc +++ /dev/null @@ -1,100 +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 - -eval "$(_AUTO_CPUFREQ_COMPLETE=zsh_source auto-cpufreq)" diff --git a/zsh/zshenv b/zsh/zshenv new file mode 100644 index 0000000..df0371e --- /dev/null +++ b/zsh/zshenv @@ -0,0 +1,6 @@ +# ZSH SPECIFIC CONFIGS +unset HISTFILE +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export skip_global_compinit=1 +[ -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..fb5b167 --- /dev/null +++ b/zsh/zshrc @@ -0,0 +1,72 @@ +#zmodload zsh/zprof +if [ -d "$HOME/.zplug" ]; then + export ZPLUG_INSTALLED="y" + source "$HOME/.zplug/init.zsh" +fi +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 + +bindkey -v + +MYPROMPT=$'%B%S%F{002}[%n@%m]%s\UE0B0%F{015}%~%S%F{002}\UE0B0%#%s\UE0B0%f%k%b ' +function zle-line-init zle-keymap-select { + VIM_PROMPT=$'%B%S%F{012}[%n@%m]%s\UE0B0%F{015}%~%S%F{012}\UE0B0%#%s\UE0B0%f%k%b ' + 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 '^[[A' history-substring-search-up + bindkey '^[[B' history-substring-search-down + bindkey -M vicmd '^[[A' history-substring-search-up + bindkey -M vicmd '^[[B' 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 + +#zprof -- cgit v1.2.3 From 461c7af7ef31feb1db7e39762011ca0e54242d76 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 18 Jan 2025 23:41:09 -0600 Subject: Remove kitty close confirmation This confirmation would prompt even if only the shell was open; not anymore. --- kitty/kitty.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/kitty.conf b/kitty/kitty.conf index ceeaf72..540419a 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. -- cgit v1.2.3