aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2023-03-10 18:48:59 +0100
committerInigoGutierrez <inigogf.95@gmail.com>2023-03-10 18:48:59 +0100
commit66997994dfa762532dcf52e4834281f7368f0a08 (patch)
tree2cb554f6417cac2ca1dfcf3f1126f9acc5f878d5
parent872e287d1242a2baff74784f9245a4446c6455d3 (diff)
downloadscripts-66997994dfa762532dcf52e4834281f7368f0a08.tar.gz
scripts-66997994dfa762532dcf52e4834281f7368f0a08.zip
Initial wallpaper.
-rwxr-xr-xbspc/bspcDirectionFocus.sh19
-rwxr-xr-xtouchpad.sh3
-rwxr-xr-xwallpaper/setInitialWP.sh11
-rwxr-xr-xxinit.sh2
-rw-r--r--youtube-dl5
5 files changed, 32 insertions, 8 deletions
diff --git a/bspc/bspcDirectionFocus.sh b/bspc/bspcDirectionFocus.sh
index f36359b..2e76527 100755
--- a/bspc/bspcDirectionFocus.sh
+++ b/bspc/bspcDirectionFocus.sh
@@ -17,16 +17,25 @@ nodeStatus="$(bspc query -T -n)"
desktopStatus="$(bspc query -T -d)"
# If selected window is floating select floating in direction.
-# Else if layout is monocle and west or east select previous or next local window in direction.
-# Else select non-floating in direction.
+
if echo "$nodeStatus" | grep -q '"state":"floating'; then
bspc node --focus "$direction".floating
-elif echo "$desktopStatus" | grep -q '"layout":"monocle"'; then
- if [ "$direction" = "west" ]; then
+
+# Else if layout is monocle and north or south select previous or next local
+# window in direction. North and south are chosen over west and east so they
+# don't conflict when wanting to select a window in a different screen from a
+# monocle layout screen.
+
+elif echo "$desktopStatus" | grep -q '"layout":"monocle"' &&
+ echo "$direction" | grep -Eq '(north)|(south)'; then
+ if [ "$direction" = "north" ]; then
bspc node --focus prev.local.window.!floating
- elif [ "$direction" = "east" ]; then
+ elif [ "$direction" = "south" ]; then
bspc node --focus next.local.window.!floating
fi
+
+# Else select non-floating in direction.
+
else
bspc node --focus "$direction".!floating
fi
diff --git a/touchpad.sh b/touchpad.sh
index 377dc1f..e40c248 100755
--- a/touchpad.sh
+++ b/touchpad.sh
@@ -2,6 +2,5 @@
# Toggles the touchpad
- device="ETPS/2 Elantech Touchpad"
-#device="PS/2 Generic Mouse"
+device='Synaptics TM3145-007'
[ "$(xinput --list-props "$device" | grep -e "Device Enabled (.*):.*1")" ] && xinput disable "$device" || xinput enable "$device"
diff --git a/wallpaper/setInitialWP.sh b/wallpaper/setInitialWP.sh
new file mode 100755
index 0000000..fc5d271
--- /dev/null
+++ b/wallpaper/setInitialWP.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Sets the initial wallpaper: either a specific one if default is set or a random one if default is not set.
+
+defaultWP="$CONFIG_DEFAULTWP"
+
+if [ -f "$defaultWP" ]; then
+ wpPointer.sh "$defaultWP"
+else
+ setRandomWP.sh
+fi
diff --git a/xinit.sh b/xinit.sh
index 349cc5b..2fea079 100755
--- a/xinit.sh
+++ b/xinit.sh
@@ -8,7 +8,7 @@ xset -b
pgrep -x unclutter || unclutter --idle 1 &
#touchpad.sh
initialLayout.sh
-setRandomWP.sh
+setInitialWP.sh
pgrep -x sxhkd || sxhkd >~/logs/sxhkd.log &
# Swap Escape and Caps except Kyria keyboard is connected
diff --git a/youtube-dl b/youtube-dl
new file mode 100644
index 0000000..9497080
--- /dev/null
+++ b/youtube-dl
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# Wrapper for youtube-dl
+
+yt-dlp "$@"