Adding new conky style for smaller resolutions

This commit is contained in:
Derek Taylor
2023-08-27 17:05:22 -05:00
parent 5255f01c5b
commit 23b80c446f

View File

@@ -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