Add polybar
This commit is contained in:
parent
64935832b8
commit
a6a02b304e
2 changed files with 76 additions and 13 deletions
|
@ -38,6 +38,7 @@ in
|
|||
./user-xsession.nix
|
||||
];
|
||||
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
|
||||
|
|
|
@ -3,20 +3,82 @@ let
|
|||
mod = "Mod4";
|
||||
in
|
||||
{
|
||||
xsession = {
|
||||
enable = true;
|
||||
windowManager.i3 = {
|
||||
services = {
|
||||
network-manager-applet.enable = true;
|
||||
|
||||
polybar = {
|
||||
enable = true;
|
||||
config = {
|
||||
modifier = mod;
|
||||
keybindings = {
|
||||
"${mod}+Return" = "exec i3-sensible-terminal";
|
||||
"${mod}+Shift+q" = "kill";
|
||||
"${mod}+d" = "exec ${pkgs.rofi}/bin/rofi -show combi -combi-modi window#run#ssh -modi combi";
|
||||
"${mod}+f" = "fullscreen toggle";
|
||||
"${mod}+l" = "exec loginctl lock-session";
|
||||
package =
|
||||
pkgs.polybar.override {
|
||||
i3GapsSupport = true;
|
||||
};
|
||||
config = {
|
||||
"bar/top" = {
|
||||
font-0 = "mononoki:size-10";
|
||||
width = "100%";
|
||||
height = "2%";
|
||||
radius = 0;
|
||||
background = "#fdf6e3"; # solarized base3
|
||||
foreground = "#657b83"; # solarized base00
|
||||
tray-position = "right";
|
||||
tray-detached = false;
|
||||
tray-maxsize = 16;
|
||||
tray-transparent = false;
|
||||
tray-background = "#fdf6e3";
|
||||
tray-offset-x = 0;
|
||||
tray-offset-y = 0;
|
||||
tray-padding = 0;
|
||||
tray-scale = "1.0";
|
||||
module-margin = 4;
|
||||
modules-center = "date";
|
||||
modules-right = "battery";
|
||||
};
|
||||
"module/date" = {
|
||||
type = "internal/date";
|
||||
internal = 5;
|
||||
date = "%Y.%m.%d";
|
||||
time = "%H.%M";
|
||||
label = "%date%..%time%";
|
||||
};
|
||||
"module/battery" = {
|
||||
type = "internal/battery";
|
||||
battery = "BAT0";
|
||||
adapter = "AC";
|
||||
full-at = 99;
|
||||
};
|
||||
};
|
||||
script = "polybar main_bar &";
|
||||
};
|
||||
};
|
||||
|
||||
xsession = {
|
||||
enable = true;
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
package = pkgs.i3-gaps;
|
||||
config = {
|
||||
startup = [
|
||||
{ command = "exec i3-sensible-terminal"; always = true; notification = false; }
|
||||
];
|
||||
|
||||
bars = [];
|
||||
gaps = {
|
||||
inner = 12;
|
||||
outer = 0;
|
||||
smartGaps = true;
|
||||
smartBorders = "on";
|
||||
};
|
||||
|
||||
modifier = mod;
|
||||
keybindings = {
|
||||
"${mod}+Return" = "exec i3-sensible-terminal";
|
||||
"${mod}+Shift+q" = "kill";
|
||||
"${mod}+d" = "exec ${pkgs.rofi}/bin/rofi -show combi -combi-modi window#run#ssh -modi combi";
|
||||
"${mod}+f" = "fullscreen toggle";
|
||||
"${mod}+l" = "exec loginctl lock-session";
|
||||
"${mod}+Shift+e" = "exec i3-msg exit";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue