summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-10-27 00:13:17 +0300
committerThanos Apollo <[email protected]>2023-10-27 00:13:17 +0300
commitb23dfe545999faacbc46c46de0222eb3636f8b51 (patch)
tree47c9c1f471b2f6849e29539ea469ddd869e15c2e
parentd09eb6ddf23549ecff6698d61210418fb382c542 (diff)
autostart: Fix naming & rewrite
-rwxr-xr-x.config/autostart/autostart.sh30
-rw-r--r--.config/autstart/autostart.sh4
2 files changed, 30 insertions, 4 deletions
diff --git a/.config/autostart/autostart.sh b/.config/autostart/autostart.sh
new file mode 100755
index 0000000..87ee293
--- /dev/null
+++ b/.config/autostart/autostart.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+start-picom() {
+ if pgrep -x "picom" >/dev/null; then
+ echo "picom is already running"
+ else
+ picom
+ fi
+}
+
+set-wallpaper() {
+ if [ $HOSTNAME == zeus ]; then
+ feh --bg-scale ~/wallpapers/cyberpunk-red.png
+ else
+ feh --bg-scale ~/wallpapers/library-fantasy-tree.jpg
+ fi
+}
+
+get-started() {
+ (
+ start-picom
+ set-wallpaper
+ ## set keyboard
+ setxkbmap us -option ctrl:swapcaps &
+ )
+
+}
+
+
+get-started
diff --git a/.config/autstart/autostart.sh b/.config/autstart/autostart.sh
deleted file mode 100644
index aac6e22..0000000
--- a/.config/autstart/autostart.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-picom &
-feh --bg-scale ~/wallpapers/cyberpunk-red.png