Polybar theme + bspwm movement + xidlehook + lockscreen

This commit is contained in:
Filippo Berto 2021-06-16 09:22:28 +02:00
parent 739be5f9ae
commit 2c7a0f3ed3
4 changed files with 76 additions and 29 deletions

View file

@ -6,7 +6,7 @@ let
pgrep = "${pkgs.procps}/bin/pgrep";
pkill = "${pkgs.procps}/bin/pkill";
playerCtl = "${pkgs.playerctl}/bin/playerctl";
playerStatus = "${playerCtl} -f '{{emoji(status)}} {{title}} - {{artist}}' metadata";
playerStatus = "${playerCtl} -f '{{emoji(status)}} {{title}} - {{artist}}' metadata | head -c 60";
colors = with pkgs.extra; palette.toARGBHex rec {
normal = {
@ -57,16 +57,16 @@ let
top.size = 2;
bottom.size = 0;
};
font = [ "FuraCode Nerd Font Mono:pixelsize=10;2" "unifont:fontformat=truetype:size=8:antialias=false;0" "siji:pixelsize=10;1" ];
tray = {
position = "right";
padding = 0;
};
font = [
"FuraCode Nerd Font Mono:pixelsize=10;2"
# "EmojiOne Color;0"
"NotoEmoji Nerd Font Mono;0"
];
wm-restack = "bspwm";
};
in
{
home.packages = with pkgs; [ nerdfonts ];
home.packages = with pkgs; [ nerdfonts emojione noto-fonts-emoji ];
services.polybar = {
enable = true;
package = pkgs.polybarFull;
@ -90,6 +90,10 @@ in
# modules-center =
modules-right = "player pulseaudio temperature cpu memory battery date powermenu";
enable-ipc = true;
tray = {
position = "right";
padding = 0;
};
};
"bar/secondary" = commonBar // {
@ -108,11 +112,11 @@ in
animation = {
charging = {
text = [ "" "" "" ];
text = [ "" "" "" "" "" "" "" "" "" "" ];
framerate = "750";
};
discharging = {
text = [ "" "" "" ];
text = [ "" "" "" "" "" "" "" "" "" "" ];
framerate = "750";
};
};
@ -120,15 +124,15 @@ in
format = {
charging = colors.selected // {
padding = 1;
text = "<animation-charging> <label-charging>";
text = "<label-charging> <animation-charging>";
};
discharging = colors.active // {
padding = 1;
text = "<animation-discharging> <label-discharging>";
text = "<label-discharging> <animation-discharging>";
};
full = colors.normal // {
padding = 1;
text = " <label-full>";
text = "<label-full> ";
};
};
@ -161,11 +165,12 @@ in
"module/cpu" = {
type = "internal/cpu";
format = colors.normal // {
prefix = " ";
text = "RAM <label> <ramp-load>";
padding = 1;
};
interval = 2;
label = "%percentage-sum%%";
ramp-load = [ "" "" "" "" "" "" ];
};
"module/date" = {
@ -188,11 +193,12 @@ in
"module/memory" = {
type = "internal/memory";
format = colors.normal // {
prefix = " ";
padding = 1;
text = "RAM <label> <ramp-used>";
};
interval = 2;
label = "%percentage_used%% ~ %percentage_swap_used%%";
label = "%percentage_used%%";
ramp-used = [ "" "" "" "" "" "" ];
};
"module/pulseaudio" = {
@ -224,26 +230,31 @@ in
click.right = "${pgrep} pavucontrol && ${pkill} pavucontrol || ${pavucontrol}";
format = {
padding = 1;
muted = colors.active;
muted = colors.active // {
padding = 1;
};
volume = colors.normal // {
text = "<label-volume> <bar-volume>";
padding = 1;
text = "<ramp-volume><label-volume> <bar-volume>";
};
};
label.muted = {
text = "VOL muted";
text = "🔇";
};
label.volume = {
text = "VOL %percentage%%";
text = " %percentage%%";
};
ramp.volume = [ "🔈" "🔉" "🔊" ];
type = "internal/pulseaudio";
};
"module/temperature" = {
format = colors.normal // {
padding = 1;
text = "<ramp> <label>";
text = "<label> <ramp>";
warn = {
text = "<ramp> <label-warn>";
padding = 1;
text = "<label-warn> <ramp>";
underline = colors.alert;
};
};
@ -253,7 +264,7 @@ in
warn = "%temperature-c%";
};
ramp = {
text = [ "" "" "" ];
text = [ "" "" "" "" "" ];
};
thermal.zone = "0";
type = "internal/temperature";
@ -280,18 +291,18 @@ in
};
menu = [
[
({ text = "Reboot"; exec = "menu-open-1"; })
({ text = "Hibernate"; exec = "menu-open-2"; })
({ text = "Power off"; exec = "menu-open-3"; })
({ text = "Reboot"; exec = "#powermenu.open.1"; })
({ text = "Hibernate"; exec = "#powermenu.open.2"; })
({ text = "Power off"; exec = "#powermenu.open.3"; })
]
[
({ text = "Reboot"; exec = "systemctl reboot"; })
({ text = "Reboot"; exec = "reboot"; })
]
[
({ text = "Hibernate"; exec = "systemctl hibernate"; })
]
[
({ text = "Power off"; exec = "systemctl poweroff"; })
({ text = "Power off"; exec = "shutdown now"; })
]
];
};