From 6839c3c8b311a1c1a692485c55c85a70fb886056 Mon Sep 17 00:00:00 2001 From: yage Date: Wed, 12 Nov 2025 13:22:40 -0700 Subject: [PATCH] updates to i3 config: - jumping to desktop 2 now automatically loads omni terminal if not already connected - 1password added to autostart - automatically reload xkeymap on i3 restart/reload --- config/bin/i3-utils | 5 +++++ config/bin/reload-xkeymap | 14 ++++++++++++++ config/i3.conf | 4 +++- .../desktop/xorg/i3/generate-config.module.zsh | 2 ++ scwrypts/heretic/heretic.scwrypts.zsh | 2 ++ 5 files changed, 26 insertions(+), 1 deletion(-) create mode 100755 config/bin/reload-xkeymap create mode 100644 scwrypts/heretic/heretic.scwrypts.zsh diff --git a/config/bin/i3-utils b/config/bin/i3-utils index 376a2c8..284fe89 100755 --- a/config/bin/i3-utils +++ b/config/bin/i3-utils @@ -12,6 +12,11 @@ command -v scwrypts &>/dev/null || { export CI=true export DESKTOP__SFX_PATH="${HOME}/Media/sfx" export SCWRYPTS_LOG_LEVEL=0 +case $(hostnamectl --static) in + ( pikachu ) + export DESKTOP__BACKLIGHT_DEVICE=amdgpu_bl1 + ;; +esac ##################################################################### diff --git a/config/bin/reload-xkeymap b/config/bin/reload-xkeymap new file mode 100755 index 0000000..69a20db --- /dev/null +++ b/config/bin/reload-xkeymap @@ -0,0 +1,14 @@ +#!/usr/bin/env zsh + +[ "${DISPLAY}" ] || DISPLAY=":0" + +XKEYMAP_FILE="${XDG_CONFIG_HOME:-${HOME}/.config}/X11/xkeymap" + +[ -f "${XKEYMAP_FILE}" ] || return 0 + +command -v xkbcomp &>/dev/null || { + echo "ERROR : missing 'xkbcomp' so I couldn't load ${XKEYMAP_FILE}" + return 1 +} + +xkbcomp "${XKEYMAP_FILE}" "${DISPLAY}" diff --git a/config/i3.conf b/config/i3.conf index 2d6945d..3adea3e 100644 --- a/config/i3.conf +++ b/config/i3.conf @@ -6,6 +6,8 @@ set $alt Mod1 set $mod Mod4 font pango:Monaspace Argon, pango:Noto Color Emoji, pango:Symbols Nerd Font 16 +exec --no-startup-id 1password + ################################################################################ ## Custom Utility ############################################################## ################################################################################ @@ -78,7 +80,7 @@ bindsym $mod+Shift+f focus parent; fullscreen; focus child bindsym $mod+BackSpace open bindsym $mod+1 workspace number "1"; exec --no-startup-id polybar-msg cmd show -bindsym $mod+2 workspace number "2"; exec --no-startup-id polybar-msg cmd hide +bindsym $mod+2 workspace number "2"; exec --no-startup-id polybar-msg cmd hide; exec --no-startup-id [[ $(tmux -L omni.socket list-clients 2>/dev/null | wc -l) -eq 0 ]] && i3-sensible-terminal bindsym $mod+3 workspace number "3"; exec --no-startup-id polybar-msg cmd show bindsym $mod+4 workspace number "4"; exec --no-startup-id polybar-msg cmd hide bindsym $mod+5 workspace number "5"; exec --no-startup-id polybar-msg cmd show diff --git a/scwrypts/dotwryn/desktop/xorg/i3/generate-config.module.zsh b/scwrypts/dotwryn/desktop/xorg/i3/generate-config.module.zsh index e228f7e..e972fc5 100644 --- a/scwrypts/dotwryn/desktop/xorg/i3/generate-config.module.zsh +++ b/scwrypts/dotwryn/desktop/xorg/i3/generate-config.module.zsh @@ -38,6 +38,8 @@ ${scwryptsmodule}() { echo "# - custom values : $CONFIG_DEFAULT_FILE" echo "# - override values : $CONFIG_OVERRIDE_FILE" + echo "exec_always --no-startup-id ${DOTWRYN}/config/bin/reload-xkeymap" + case $(GET .statusbar.type) in i3status ) echo 'set $refresh_statusbar killall -SIGUSR1 i3status' diff --git a/scwrypts/heretic/heretic.scwrypts.zsh b/scwrypts/heretic/heretic.scwrypts.zsh new file mode 100644 index 0000000..f6e36d1 --- /dev/null +++ b/scwrypts/heretic/heretic.scwrypts.zsh @@ -0,0 +1,2 @@ +readonly ${scwryptsgroup}__type=zsh +readonly ${scwryptsgroup}__color=$(utils.colors.blue)