diff --git a/config/NetworkManager/wifi-powersave-off.conf b/config/NetworkManager/wifi-powersave-off.conf new file mode 100644 index 0000000..111af0b --- /dev/null +++ b/config/NetworkManager/wifi-powersave-off.conf @@ -0,0 +1,2 @@ +[connection] +wifi.powersave = 2 diff --git a/config/fish/conf.d/gpg.fish b/config/fish/conf.d/gpg.fish new file mode 100644 index 0000000..18f63a5 --- /dev/null +++ b/config/fish/conf.d/gpg.fish @@ -0,0 +1,4 @@ +# Tell gpg-agent about the current terminal on each interactive login +if status is-interactive + gpg-connect-agent updatestartuptty /bye >/dev/null 2>&1 +end diff --git a/config/fish/config.fish b/config/fish/config.fish index 640112d..bc4abfc 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -12,3 +12,8 @@ if test -f /etc/profile.d/lang.sh end set -gx LANG en_US.UTF-8 + +# GPG: ensure pinentry-curses can find the terminal (only in interactive shells) +if status is-interactive + set -gx GPG_TTY (tty) +end diff --git a/config/gnupg/gpg-agent.conf b/config/gnupg/gpg-agent.conf new file mode 100644 index 0000000..e0a1ff7 --- /dev/null +++ b/config/gnupg/gpg-agent.conf @@ -0,0 +1,2 @@ +allow-emacs-pinentry +pinentry-program /usr/bin/pinentry-curses diff --git a/config/wezterm/wezterm.lua b/config/wezterm/wezterm.lua index fe49edd..ee594c8 100644 --- a/config/wezterm/wezterm.lua +++ b/config/wezterm/wezterm.lua @@ -11,6 +11,7 @@ config.font = wezterm.font_with_fallback { config.font_size = 14 config.enable_tab_bar = false +config.audible_bell = "Disabled" -- Wayland-specific settings config.enable_wayland = true diff --git a/config/xinitrc b/config/xinitrc index df39661..c8a7b8a 100644 --- a/config/xinitrc +++ b/config/xinitrc @@ -6,4 +6,9 @@ mkdir -p /run/user/$(id -u) chmod 700 /run/user/$(id -u) +# Start PipeWire audio stack +pipewire & +pipewire-pulse & +wireplumber & + exec stumpwm diff --git a/config/yazi/openers.toml b/config/yazi/openers.toml index e96b7fb..4d14cca 100755 --- a/config/yazi/openers.toml +++ b/config/yazi/openers.toml @@ -1,4 +1,4 @@ [[open]] name = "Images" extensions = ["gif"] -exec = "sxiv \"$1\"" +exec = "nsxiv \"$1\"" diff --git a/config/yazi/yazi.toml b/config/yazi/yazi.toml index 8342138..0416a1c 100755 --- a/config/yazi/yazi.toml +++ b/config/yazi/yazi.toml @@ -7,7 +7,7 @@ max_height = 1400 [opener] image = [ - { run = 'sxiv "$@"', desc = "sxiv" }, + { run = 'nsxiv "$@"', desc = "nsxiv" }, ] video = [ { run = 'mpv "$@"', desc = "mpv" }, diff --git a/config/zathura/zathurarc b/config/zathura/zathurarc new file mode 100644 index 0000000..c312d11 --- /dev/null +++ b/config/zathura/zathurarc @@ -0,0 +1,40 @@ +# Zathura config - OceanicNext theme + +# --- Recolor (dark mode) --- +set recolor true +set recolor-lightcolor "#1B2B34" # bg +set recolor-darkcolor "#CDD3DE" # fg +set recolor-keephue true + +# --- UI Colors --- +set default-bg "#1B2B34" # bg +set default-fg "#CDD3DE" # fg + +set statusbar-bg "#0F1B22" # bg-alt +set statusbar-fg "#CDD3DE" # fg + +set inputbar-bg "#0F1B22" # bg-alt +set inputbar-fg "#CDD3DE" # fg + +set notification-bg "#0F1B22" +set notification-fg "#CDD3DE" +set notification-error-bg "#0F1B22" +set notification-error-fg "#EC5F67" # urgent/red +set notification-warning-bg "#0F1B22" +set notification-warning-fg "#FAC863" # yellow + +set highlight-color "#99C794" # accent/green (search highlight) +set highlight-active-color "#5FB3B3" # teal (active match) + +set completion-bg "#0F1B22" +set completion-fg "#CDD3DE" +set completion-highlight-bg "#2B3B44" # bg-sel +set completion-highlight-fg "#99C794" # accent + +set render-loading-bg "#1B2B34" +set render-loading-fg "#CDD3DE" + +# --- Behavior --- +set window-title-home-tilde true +set statusbar-home-tilde true +set selection-clipboard clipboard diff --git a/emacs-config.org b/emacs-config.org index 78d42e1..0797db9 100644 --- a/emacs-config.org +++ b/emacs-config.org @@ -449,7 +449,7 @@ Setting this in the :init of evil doesn't work for some reason. It has to be ear (use-package dired-open :config - (setq dired-open-extensions '(("png" . "sxiv") + (setq dired-open-extensions '(("png" . "nsxiv") ("mkv" . "mpv") ("avi" . "mpv")))) ;; (eval-after-load 'evil diff --git a/link.sh b/link.sh index bce385a..7b7cc4c 100755 --- a/link.sh +++ b/link.sh @@ -35,6 +35,17 @@ backup_and_link "$DOTFILES/config/nyxt" "$HOME/.config/nyxt" backup_and_link "$DOTFILES/config/yazi" "$HOME/.config/yazi" backup_and_link "$DOTFILES/config/rofi" "$HOME/.config/rofi" +backup_and_link "$DOTFILES/config/zathura" "$HOME/.config/zathura" + +# GPG: link individual files to preserve ~/.gnupg's required 700 permissions +mkdir -p "$HOME/.gnupg" +chmod 700 "$HOME/.gnupg" +backup_and_link "$DOTFILES/config/gnupg/gpg-agent.conf" "$HOME/.gnupg/gpg-agent.conf" + +# pinentry-smart: TUI-aware wrapper (curses normally, tty inside senpai/mutt/etc.) +mkdir -p "$HOME/.local/bin" +backup_and_link "$DOTFILES/scripts/pinentry-smart" "$HOME/.local/bin/pinentry-smart" +chmod +x "$DOTFILES/scripts/pinentry-smart" # GTK themes backup_and_link "$DOTFILES/config/gtk-2.0/gtkrc" "$HOME/.gtkrc-2.0" @@ -55,6 +66,10 @@ if [ "$EUID" -eq 0 ]; then backup_and_link "$DOTFILES/config/kanata/rc.kanata" "/etc/rc.d/rc.kanata" chmod +x /etc/rc.d/rc.kanata + # NetworkManager: disable wifi power saving (fixes MT7922 radio drops) + mkdir -p /etc/NetworkManager/conf.d + backup_and_link "$DOTFILES/config/NetworkManager/wifi-powersave-off.conf" "/etc/NetworkManager/conf.d/wifi-powersave-off.conf" + if ! grep -q "rc.kanata" /etc/rc.d/rc.local; then echo "" >> /etc/rc.d/rc.local echo "# Start kanata key remapper" >> /etc/rc.d/rc.local diff --git a/scripts/pinentry-smart b/scripts/pinentry-smart new file mode 100755 index 0000000..ad8c378 --- /dev/null +++ b/scripts/pinentry-smart @@ -0,0 +1,27 @@ +#!/bin/bash +# pinentry-smart: use pinentry-curses normally, but fall back to pinentry-tty +# when another TUI (e.g. senpai) already owns the terminal/ncurses context. +# +# Detection: walk up the process tree. If we find a known TUI app before +# reaching a shell or login, assume the terminal is taken. + +is_tui_parent() { + local pid="$PPID" + local tui_apps="senpai mutt neomutt irssi weechat ncmpcpp ranger vifm" + for _ in $(seq 1 10); do + [[ -z "$pid" || "$pid" -le 1 ]] && break + local cmd + cmd=$(ps -o comm= -p "$pid" 2>/dev/null) + for app in $tui_apps; do + [[ "$cmd" == "$app" ]] && return 0 + done + pid=$(ps -o ppid= -p "$pid" 2>/dev/null | tr -d ' ') + done + return 1 +} + +if is_tui_parent; then + exec /usr/bin/pinentry-tty "$@" +else + exec /usr/bin/pinentry-curses "$@" +fi diff --git a/slackware.sqg b/slackware.sqg index f385635..4fea91f 100644 --- a/slackware.sqg +++ b/slackware.sqg @@ -124,7 +124,7 @@ stfl stow sutils sxhkd -sxiv +nsxiv symbola-font-ttf syncthing task