From e732d5514d059262f722ba8e40e4abe8718ae19c Mon Sep 17 00:00:00 2001 From: Amneesh Singh Date: Fri, 27 Jan 2023 21:50:16 +0530 Subject: [PATCH] change playerctl shortcuts --- home/natto/config/hypr/hyprland.conf | 14 ++++++++------ home/natto/config/xmonad/xmonad.hs | 14 ++++++++------ home/natto/default.nix | 2 +- home/natto/eww/bar/system.yuck | 2 +- home/natto/pkgs.nix | 1 + home/natto/zsh.nix | 1 - 6 files changed, 19 insertions(+), 15 deletions(-) diff --git a/home/natto/config/hypr/hyprland.conf b/home/natto/config/hypr/hyprland.conf index 2db0896..6553752 100644 --- a/home/natto/config/hypr/hyprland.conf +++ b/home/natto/config/hypr/hyprland.conf @@ -73,12 +73,14 @@ binde=$mainMod, RETURN, exec, foot bindr=SUPER, D, exec, pkill tofi || tofi-drun | xargs hyprctl dispatch exec -- bindr=SUPER SHIFT, D, exec, pkill tofi || tofi-run --require-match=false | xargs hyprctl dispatch exec -- -bind=$mainMod, P, exec, playerctl play-pause -bind=, XF86AudioPlay, exec, playerctl play-pause -bind=, XF86AudioNext, exec, playerctl position 5+ -bind=, XF86AudioPrev, exec, playerctl position 5- -bind=$mainMod, XF86AudioNext, exec, playerctl next -bind=$mainMod, XF86AudioPrev, exec, playerctl previous +$playerctl=playerctl -p 'playerctld,%any' + +bind=$mainMod, P, exec, $playerctl play-pause +bind=, XF86AudioPlay, exec, $playerctl play-pause +bind=, XF86AudioNext, exec, $playerctl position 5+ +bind=, XF86AudioPrev, exec, $playerctl position 5- +bind=$mainMod, XF86AudioNext, exec, $playerctl next +bind=$mainMod, XF86AudioPrev, exec, $playerctl previous binde=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ binde=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- bind=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle diff --git a/home/natto/config/xmonad/xmonad.hs b/home/natto/config/xmonad/xmonad.hs index 9191fb1..fdaba75 100644 --- a/home/natto/config/xmonad/xmonad.hs +++ b/home/natto/config/xmonad/xmonad.hs @@ -50,6 +50,8 @@ myXmobarrc = "~/.xmonad/lib/xmobar.hs" myWorkspaces = clickable $ ["\xf269", "\xf120", "\xf121", "\xf392", "\xf008", "\xf07b", "\xf11b", "\xf086", "\xf074" ] where clickable l = ["" ++ ws ++ "" | (i,ws) <- zip [1..9] l, let n = i ] +playerctl = "playerctl -p 'playerctld,%any'" + myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $ [ ((modMask, xK_Return), spawn $ XMonad.terminal conf) @@ -70,22 +72,22 @@ myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $ spawn "flameshot gui -d 10000") , ((modMask, xK_p), - spawn "playerctl play-pause") + spawn (playerctl ++ " play-pause")) , ((0, xF86XK_AudioPlay), - spawn "playerctl play-pause") + spawn (playerctl ++ " play-pause")) , ((modMask, xF86XK_AudioNext), - spawn "playerctl next") + spawn (playerctl ++ " next")) , ((modMask, xF86XK_AudioPrev), - spawn "playerctl previous") + spawn (playerctl ++ " previous")) , ((0, xF86XK_AudioPrev), - spawn "playerctl position 5-") + spawn (playerctl ++ " position 5-")) , ((0, xF86XK_AudioNext), - spawn "playerctl position 5+") + spawn (playerctl ++ " position 5+")) , ((0, xF86XK_AudioRaiseVolume), spawn "pamixer --allow-boost -ui 5") diff --git a/home/natto/default.nix b/home/natto/default.nix index 78bb094..98f7715 100644 --- a/home/natto/default.nix +++ b/home/natto/default.nix @@ -10,7 +10,7 @@ ./email.nix ./programs.nix ./eww - # ./xsession.nix :( + # ./xsession.nix :( ./wayland.nix ./pkgs.nix ./stuff.nix diff --git a/home/natto/eww/bar/system.yuck b/home/natto/eww/bar/system.yuck index 52e9439..45efe90 100644 --- a/home/natto/eww/bar/system.yuck +++ b/home/natto/eww/bar/system.yuck @@ -141,7 +141,7 @@ Free %: ${round(100 - EWW_RAM.used_mem_perc, 2)}%" :class "battery") (system_metric :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)} - :tooltip "Free Disk: ${round(EWW_DISK['/'].free / EWW_DISK['/'].total * 100, 2)} GB + :tooltip "Free Disk: ${round(EWW_DISK['/'].free / 1024 / 1024, 2)} GB Free Disk %: ${round(EWW_DISK['/'].free / EWW_DISK['/'].total * 100, 2)}%" :class "disk")))) diff --git a/home/natto/pkgs.nix b/home/natto/pkgs.nix index 9fff25f..4e9eb24 100644 --- a/home/natto/pkgs.nix +++ b/home/natto/pkgs.nix @@ -46,6 +46,7 @@ dunst authy gnome.zenity + iwgtk # Wine and games and stuff steam diff --git a/home/natto/zsh.nix b/home/natto/zsh.nix index 010435b..2e12656 100644 --- a/home/natto/zsh.nix +++ b/home/natto/zsh.nix @@ -8,7 +8,6 @@ in autocd = true; history = rec { expireDuplicatesFirst = true; - ignoreDups = true; size = 30000; save = size; };