diff --git a/bin/altaria/default b/bin/altaria/default index 78ce745..c98b4f8 100755 --- a/bin/altaria/default +++ b/bin/altaria/default @@ -1,6 +1,19 @@ #!/bin/zsh source ${0:a:h}/xorg.zsh +case $MONITOR_CONFIGURATION in + home ) + ;; + unknown ) + echo 'unknown state; using default configuration to prevent monitor issues' + xrandr --output $(xrandr | grep ' connected' | awk '{print $1;}') --primary + scwrypts desktop i3 set background -- $(scwrypts -n get theme).jpg + $DOTWRYN/bin/polybar + scwrypts desktop play sound -- login + return 0 + ;; +esac + USE_SMOL=false xrandr -q | grep $XRANDR_OUTPUT__smol | grep -v 'disconnected' && { xrandr -q | grep $XRANDR_OUTPUT__smol | grep -qv primary && { diff --git a/bin/altaria/xorg.zsh b/bin/altaria/xorg.zsh index 773f738..c6eb43c 100644 --- a/bin/altaria/xorg.zsh +++ b/bin/altaria/xorg.zsh @@ -25,6 +25,16 @@ XRANDR_ARGS__smol__1080p=(--output $XRANDR_OUTPUT__smol --mode $XRANDR_RESOLUTIO ##################################################################### +MONITOR_CONFIGURATION=unknown + +: \ + && xrandr --query | grep -q "^$XRANDR_OUTPUT__office connected" \ + && xrandr --query | grep -q "^$XRANDR_OUTPUT__livingroom connected" \ + && MONITOR_CONFIGURATION=home \ + ; + +############################################################################### + XRANDR_SET() { local ERRORS=0 diff --git a/config/code-activator.conf b/config/code-activator.conf index 8f472a2..67937c2 100644 --- a/config/code-activator.conf +++ b/config/code-activator.conf @@ -5,9 +5,17 @@ # e.g. "$HOME/Projects/GitHub" will be called "GitHub" in the CLI # # directories must be fully-qualified -CA__DIRS=( - $([ -d "$HOME/Projects" ] && find "$HOME/Projects" -mindepth 1 -maxdepth 1 -type d | sed 's/\/$//') - ) + +CA__DIRS=() + +for __CA_DIR_LOOKUP in \ + "$HOME/Projects" \ + ; +do + __CA_DIR_LOOKUP="$(readlink -f -- "$__CA_DIR_LOOKUP")" + [ "$__CA_DIR_LOOKUP" ] && [ -d "$__CA_DIR_LOOKUP" ] && CA__DIRS+=($(find "$__CA_DIR_LOOKUP" -mindepth 1 -maxdepth 1 -type d | sed 's/\/$//')) +done +unset __CA_DIR_LOOKUP # additional cloning targets; MUST END IN ':' or '/' # e.g. 'git@my.githost.com:' or 'git@github.com:w0ryn/' diff --git a/config/i3.conf b/config/i3.conf index 9a8c70c..a2e6ca7 100644 --- a/config/i3.conf +++ b/config/i3.conf @@ -87,7 +87,7 @@ bindsym $mod+7 workspace number "7"; exec --no-startup-id polybar-msg cmd show bindsym $mod+8 workspace number "8"; exec --no-startup-id polybar-msg cmd hide bindsym $mod+9 workspace number "9"; exec --no-startup-id polybar-msg cmd show bindsym $mod+0 workspace number "0"; exec --no-startup-id polybar-msg cmd hide - +bindsym $mod+g workspace "🎮"; exec --no-startup-id polybar-msg cmd hide bindsym $mod+Shift+1 move container to workspace number "1" bindsym $mod+Shift+2 move container to workspace number "2" @@ -99,6 +99,7 @@ bindsym $mod+Shift+7 move container to workspace number "7" bindsym $mod+Shift+8 move container to workspace number "8" bindsym $mod+Shift+9 move container to workspace number "9" bindsym $mod+Shift+0 move container to workspace number "0" +bindsym $mod+Shift+g move container to workspace "🎮" mode "resize" { bindsym h resize grow width 10 px or 10 ppt @@ -121,7 +122,7 @@ floating_modifier $mod bindsym $mod+Shift+Tab move scratchpad bindsym $mod+Tab scratchpad show -set $GAMES_CLIENT_CLASSES ^(Steam)|(dolphin-emu)|(Visualboyadvance-m)|(steam_app_.*)$ +set $GAMES_CLIENT_CLASSES ^(steam)|(dolphin-emu)|(Visualboyadvance-m)|(steam_app_.*)$ bindsym $mod+Shift+x [class=$GAMES_CLIENT_CLASSES] scratchpad show set $TERMINAL_EMULATOR_CLASSES ^(Alacritty)$ @@ -141,6 +142,9 @@ for_window [window_type="dialog"] floating enable for_window [window_type="menu"] floating enable for_window [class="[xX]fce4-notifyd"] border pixel 0 +# gaming stuff +for_window [class="^steam_app_"] move container to workspace "🎮" + ################################################################################ ## i3 Settings ################################################################# ################################################################################ diff --git a/config/polybar.ini b/config/polybar.ini index 37893d7..1d08b56 100644 --- a/config/polybar.ini +++ b/config/polybar.ini @@ -26,7 +26,7 @@ separator = " " separator-foreground = ${colors.disabled} font-0 = Monaspace Krypton:style=Bold -font-1 = Noto Color Emoji:style=Regular +font-1 = Noto Color Emoji:style=Regular:scale=9; font-2 = Symbols Nerd Font:style=Regular font-3 = DejaVu Sans:style=Bold font-4 = Font Awesome 6 Free diff --git a/scwrypts/dotwryn/desktop/xorg/i3/launch-or-show b/scwrypts/dotwryn/desktop/xorg/i3/launch-or-show index ebaa5d3..b2674f0 100755 --- a/scwrypts/dotwryn/desktop/xorg/i3/launch-or-show +++ b/scwrypts/dotwryn/desktop/xorg/i3/launch-or-show @@ -4,10 +4,11 @@ use system/desktop/notify DEPENDENCIES+=(i3-msg xdotool xrandr) ##################################################################### -USAGE=" +USAGE__description=" usage: [client-class] [...options...] + " - options +USAGE__options=" -c, --client if different from the executable name, xprop CLIENT_CLASS -s, --scale (default: 0.8 or 0.5 if screen width >3000px) @@ -21,7 +22,9 @@ USAGE=" --has-statusbar-icon (default: false) use if program has a statusbar icon -h, --help print this message and exit + " +USAGE__description=" Makes it easy to bind appications to key shortcuts without having to spin up redundant instances or cycle through the scratchpad queue. diff --git a/zsh/rc.d/19.plugins-local.zsh b/zsh/rc.d/19.plugins-local.zsh index d685e07..c41e306 100644 --- a/zsh/rc.d/19.plugins-local.zsh +++ b/zsh/rc.d/19.plugins-local.zsh @@ -1,7 +1,7 @@ ##################################################################### ZSH_PLUGINS+=($( - find "$HOME/.local/zsh" -type f 2>/dev/null + find "$(readlink -f -- "$HOME/.local/zsh")" -type f 2>/dev/null )) #####################################################################