diff options
Diffstat (limited to 'dwm')
-rwxr-xr-x | dwm/.dwm/autostart | 16 | ||||
-rwxr-xr-x | dwm/.dwm/bar/bar.sh | 15 | ||||
-rwxr-xr-x | dwm/.dwm/bar/themes/dracula | 1 | ||||
-rw-r--r-- | dwm/README.md | 3 | ||||
-rw-r--r-- | dwm/chadwm/config.def.h | 11 |
5 files changed, 28 insertions, 18 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 diff --git a/dwm/README.md b/dwm/README.md index 58a64ce..3c49f3f 100644 --- a/dwm/README.md +++ b/dwm/README.md @@ -11,7 +11,6 @@ - rofi - flameshot - xbacklight -- pamixer - playerctl - xsecurelock @@ -32,7 +31,7 @@ # Install deps ```console -# pacman -S picom xorg-setxkbmap feh xorg-xinput dash imlib2 xorg-xsetroot alacritty flameshot rofi xorg-xbacklight pamixer playerctl xsecurelock +# pacman -S picom xorg-setxkbmap feh xorg-xinput dash imlib2 xorg-xsetroot alacritty flameshot rofi xorg-xbacklight playerctl xsecurelock ``` # Setup diff --git a/dwm/chadwm/config.def.h b/dwm/chadwm/config.def.h index a427cdd..032a381 100644 --- a/dwm/chadwm/config.def.h +++ b/dwm/chadwm/config.def.h @@ -130,9 +130,10 @@ static const char *rofi[] = {"rofi", "-show", "drun", NULL}; static const char *xi[] = {"xbacklight", "-inc", "7", NULL}; static const char *screenshotcmd[] = {"flameshot", "gui", NULL}; static const char *xd[] = {"xbacklight", "-dec", "7", NULL}; -static const char *volume_up_cmd[] = {"pamixer", "--allow-boost", "-i", "5", NULL}; -static const char *volume_down_cmd[] = {"pamixer", "--allow-boost", "-d", "5", NULL}; -static const char *volume_mute_toggle[] = {"pamixer", "-t", NULL}; +static const char *volume_up_cmd[] = {"pactl", "set-sink-volume", "@DEFAULT_SINK@", "+5%", NULL}; +static const char *volume_down_cmd[] = {"pactl", "set-sink-volume", "@DEFAULT_SINK@", "-5%", NULL}; +static const char *volume_mute_toggle[] = {"pactl", "set-sink-mute", "@DEFAULT_SINK@", "toggle", NULL}; +static const char *volume_mutemic_toggle[] = {"pactl", "set-source-mute", "@DEFAULT_SOURCE@", "toggle", NULL}; static const char *keyboard_brightness_up[] = {"xbacklight", "-ctrl", "asus::kbd_backlight", "-inc", "33", NULL}; static const char *keyboard_brightness_down[] = {"xbacklight", "-ctrl", "asus::kbd_backlight", @@ -140,7 +141,7 @@ static const char *keyboard_brightness_down[] = {"xbacklight", "-ctrl", "asus::k static const char *player_toggle[] = {"playerctl", "play-pause", NULL}; static const char *player_next[] = {"playerctl", "next", NULL}; static const char *player_previous[] = {"playerctl", "previous", NULL}; -static const char *screen_lock[] = {"dm-tool", "lock", NULL}; +static const char *screen_lock[] = {"xsecurelock", NULL}; static Key keys[] = { /* modifier key function argument */ @@ -157,6 +158,7 @@ static Key keys[] = { {0, XF86XK_AudioRaiseVolume, spawn, {.v = volume_up_cmd}}, {0, XF86XK_AudioLowerVolume, spawn, {.v = volume_down_cmd}}, {0, XF86XK_AudioMute, spawn, {.v = volume_mute_toggle}}, + {0, XF86XK_AudioMicMute, spawn, {.v = volume_mutemic_toggle}}, {0, XF86XK_AudioPlay, spawn, {.v = player_toggle}}, {0, XF86XK_AudioNext, spawn, {.v = player_next}}, {0, XF86XK_AudioPrev, spawn, {.v = player_previous}}, @@ -223,6 +225,7 @@ static Key keys[] = { {MODKEY | ShiftMask, XK_Left, dectag, {0}}, {MODKEY | ControlMask | ShiftMask, XK_Left, dectoggletag, {0}}, {MODKEY | ShiftMask, XK_0, tag, {.ui = ~0}}, + {MODKEY | ShiftMask | ControlMask, XK_0, tag, {.ui = 1}}, {MODKEY, XK_comma, focusmon, {.i = -1}}, {MODKEY, XK_period, focusmon, {.i = +1}}, {MODKEY | ShiftMask, XK_comma, tagmon, {.i = -1}}, |