From cebedf3e07949b6a38ac102d6381d722a0b2e709 Mon Sep 17 00:00:00 2001 From: yage Date: Wed, 26 Jun 2024 18:42:33 -0600 Subject: [PATCH] small tweaks for the home server; improved monitor detection; i3 "game" workspace; local plugin detection improvement; help docs; etc --- bin/altaria/default | 13 +++++++++++++ bin/altaria/xorg.zsh | 10 ++++++++++ config/code-activator.conf | Bin 1562 -> 1738 bytes config/i3.conf | 8 ++++++-- config/polybar.ini | 2 +- .../dotwryn/desktop/xorg/i3/launch-or-show | 7 +++++-- zsh/rc.d/19.plugins-local.zsh | 2 +- 7 files changed, 36 insertions(+), 6 deletions(-) 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 8f472a2fbd2f740cf40234ac5ae4aef88ee35310..67937c2f3b7cd79ba18aa8e719ff171dfdc096fa 100644 GIT binary patch delta 259 zcmbQmbBcEZD`P#EvtxX`i)T=2q+To1QN66O3CNqL{o38q@q!jnwXN4nU}4go2HaxGV`#gob1GCB%=v*U0y0zX [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 )) #####################################################################