better visuals and key shortcuts on i3

This commit is contained in:
Cyryl Płotnicki 2019-07-14 19:24:40 +01:00
parent 0bc2115a99
commit 2cc583348c
4 changed files with 68 additions and 30 deletions

View file

@ -39,6 +39,7 @@ in
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
programs.light.enable = true;
virtualisation.docker = { virtualisation.docker = {
enable = true; enable = true;

View file

@ -13,6 +13,7 @@ in
}; };
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
wirelesstools
keepass fontconfig nodejs rustup gcc gdb keepass fontconfig nodejs rustup gcc gdb
binutils xclip pkgconfig veracrypt gitAndTools.diff-so-fancy binutils xclip pkgconfig veracrypt gitAndTools.diff-so-fancy
openjdk11 gimp restic glxinfo discord openjdk11 gimp restic glxinfo discord

View file

@ -3,13 +3,21 @@
services.polybar = { services.polybar = {
enable = true; enable = true;
script = "polybar -r main_bar &"; script = "polybar -r main_bar &";
package = pkgs.polybar.override {
i3GapsSupport = true;
alsaSupport = true;
iwSupport = true;
nlSupport = false;
githubSupport = true;
};
config = { config = {
"settings" = {screenchange-reload = "true";};
"bar/main_bar" = { "bar/main_bar" = {
font-0 = "DejaVu Sans Mono for Powerline:size=10.0;weight=bold"; font-0 = "DejaVu Sans Mono for Powerline:size=12.0;weight=bold";
background = "#002b36"; background = "#002b36";
foreground = "#839496"; foreground = "#839496";
bottom = "false"; bottom = "false";
height = 50; height = 32;
fixed-center = "true"; fixed-center = "true";
line-size = 6; line-size = 6;
padding-right = "1%"; padding-right = "1%";
@ -17,8 +25,9 @@
module-margin-right = 1; module-margin-right = 1;
modules-left = "xwindow"; modules-left = "xwindow";
modules-center = "date"; modules-center = "date";
modules-right = "org-clock volume backlight filesystem memory cpu network"; modules-right = "backlight volume memory cpu battery-label battery1 battery0";
}; };
"module/date" = { "module/date" = {
type = "internal/date"; type = "internal/date";
interval = 5; interval = 5;
@ -26,48 +35,62 @@
time = "%H:%M"; time = "%H:%M";
label = "%date% %time%"; label = "%date% %time%";
}; };
"settings" = {screenchange-reload = "true";};
"module/xwindow" = { "module/xwindow" = {
type = "internal/xwindow"; type = "internal/xwindow";
label = "%title:0:30:...%"; label = "%title:0:30:...%";
label-padding = 10; label-padding = 10;
}; };
"module/network" = {
type = "internal/network";
interface = "wlp1s0";
interval = "3.0";
format-connected = "<label-connected>";
label-connected = " %essid%";
};
"module/cpu" = { "module/cpu" = {
type = "internal/cpu"; type = "internal/cpu";
label = " %percentage:2%%"; interval = 3;
format = "CPU: <label>";
}; };
"module/memory" = { "module/memory" = {
type = "internal/memory"; type = "internal/memory";
label = " %percentage_used%%"; interval = 3;
}; label = "MEM: %percentage_used%%";
"module/filesystem" = {
type = "internal/fs";
mount-0 = "/";
mount-1 = "/home";
label-mounted = " %percentage_used%%";
}; };
"module/volume" = { "module/volume" = {
type = "internal/alsa"; type = "internal/pulseaudio";
label-volume = " %percentage%"; use-ui-max = true;
label-muted = ""; format-volume = "<bar-volume>";
click-left = "pactl set-sink-mute 0 toggle";
}; };
"module/battery-label" = {
type = "custom/text";
content = "BAT:";
};
"module/battery0" = {
type = "internal/battery";
battery = "BAT0";
adapter = "AC";
poll-interval = "5";
format-discharging = "<label-discharging>";
label-discharging = "%percentage%%|%time%";
};
"module/battery1" = {
type = "internal/battery";
battery = "BAT1";
adapter = "AC";
poll-interval = "5";
format-discharging = "<label-discharging>";
label-discharging = "%percentage%%|%time%";
};
"module/backlight" = { "module/backlight" = {
type = "internal/backlight"; type = "internal/backlight";
format = "<ramp>"; format = "LIGHT: <bar>";
card = "intel_backlight"; card = "intel_backlight";
ramp-0 = "🌕"; bar-width = 6;
ramp-1 = "🌔"; bar-indicator = "|";
ramp-2 = "🌓"; bar-fill = "";
ramp-3 = "🌒"; bar-empty = "";
ramp-4 = "🌑";
}; };
}; };
}; };

View file

@ -16,7 +16,13 @@ in
startup = [ startup = [
{ command = "exec i3-sensible-terminal"; always = true; notification = false; } { command = "exec i3-sensible-terminal"; always = true; notification = false; }
]; ];
workspaceLayout = "stacked"; window = {
hideEdgeBorders = "horizontal";
titlebar = false;
border = 0;
};
workspaceLayout = "tabbed";
bars = []; bars = [];
gaps = { gaps = {
inner = 8; inner = 8;
@ -31,6 +37,13 @@ in
"${mod}+Shift+c" = "reload"; "${mod}+Shift+c" = "reload";
"${mod}+Shift+r" = "restart"; "${mod}+Shift+r" = "restart";
"XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume 0 +5%";
"XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume 0 -5%";
"XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute 0 toggle";
"XF86MonBrightnessUp" = "exec light -s sysfs/backlight/intel_backlight -A 5";
"XF86MonBrightnessDown" = "exec light -s sysfs/backlight/intel_backlight -U 5";
"${mod}+r" = "exec ${pkgs.rofi}/bin/rofi -show combi -combi-modi window#run#ssh -modi combi"; "${mod}+r" = "exec ${pkgs.rofi}/bin/rofi -show combi -combi-modi window#run#ssh -modi combi";
"${mod}+q" = "kill"; "${mod}+q" = "kill";
"${mod}+f" = "fullscreen toggle"; "${mod}+f" = "fullscreen toggle";