Polybar theme + bspwm movement + xidlehook + lockscreen
This commit is contained in:
parent
739be5f9ae
commit
2c7a0f3ed3
4 changed files with 76 additions and 29 deletions
6
home.nix
6
home.nix
|
|
@ -63,6 +63,7 @@ in
|
|||
gnome3.seahorse
|
||||
gnome3.sushi
|
||||
google-chrome
|
||||
gucharmap
|
||||
htop
|
||||
jetbrains.datagrip
|
||||
krita
|
||||
|
|
@ -79,6 +80,7 @@ in
|
|||
pcmanfm
|
||||
pentablet-driver
|
||||
procps-ng
|
||||
ripgrep
|
||||
shotwell
|
||||
skypeforlinux
|
||||
slack
|
||||
|
|
@ -86,6 +88,7 @@ in
|
|||
tdesktop
|
||||
teams
|
||||
transmission-gtk
|
||||
wineFull
|
||||
wireguard
|
||||
zoom-us
|
||||
zotero
|
||||
|
|
@ -127,7 +130,8 @@ in
|
|||
./modules/polybar.nix
|
||||
./modules/qogir_theme.nix
|
||||
./modules/rofi.nix
|
||||
./modules/screen_locker.nix
|
||||
# ./modules/screen_locker.nix
|
||||
./modules/xidelhook.nix
|
||||
./modules/ssh.nix
|
||||
./modules/sxhkd.nix
|
||||
./modules/syncthing.nix
|
||||
|
|
|
|||
|
|
@ -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"; })
|
||||
]
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -35,7 +35,10 @@
|
|||
"super + {_,shift + } Return" = "{${alacritty} , ${terminator}}";
|
||||
"super + {_,shift + }{1-9,0}" = "${bspc} {desktop -f,node -d} 'focused:^{1-9,10}'";
|
||||
"super + {_,shift + }c" = "${bspc} node -f {next,prev}.local";
|
||||
"super + {_,shift + }{h,j,k,l}" = "${bspc} node -{f,s} {west,south,north,east}";
|
||||
# "super + {_,shift + }{h,j,k,l}" = "${bspc} node -{f,s} {west,south,north,east}";
|
||||
"super + {h,j,k,l}" = "${bspc} node -f {west,south,north,east}";
|
||||
"super + shift + {h,j,k,l}" = ''dir={west,south,north,east}; bspc node -s "$dir.local" --follow || bspc node -m "$dir" --follow'';
|
||||
|
||||
"super + {_,shift + }w" = "${bspc} node -{c,k}";
|
||||
"super + @space" = "rofi -show drun";
|
||||
"super + {t,shift + t,s,f}" = "${bspc} node -t {tiled,pseudo_tiled,floating,fullscreen}";
|
||||
|
|
|
|||
29
modules/xidelhook.nix
Normal file
29
modules/xidelhook.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
program = "${pkgs.xidlehook}/bin/xidlehook";
|
||||
lockCmd = escapeShellArg '' ${pkgs.i3lock-color}/bin/i3lock-color -B 10 --greeter-text="Welcome back $USER" --greeter-color="#ffffff" --date-color="#ffffff" --time-color="#ffffff" '';
|
||||
script = concatStringsSep " " [
|
||||
''${program}''
|
||||
''--not-when-fullscreen''
|
||||
''--not-when-audio''
|
||||
''--timer 300 ${lockCmd} ""''
|
||||
];
|
||||
in
|
||||
{
|
||||
systemd.user.services.xidlehook = {
|
||||
Unit = {
|
||||
Description = "xidlehook service";
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
ConditionEnvironment = [ "DISPLAY" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${script}";
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue