Add playerctl and mpris module to waybar

Fix hyprland binds for audio and brightness
This commit is contained in:
Evie Litherland-Smith 2023-08-03 10:37:36 +01:00
parent 1560373dbe
commit bf63458b2e
6 changed files with 38 additions and 9 deletions

View file

@ -33,7 +33,12 @@ in {
pipewire
wireplumber
wl-clipboard
grim
slurp
swayimg
playerctl
pamixer
playerctl
brightnessctl
];
programs = {

View file

@ -84,12 +84,20 @@ bind = SUPER SHIFT, Q, killactive,
bind = SUPER, M, fullscreen, 1
bind = SUPER SHIFT, M, fullscreen, 0
# Misc useful binds
bind=,Print,exec,grim -g "$(slurp)"
# Sound
bind=,XF86AudioMute,exec,pamixer -t
binde=,XF86AudioRaiseVolume,exec,pamixer -i 5
binde=,XF86AudioLowerVolume,exec,pamixer -d 5
# Brightness
binde=,XF86MonBrightnessUp,exec,brightnessctl s +5%
binde=,XF86MonBrightnessDown,exec,brightnessctl s -5%
binde=,XF86MonBrightnessDown,exec,brightnessctl s 5%-
# Playback
binde=,XF86AudioPlay,exec,playerctl play-pause
binde=,XF86AudioStop,exec,playerctl play-pause
binde=,XF86AudioPrev,exec,playerctl previous
binde=,XF86AudioNext,exec,playerctl next
bind = SUPER, H, movefocus, l
bind = SUPER, L, movefocus, r

View file

@ -1,6 +1,6 @@
{pkgs, ...}: {
{ pkgs, ... }: {
home.packages = with pkgs; [
(nerdfonts.override {fonts = ["FiraCode"];})
(nerdfonts.override { fonts = [ "FiraCode" ]; })
networkmanagerapplet
bluez
];
@ -10,8 +10,8 @@
settings.main = {
layer = "top";
position = "top";
"modules-left" = ["wlr/workspaces"];
"modules-center" = [];
"modules-left" = [ "wlr/workspaces" ];
"modules-center" = [ "mpris" ];
"modules-right" = [
"pulseaudio"
"bluetooth"
@ -22,6 +22,7 @@
"clock"
];
"wlr/workspaces" = import ./modules/wlr_workspaces.nix;
mpris = import ./modules/mpris.nix;
cpu = import ./modules/cpu.nix;
memory = import ./modules/memory.nix;
temperature = import ./modules/temperature.nix;

View file

@ -0,0 +1,18 @@
{
"format" = "{player_icon} {dynamic} {status_icon}";
"format-paused" = "{player_icon} <i>{title}</i> {status_icon}";
"format-stopped" = "{player_icon} {status_icon}";
"interval" = 1;
"player-icons" = {
"default" = "󰝚";
"mpv" = "󰝚";
"spotify" = "󰓇";
"ncspot" = "󰓇";
};
"status-icons" = {
"playing" = "󰐊";
"paused" = "󰏤";
"stopped" = "󰓛";
};
"ignored-players" = [ "firefox" ];
}

View file

@ -66,7 +66,7 @@ in {
monitor=desc:Dell Inc. DELL U2417H 5K9YD872FY1L,${monitors.Dell}
monitor=desc:Acer Technologies ED270R TJMEE0043W01,${monitors.Acer}
bindl=,switch:Lid Switch,exec,pkill -9 kanshi
bindl=,switch:Lid Switch,exec,pkill -HUP kanshi
bindl=,switch:Lid Switch,exec,pkill -9 hyprpaper && hyprctl dispatch exec hyprpaper
'';
}

View file

@ -3,9 +3,6 @@
environment.systemPackages = with pkgs; [
xdg-utils
gsettings-desktop-schemas
pavucontrol
grim
slurp
];
security.pam.services.swaylock = { };
services = {