gianmarco
/
dotfiles
Archived
1
0
Fork 0

Implemented polybar-pulseaudio-control and changed the xdotool commands from 'key' to 'keydown' and 'keyup'

master
Gianmarco Gargiulo 2021-11-27 00:52:33 +01:00
parent 08d325ae21
commit 30bd028a1e
4 changed files with 23 additions and 8 deletions

View File

@ -140,7 +140,7 @@ font-2 = "Fantasque Sans Mono:pixelsize=10;3"
modules-left = workspaces title
modules-center = now-playing date
modules-right = showtray mail updates cpu memory keyboard pulseaudio battery network caveau notifications powermenu
modules-right = showtray mail updates cpu memory keyboard pulseaudio-control battery network caveau notifications powermenu
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

View File

@ -372,7 +372,7 @@ interval = 1.0
;;date = %Y-%m-%d%
; Optional time format
time = "%{A1:xdotool key Super_L+Shift_L+s:}%a %d %b, %H:%M%{A}"
time = "%{A1:xdotool keydown Super_L+Shift_L+s && xdotool keyup Super_L+Shift_L+s:}%a %d %b, %H:%M%{A}"
; if `date-alt` or `time-alt` is defined, clicking
; the module will toggle between formats

View File

@ -7,6 +7,19 @@
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/pulseaudio-control]
type = custom/script
tail = true
label-padding = 0
label-foreground = ${colors.foreground}
exec = pulseaudio-control --osd --color-muted bdc3c7 --icons-volume " , " --icon-muted " " --sink-nicknames-from "device.description" --sink-nickname "alsa_output.pci-0000_01_00.1.hdmi-stereo-extra3:(HDMI)" --sink-nickname "alsa_output.pci-0000_00_1f.3.analog-stereo:(Cuffie)" listen
click-right = exec pavucontrol-qt &
click-left = pulseaudio-control togmute
click-middle = pulseaudio-control next-sink
scroll-up = pulseaudio-control --volume-max 100 up
scroll-down = pulseaudio-control --volume-max 100 down
[module/mail]
type = custom/script
exec = ~/Scripts/mail.py
@ -21,7 +34,7 @@ tail = true
format-suffix = " ·"
format = <label>
exec = ~/.config/polybar/gmg/scripts/polybar-now-playing
click-left = "xdotool key Super_L+Alt_L+s"
click-left = "xdotool keydown Super_L+Alt_L+s && xdotool keyup Super_L+Alt_L+s"
click-right = "kill -USR1 $(pgrep --oldest --parent %pid%)"
[module/updates]
@ -155,8 +168,8 @@ click-right = lxappearance &
inherit = module/apps
content =
content-foreground = ${color.foreground}
click-left = xdotool key Super_L+a
click-middle = xdotool key Super_L+Alt+a
click-left = xdotool keydown Super_L+a && xdotool keyup Super_L+a
click-middle = xdotool keydown Super_L+Alt_L+a && xdotool keyup Super_L+Alt_L+a
[module/caveau]
inherit = module/apps
@ -168,7 +181,7 @@ click-left = konsole -e cryfs /data/Caveau ~/Vaults/Caveau && dolphin ~/Vaults/C
inherit = module/apps
content =
content-foreground = ${color.foreground}
click-left = xdotool key Super_L+s
click-left = xdotool keydown Super_L+s && xdotool keyup Super_L+s
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
@ -187,7 +200,7 @@ expand-right = true
; menu-close
; Other commands will be executed using "/usr/bin/env sh -c $COMMAND"
menu-0-0 = Blocca
menu-0-0-exec = xdotool key Super_L+l
menu-0-0-exec = xdotool keydown Super_L+l && xdotool keyup Super_L+l
menu-0-1 = Esci
menu-0-1-exec = ~/.config/polybar/gmg/scripts/kd-esci.sh &
menu-0-2 = Sospendi

View File

@ -7,7 +7,7 @@
## Basic requirements
- **KDE Plasma** for the color scheme and the icon pack (and **Latte** if you want the dock);
- **Polybar** for the status bar (and **Python** with **dbus-python** for the media player and mail modules);
- **Polybar** for the status bar (and **Python** with **dbus-python** for the media player and mail modules and **polybar-pulseaudio-control** for the volume module);
- **zsh** and **powerlevel10k** for the fancy shell prompt (and **pfetch** if you want the ascii logo thing).
Extra stuff might be required for my Polybar scripts. Continue reading, don't be lazy.
@ -48,6 +48,8 @@ The **media player Python module** was created by d093w1z, I only changed some i
The **mail Python module** was created by quelotic, I only changed the mail icon and put the config file in a private directory, so you gotta change it from `~/Scripts/mail.py` to wherever yours is located. It's also set up to launch KMail when clicked, so you might want to change it to your mail client or web mail interface of choice. [Check the source code here](https://github.com/quelotic/polybarModules).
The **volume module** was created by marioortizmanero, I did some changes for the icons, the output and some actions. For example where it says `(Cuffie)` it is the nickname given to the output corresponding to my 3.5 mm headphone jack, so instead of saying the actual name of the audio interface it just says "(Headphones)"; same goes for where it says `(HDMI)` which refers to my GPU's audio out. You gotta change those values for them to correspond to your audio devices. [Check the source code here](https://github.com/marioortizmanero/polybar-pulseaudio-control).
### The Nightmare Magma color scheme
This is **my own custom color scheme** based on Breeze Dark, designed to be the opposite of my other color scheme called [Dream Plasma](https://github.com/gianmarcogg03/dreamplasmacs): **red and dark AF!!!**