mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-23 03:20:26 +10:00
Minor edits.
This commit is contained in:
@@ -2,29 +2,6 @@
|
||||
|
||||
COLORSCHEME=DoomOne
|
||||
|
||||
### CHECKS IF VIRTUAL MACHINE ###
|
||||
# If so, this sets an appropriate screen resolution.
|
||||
# This is needed as part of DTOS.
|
||||
if [[ $(systemd-detect-virt) = "none" ]]; then
|
||||
echo "Not running in a Virtual Machine";
|
||||
elif xrandr | grep "1366x768"; then
|
||||
xrandr -s 1366x768 || echo "Cannot set 1366x768 resolution.";
|
||||
elif xrandr | grep "1920x1080"; then
|
||||
xrandr -s 1920x1080 || echo "Cannot set 1920x1080 resolution.";
|
||||
else echo "Could not set a resolution."
|
||||
fi
|
||||
|
||||
### FIX EMACS ELPACA SYMLINKS ###
|
||||
# This runs the fix-elpaca-symlinks scripts which
|
||||
# fixes all of the symlinks in .config/emacs/elpaca/build.
|
||||
# This is needed as part of DTOS and is only run ONCE!
|
||||
if [[ -f "$HOME/.config/fix-elpaca-symlinks/log" ]]; then
|
||||
echo "fix-eplaca-symlinks has been run previously."
|
||||
else
|
||||
/usr/local/bin/fix-elpaca-symlinks
|
||||
touch "$HOME/.config/fix-elpaca-symlinks/log"
|
||||
echo "has-been-run: TRUE" > "$HOME/.config/fix-elpaca-symlinks/log"
|
||||
fi
|
||||
|
||||
### AUTOSTART PROGRAMS ###
|
||||
lxsession &
|
||||
@@ -32,6 +9,8 @@ picom --daemon &
|
||||
/usr/bin/emacs --daemon &
|
||||
nm-applet &
|
||||
"$HOME"/.screenlayout/layout.sh &
|
||||
sleep 1
|
||||
conky -c "$HOME"/.config/conky/qtile/01/"$COLORSCHEME".conf || echo "Couldn't start conky."
|
||||
|
||||
### UNCOMMENT ONLY ONE OF THE FOLLOWING THREE OPTIONS! ###
|
||||
# 1. Uncomment to restore last saved wallpaper
|
||||
@@ -40,24 +19,3 @@ 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.
|
||||
# You can also set these to values '03' and '04' if you want a fancier
|
||||
# conky that displays lua rings and sensor information.
|
||||
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".conf || 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".conf || echo "Couldn't start conky."
|
||||
else
|
||||
killall conky || echo "Conky not running."
|
||||
sleep 2
|
||||
conky -c "$HOME"/.config/conky/qtile/02/"$COLORSCHEME".conf || echo "Couldn't start conky."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user