aboutsummaryrefslogtreecommitdiff
path: root/dwm/.dwm
diff options
context:
space:
mode:
Diffstat (limited to 'dwm/.dwm')
-rwxr-xr-xdwm/.dwm/autostart16
-rwxr-xr-xdwm/.dwm/bar/bar.sh15
-rwxr-xr-xdwm/.dwm/bar/themes/dracula1
3 files changed, 20 insertions, 12 deletions
diff --git a/dwm/.dwm/autostart b/dwm/.dwm/autostart
index f793957..b288134 100755
--- a/dwm/.dwm/autostart
+++ b/dwm/.dwm/autostart
@@ -13,16 +13,16 @@ feh --auto-reload --bg-fill /usr/share/backgrounds/background.png &
# Set up touchpad controls
# Libinput
-TID=$(xinput | sed -n 's/.*Touchpad.*id=\([0-9]*\).*/\1/p')
-#xinput --set-prop $TID 'libinput Accel Speed' 0.5
-xinput --set-prop $TID 'libinput Tapping Enabled' 1 &
-xinput --set-prop $TID 'libinput Natural Scrolling Enabled' 1 &
+#TID=$(xinput | sed -n 's/.*Touchpad.*id=\([0-9]*\).*/\1/p')
+##xinput --set-prop $TID 'libinput Accel Speed' 0.5
+#xinput --set-prop $TID 'libinput Tapping Enabled' 1 &
+#xinput --set-prop $TID 'libinput Natural Scrolling Enabled' 1 &
# Synapse
-#TID=`xinput list | grep "SynPS/2 Synaptics TouchPad" | sed 's/.*id=\([0-9]*\).*/\1/g'`
-#PROP_NO=`xinput list-props ${TID} | grep "Synaptics Scrolling Distance" | sed 's/.*(\([0-9]*\)).*/\1/g'`
-#xinput --set-prop $TID 'Synaptics Tap Action' 1
-#xinput set-prop ${TID} ${PROP_NO} -106 -106
+TID=`xinput list | grep "SynPS/2 Synaptics TouchPad" | sed 's/.*id=\([0-9]*\).*/\1/g'`
+PROP_NO=`xinput list-props ${TID} | grep "Synaptics Scrolling Distance" | sed 's/.*(\([0-9]*\)).*/\1/g'`
+xinput --set-prop $TID 'Synaptics Tap Action' 1
+xinput set-prop ${TID} ${PROP_NO} -106 -106
# run bar script and dwm ( do not remove this )
SYMLINKDIR=$(readlink -f "$0")
diff --git a/dwm/.dwm/bar/bar.sh b/dwm/.dwm/bar/bar.sh
index 796453c..65eb35e 100755
--- a/dwm/.dwm/bar/bar.sh
+++ b/dwm/.dwm/bar/bar.sh
@@ -44,8 +44,8 @@ battery() {
}
brightness() {
- brightness="$(cat /sys/class/backlight/intel_backlight/brightness)"
- brightness_max="$(cat /sys/class/backlight/intel_backlight/max_brightness)"
+ brightness="$(cat /sys/class/backlight/*/brightness)"
+ brightness_max="$(cat /sys/class/backlight/*/max_brightness)"
level=$(echo "scale=2; $brightness / $brightness_max * 100" | bc)
printf "^c$red^  "
@@ -70,8 +70,15 @@ clock() {
}
volume() {
- volume_status="$(pamixer --get-volume-human)"
- printf "^c$blue^ 🔊 $volume_status"
+ pactl_output="$(pactl list sinks )"
+ is_mute="$(echo "$pactl_output" | grep Mute | grep -oE "yes|no")"
+ if [ $is_mute = "yes" ]
+ then
+ printf "^c$red^ 🔇 mute"
+ else
+ volume_status="$(echo "$pactl_output" | grep olume | grep -oE "\w+%" | head -n 1)"
+ printf "^c$yellow^ 🔊 %s" $volume_status
+ fi
}
keyboard() {
diff --git a/dwm/.dwm/bar/themes/dracula b/dwm/.dwm/bar/themes/dracula
index ea2b4f4..6f7a699 100755
--- a/dwm/.dwm/bar/themes/dracula
+++ b/dwm/.dwm/bar/themes/dracula
@@ -9,3 +9,4 @@ grey=#282a36
blue=#d6acff
red=#ff5555
darkblue=#bd93f9
+yellow=#f1fa8c