From 23b80c446f8101257d9d05114176c55336e4e519 Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Sun, 27 Aug 2023 17:05:22 -0500 Subject: [PATCH] Adding new conky style for smaller resolutions --- .config/qtile/autostart.sh | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/.config/qtile/autostart.sh b/.config/qtile/autostart.sh index 4b082a2..6fe5434 100755 --- a/.config/qtile/autostart.sh +++ b/.config/qtile/autostart.sh @@ -14,19 +14,6 @@ elif xrandr | grep "1920x1080"; then else echo "Could not set a resolution." fi -### SETS CONKY STYLE BASED ON SCREEN RESOLUTION -# Checks screen resolution. If 1080p or higher, then we use '01' conky. -# If less than 1080p (laptops?), then we use the smaller '02' conky. -resolutionHeight=$(xrandr | grep "primary" | awk '{print $4}' | awk -F "+" '{print $1}' | awk -F 'x' '{print $2}') - -if [[ $resolutionHeight -ge 1080 ]]; then - sleep 2 && conky -c "$HOME"/.config/conky/qtile/01/"$COLORSCHEME".conkyrc & -elif [[ $resolutionHeight -lt 1080 ]]; then - sleep 2 && conky -c "$HOME"/.config/conky/qtile/02/"$COLORSCHEME".conkyrc & -else - sleep 2 && conky -c "$HOME"/.config/conky/qtile/02/"$COLORSCHEME".conkyrc & -fi - ### FIX EMACS ELPACA SYMLINKS ### # This runs the fix-elpaca-symlinks scripts which # fixes all of the symlinks in .config/emacs/elpaca/build. @@ -43,7 +30,6 @@ fi lxsession & picom & /usr/bin/emacs --daemon & -killall conky copyq & nm-applet & pamac-tray-icon-plasma & @@ -56,3 +42,22 @@ xargs xwallpaper --stretch < ~/.cache/wall & # find /usr/share/backgrounds/dtos-backgrounds/ -type f | shuf -n 1 | xargs xwallpaper --stretch & # 3. Uncomment to set wallpaper with nitrogen # nitrogen --restore & + +### SETS CONKY STYLE BASED ON SCREEN RESOLUTION +# Checks screen resolution. If 1080p or higher, then we use '01' conky. +# If less than 1080p (laptops?), then we use the smaller '02' conky. +resolutionHeight=$(xrandr | grep "primary" | awk '{print $4}' | awk -F "+" '{print $1}' | awk -F 'x' '{print $2}') + +if [[ $resolutionHeight -ge 1080 ]]; then + killall conky || echo "Conky not running." + sleep 2 + conky -c "$HOME"/.config/conky/qtile/01/"$COLORSCHEME".conkyrc || echo "Couldn't start conky." +elif [[ $resolutionHeight -lt 1080 ]]; then + killall conky || echo "Conky not running." + sleep 2 + conky -c "$HOME"/.config/conky/qtile/02/"$COLORSCHEME".conkyrc || echo "Couldn't start conky." +else + killall conky || echo "Conky not running." + sleep 2 + conky -c "$HOME"/.config/conky/qtile/02/"$COLORSCHEME".conkyrc || echo "Couldn't start conky." +fi