Working polybar
This commit is contained in:
parent
a6a02b304e
commit
30293d6b58
1 changed files with 124 additions and 63 deletions
|
@ -8,77 +8,138 @@ in
|
||||||
|
|
||||||
polybar = {
|
polybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package =
|
script = "polybar main_bar &";
|
||||||
pkgs.polybar.override {
|
config = {
|
||||||
i3GapsSupport = true;
|
"bar/main_bar" = {
|
||||||
|
bottom = "false";
|
||||||
|
height = 50;
|
||||||
|
fixed-center = "true";
|
||||||
|
line-size = 6;
|
||||||
|
padding-right = "1%";
|
||||||
|
module-margin-left = 1;
|
||||||
|
module-margin-right = 1;
|
||||||
|
wm-restack = "bspwm";
|
||||||
|
modules-left = "bspwm xwindow";
|
||||||
|
modules-center = "date";
|
||||||
|
modules-right = "org-clock volume backlight filesystem memory cpu battery network";
|
||||||
};
|
};
|
||||||
config = {
|
"module/bspwm" = {
|
||||||
"bar/top" = {
|
type = "internal/bspwm";
|
||||||
font-0 = "mononoki:size-10";
|
format = "<label-state> <label-mode>";
|
||||||
width = "100%";
|
label-monocle = "M";
|
||||||
height = "2%";
|
label-floating = "S";
|
||||||
radius = 0;
|
fuzzy-match = "true";
|
||||||
background = "#fdf6e3"; # solarized base3
|
ws-icon-0 = "1;";
|
||||||
foreground = "#657b83"; # solarized base00
|
ws-icon-1 = "2;";
|
||||||
tray-position = "right";
|
ws-icon-2 = "3;";
|
||||||
tray-detached = false;
|
ws-icon-3 = "4;";
|
||||||
tray-maxsize = 16;
|
ws-icon-4 = "5;♞";
|
||||||
tray-transparent = false;
|
ws-icon-default = "";
|
||||||
tray-background = "#fdf6e3";
|
label-mode-padding = "2";
|
||||||
tray-offset-x = 0;
|
label-focused = "%icon%";
|
||||||
tray-offset-y = 0;
|
label-focused-padding = 2;
|
||||||
tray-padding = 0;
|
label-empty = '''';
|
||||||
tray-scale = "1.0";
|
label-occupied = "%icon%";
|
||||||
module-margin = 4;
|
label-occupied-padding = 2;
|
||||||
modules-center = "date";
|
label-urgent = "%icon%";
|
||||||
modules-right = "battery";
|
label-urgent-padding = 2;
|
||||||
};
|
};
|
||||||
"module/date" = {
|
"module/date" = {
|
||||||
type = "internal/date";
|
type = "internal/date";
|
||||||
internal = 5;
|
interval = 5;
|
||||||
date = "%Y.%m.%d";
|
date = "%m-%d %a";
|
||||||
time = "%H.%M";
|
time = "%H:%M";
|
||||||
label = "%date%..%time%";
|
label = "%date% %time%";
|
||||||
};
|
};
|
||||||
"module/battery" = {
|
"module/battery" = {
|
||||||
type = "internal/battery";
|
type = "internal/battery";
|
||||||
battery = "BAT0";
|
battery = "BAT1";
|
||||||
adapter = "AC";
|
adapter = "ADP1";
|
||||||
full-at = 99;
|
full-at = 96;
|
||||||
};
|
format-charging = " <label-charging>";
|
||||||
|
format-discharging = "<ramp-capacity> <label-discharging>";
|
||||||
|
format-full = " ";
|
||||||
|
ramp-capacity-0 = "";
|
||||||
|
ramp-capacity-1 = "";
|
||||||
|
ramp-capacity-2 = "";
|
||||||
|
ramp-capacity-3 = "";
|
||||||
|
ramp-capacity-4 = "";
|
||||||
|
};
|
||||||
|
"settings" = {screenchange-reload = "true";};
|
||||||
|
"module/xwindow" = {
|
||||||
|
type = "internal/xwindow";
|
||||||
|
label = "%title:0:30:...%";
|
||||||
|
label-padding = 10;
|
||||||
|
};
|
||||||
|
"module/network" = {
|
||||||
|
type = "internal/network";
|
||||||
|
interface = "wlp1s0";
|
||||||
|
interval = "3.0";
|
||||||
|
format-connected = "<label-connected>";
|
||||||
|
label-connected = " %essid%";
|
||||||
|
};
|
||||||
|
"module/cpu" = {
|
||||||
|
type = "internal/cpu";
|
||||||
|
label = " %percentage:2%%";
|
||||||
|
};
|
||||||
|
"module/memory" = {
|
||||||
|
type = "internal/memory";
|
||||||
|
label = " %percentage_used%%";
|
||||||
|
};
|
||||||
|
"module/filesystem" = {
|
||||||
|
type = "internal/fs";
|
||||||
|
mount-0 = "/";
|
||||||
|
mount-1 = "/home";
|
||||||
|
label-mounted = " %percentage_used%%";
|
||||||
|
};
|
||||||
|
"module/volume" = {
|
||||||
|
type = "internal/alsa";
|
||||||
|
label-volume = " %percentage%";
|
||||||
|
label-muted = "";
|
||||||
|
click-left = "pactl set-sink-mute 0 toggle";
|
||||||
|
};
|
||||||
|
"module/backlight" = {
|
||||||
|
type = "internal/backlight";
|
||||||
|
format = "<ramp>";
|
||||||
|
card = "intel_backlight";
|
||||||
|
ramp-0 = "🌕";
|
||||||
|
ramp-1 = "🌔";
|
||||||
|
ramp-2 = "🌓";
|
||||||
|
ramp-3 = "🌒";
|
||||||
|
ramp-4 = "🌑";
|
||||||
};
|
};
|
||||||
script = "polybar main_bar &";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
xsession = {
|
xsession = {
|
||||||
|
enable = true;
|
||||||
|
windowManager.i3 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
windowManager.i3 = {
|
package = pkgs.i3-gaps;
|
||||||
enable = true;
|
config = {
|
||||||
package = pkgs.i3-gaps;
|
startup = [
|
||||||
config = {
|
{ command = "exec i3-sensible-terminal"; always = true; notification = false; }
|
||||||
startup = [
|
];
|
||||||
{ command = "exec i3-sensible-terminal"; always = true; notification = false; }
|
|
||||||
];
|
|
||||||
|
|
||||||
bars = [];
|
bars = [];
|
||||||
gaps = {
|
gaps = {
|
||||||
inner = 12;
|
inner = 12;
|
||||||
outer = 0;
|
outer = 0;
|
||||||
smartGaps = true;
|
smartGaps = true;
|
||||||
smartBorders = "on";
|
smartBorders = "on";
|
||||||
};
|
};
|
||||||
|
|
||||||
modifier = mod;
|
modifier = mod;
|
||||||
keybindings = {
|
keybindings = {
|
||||||
"${mod}+Return" = "exec i3-sensible-terminal";
|
"${mod}+Return" = "exec i3-sensible-terminal";
|
||||||
"${mod}+Shift+q" = "kill";
|
"${mod}+Shift+q" = "kill";
|
||||||
"${mod}+d" = "exec ${pkgs.rofi}/bin/rofi -show combi -combi-modi window#run#ssh -modi combi";
|
"${mod}+d" = "exec ${pkgs.rofi}/bin/rofi -show combi -combi-modi window#run#ssh -modi combi";
|
||||||
"${mod}+f" = "fullscreen toggle";
|
"${mod}+f" = "fullscreen toggle";
|
||||||
"${mod}+l" = "exec loginctl lock-session";
|
"${mod}+l" = "exec loginctl lock-session";
|
||||||
"${mod}+Shift+e" = "exec i3-msg exit";
|
"${mod}+Shift+e" = "exec i3-msg exit";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue