Setup wob

This commit is contained in:
Nathan McCarty 2023-05-06 20:54:48 -04:00
parent 4416936e77
commit 19aa7f8fc4
Signed by: thatonelutenist
SSH Key Fingerprint: SHA256:hwQEcmak9E6sdU9bXc98RHw/Xd1AhpB5HZT7ZSVJkRM
1 changed files with 8 additions and 3 deletions

View File

@ -7,6 +7,7 @@ in with lib; {
swaylock-command = ''
${swaylock-package}/bin/swaylock --screenshots --grace 30 --indicator --clock --timestr "%-I:%M:%S %p" --datestr "%A %Y-%M-%d" --effect-blur 20x3'';
layman-package = inputs.self.packages.${pkgs.system}.layman;
wob-package = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.wob;
in {
home.packages = with pkgs; [
# Locking and display management
@ -49,7 +50,7 @@ in with lib; {
swayest-workstyle
font-awesome
layman-package
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.wob
wob-package
# For fancy x11 scaling
sommelier
# Polkit
@ -69,8 +70,12 @@ in with lib; {
extraSessionCommands = ''
# Make qt theming work
export QT_QPA_PLATFORMTHEME="qt5ct"
# Prepare for wob
export WOBSOCK $XDG_RUNTIME_DIR/wob.sock
'';
config = {
# Startup wob
startup = [{ command = "tail -f $WOBSOCK | wob"; }];
# Setup gaps
gaps = {
smartGaps = true;
@ -172,9 +177,9 @@ in with lib; {
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
# Make the volume keys work
"XF86AudioRaiseVolume" =
"exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
"exec pactl set-sink-volume @DEFAULT_SINK@ +5% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1| awk '{print substr($5, 1, length($5)-1)}' > $WOBSOCK";
"XF86AudioLowerVolume" =
"exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
"bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk '{print substr($5, 1, length($5)-1)}' > $WOBSOCK";
# Play/pause and next song
"XF86AudioPlay" = "exec mpc toggle";
"XF86AudioNext" = "exec mpc next";