Commit Diff


commit - c59b99d9c3143893529f77c6e1839d9fa977578d
commit + ef7fe42716fdf7eeecc2fcc7221ec39c60cd5776
blob - a206c6f0d8c9ca2668d396180297ed96aa68aa03
blob + 4153d5afd85422feba05813413df983a9c908ebd
--- home/.config/polybar/config.ini
+++ home/.config/polybar/config.ini
@@ -27,7 +27,7 @@ padding = 1
 module-margin = 1
 
 modules-left = xworkspaces title
-modules-right = pulseaudio temp battery date
+modules-right = sndio-volume temp battery date
 
 [module/xworkspaces]
 type = internal/xworkspaces
@@ -64,21 +64,21 @@ label-empty-foreground = ${colors.disabled}
 label-empty-padding = 1
 label-empty-margin = 2px
 
+[module/sndio-volume]
+type = custom/script
+interval = 1
+exec = sh -c 'm=$(sndioctl -n output.mute 2>/dev/null); l=$(sndioctl -n output.level 2>/dev/null); [ -z "$l" ] && echo "vol: ?" && exit; [ "$m" = 1 ] && echo "vol: x" || echo "vol: $(awk "BEGIN{print int($l*100+0.5)}")%"'
+label = %output%
+label-foreground = ${colors.foreground}
+label-padding = 1
+click-left = sndioctl output.mute=!
+scroll-up = sndioctl output.level=+0.05
+scroll-down = sndioctl output.level=-0.05
+
 [module/title]
 type = internal/xwindow
 label = %title:0:60:...%
 label-empty =
-
-[module/pulseaudio]
-type = internal/pulseaudio
-
-format-volume-prefix = "vol: "
-format-volume-prefix-foreground = ${colors.foreground}
-format-volume = <label-volume>
-label-volume-foreground = ${colors.foreground}
-label-volume-padding = 1 
-label-volume = %percentage%%
-label-muted-padding = 1 
 label-muted = "vol: x"
 
 [module/temp]
blob - 0c1aabd4c1ca7ab18430af679e6a7e4f1253a32b
blob + abf04d55c23851590a284f7778c4d71b3c1d6cfd
--- home/.tmux.conf
+++ home/.tmux.conf
@@ -24,6 +24,13 @@ setw -g pane-base-index 1
 
 setw -g renumber-windows on
 
+# Copy selection to X11 clipboard
+bind-key -T copy-mode C-w send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"
+bind-key -T copy-mode M-w send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"
+
+# Paste X11 clipboard into tmux
+bind-key P run-shell "xclip -selection clipboard -o | tmux load-buffer - && tmux paste-buffer"
+
 bind -n "M-1" select-window -t ":1"
 bind -n "M-2" select-window -t ":2"
 bind -n "M-3" select-window -t ":3"