mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-25 16:08:30 +02:00
configured a spotify widget for waybar
This commit is contained in:
parent
b58ae611b6
commit
8f78e1f843
9 changed files with 95 additions and 19 deletions
|
@ -1,5 +1,10 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# open ports for kde connect
|
||||
networking.firewall = rec {
|
||||
allowedTCPPortRanges = [{ from = 1714; to = 1764; }];
|
||||
allowedUDPPortRanges = allowedTCPPortRanges;
|
||||
};
|
||||
# fixes pam entries for swaylock
|
||||
security.pam.services.swaylock.text = ''
|
||||
# Account management.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ config, pkgs, hyprland, ... }:
|
||||
{ self, config, pkgs, hyprland, ... }:
|
||||
{
|
||||
# waybar needs hyprctl
|
||||
systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.hyprland}/bin";
|
||||
systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.hyprland}/bin:${pkgs.playerctl}/bin:${pkgs.pulseaudio}/bin";
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
|
@ -11,7 +10,7 @@
|
|||
layer = "top";
|
||||
position = "top";
|
||||
height = 26;
|
||||
modules-left = [ "wlr/workspaces" "hyprland/window" ];
|
||||
modules-left = [ "wlr/workspaces" "hyprland/window" "custom/spotifytitle" ];
|
||||
modules-right = [ "network" "cpu" "temperature" "pulseaudio" "battery" "tray" "clock" ];
|
||||
network = {
|
||||
format-wifi = " {essid} ({signalStrength}%)";
|
||||
|
@ -29,6 +28,13 @@
|
|||
format = " {}";
|
||||
separate-outputs = true;
|
||||
};
|
||||
|
||||
"custom/spotifytitle" = {
|
||||
format = " {}";
|
||||
max-length = 80;
|
||||
return-type = "json";
|
||||
exec = "${self.packages.x86_64-linux.pww}/bin/pww -w spotifyd:title -f '{{title}} - {{artist}}' -p None 2> /dev/null";
|
||||
};
|
||||
cpu = {
|
||||
format = "{usage}% ";
|
||||
};
|
||||
|
@ -101,6 +107,7 @@
|
|||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#custom-spotifytitle,
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
|
@ -129,6 +136,20 @@
|
|||
background-color: #${config.colorScheme.colors.base00};
|
||||
}
|
||||
|
||||
#custom-spotifytitle {
|
||||
background: #1db954;
|
||||
color: #191414;
|
||||
opacity: 1;
|
||||
transition-property: opacity;
|
||||
transition-duration: 0.25s;
|
||||
}
|
||||
|
||||
#custom-spotifytitle.Paused,
|
||||
#custom-spotifytitle.Stopped,
|
||||
#custom-spotifytitle.Inactive {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
#battery {
|
||||
background-color: #${config.colorScheme.colors.base02};
|
||||
color: #${config.colorScheme.colors.base05};
|
||||
|
|
|
@ -69,6 +69,11 @@
|
|||
# })
|
||||
];
|
||||
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
};
|
||||
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue