summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-14 20:21:03 +0200
committerThanos Apollo <[email protected]>2023-12-14 20:21:03 +0200
commit7deffbc4b8fc13012472e36c064e0107590bd75e (patch)
tree0c04c8b572414ff6cd27b23c05e3340fa1d84602
parent1b6129ab5dc78cc4f15789dfdcb2f3f594d400c4 (diff)
Update autostart script
-rwxr-xr-x.config/autostart/autostart.sh46
1 files changed, 24 insertions, 22 deletions
diff --git a/.config/autostart/autostart.sh b/.config/autostart/autostart.sh
index 45592ec..8233781 100755
--- a/.config/autostart/autostart.sh
+++ b/.config/autostart/autostart.sh
@@ -1,33 +1,35 @@
#!/bin/bash
-WALLPAPER=~/wallpapers/library-fantasy-tree.jpg
+WALLPAPER=~/wallpapers/forest-deer-02.jpg
+HOSTNAME=$(hostname)
-start-picom() {
- if pgrep -x "picom" >/dev/null; then
- echo "picom is already running"
- else
- picom
- fi;
+function set_monitors() {
+ if [ "$HOSTNAME" == "zeus" ]; then
+ xrandr --output DisplayPort-0 --primary --mode 2560x1440 --pos 0x0 --rotate normal --output HDMI-A-0 --mode 1920x1080 --pos 2560x0 --rotate right
+ fi
+}
+
+function start_picom() {
+ pgrep -x picom > /dev/null || picom
}
-set-wallpaper() {
- if [ $HOSTNAME == zeus ]; then
- xwallpaper --focus $WALLPAPER --screen 0
+function set_wallpaper() {
+ local screen_option
+ if [ "$HOSTNAME" == "zeus" ]; then
+ xwallpaper --output DisplayPort-0 --stretch ~/wallpapers/forest-deer-02.jpg
+ xwallpaper --output HDMI-A-0 --stretch ~/wallpapers/science-01.jpg
else
- xwallpaper --focus $WALLPAPER
+ xwallpaper --focus ~/wallpapers/library-fantasy-tree.jpg
fi
}
-get-started() {
- (
- start-picom &
- set-wallpaper &
- syncthing --no-browser &
- transmission-daemon &
- setxkbmap us -option ctrl:swapcaps
- )
-
+function get_started() {
+ start_picom &
+ set_wallpaper &
+ syncthing --no-browser &
+ transmission-daemon &
+ set_monitors &
+ setxkbmap us -option ctrl:swapcaps
}
-
-get-started;
+get_started