Add polybar

This commit is contained in:
Cyryl Płotnicki 2019-07-14 12:22:18 +01:00
parent 64935832b8
commit a6a02b304e
2 changed files with 76 additions and 13 deletions

View file

@ -38,6 +38,7 @@ in
./user-xsession.nix ./user-xsession.nix
]; ];
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;

View file

@ -3,20 +3,82 @@ let
mod = "Mod4"; mod = "Mod4";
in in
{ {
xsession = { services = {
enable = true; network-manager-applet.enable = true;
windowManager.i3 = {
polybar = {
enable = true; enable = true;
config = { package =
modifier = mod; pkgs.polybar.override {
keybindings = { i3GapsSupport = true;
"${mod}+Return" = "exec i3-sensible-terminal"; };
"${mod}+Shift+q" = "kill"; config = {
"${mod}+d" = "exec ${pkgs.rofi}/bin/rofi -show combi -combi-modi window#run#ssh -modi combi"; "bar/top" = {
"${mod}+f" = "fullscreen toggle"; font-0 = "mononoki:size-10";
"${mod}+l" = "exec loginctl lock-session"; 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";
};
}; };
}; };
}; };
}; }
}