summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-x.local/bin/b-bar1
-rwxr-xr-x.local/bin/dmenu-pamixer4
-rwxr-xr-x.local/bin/dmenu-pavols4
3 files changed, 5 insertions, 4 deletions
diff --git a/.local/bin/b-bar b/.local/bin/b-bar
index cfcd4cc..8f23563 100755
--- a/.local/bin/b-bar
+++ b/.local/bin/b-bar
@@ -17,6 +17,7 @@ do
;;
*)
b0="/sys/class/power_supply/BAT0"
+ [ "$h" = "anahita" ] && b0="/sys/class/power_supply/sbs-9-000b"
bat="$(cat $b0/capacity)"
# batl="$(cat $b0/capacity_level)"
printf "%s%% | %s | %s | %s\n" \
diff --git a/.local/bin/dmenu-pamixer b/.local/bin/dmenu-pamixer
deleted file mode 100755
index cd5926a..0000000
--- a/.local/bin/dmenu-pamixer
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-cur=$(pamixer --get-volume)
-val=$(dmenu -fn 'Source Code Pro Medium-10.5' -p "volume ($cur):" < /dev/null)
-[ -n "$val" ] && pamixer --set-volume "$val"
diff --git a/.local/bin/dmenu-pavols b/.local/bin/dmenu-pavols
new file mode 100755
index 0000000..0b840ad
--- /dev/null
+++ b/.local/bin/dmenu-pavols
@@ -0,0 +1,4 @@
+#!/bin/sh
+cur=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '\d+(?=%)' | head -n1)
+val=$(dmenu -fn 'Source Code Pro Medium-10.5' -p "volume ($cur):" < /dev/null)
+[ -n "$val" ] && pactl set-sink-volume @DEFAULT_SINK@ "${val}%"