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;
};
programs.light.enable = true;
virtualisation.docker = {
enable = true;

View file

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

View file

@ -3,13 +3,21 @@
services.polybar = {
enable = true;
script = "polybar -r main_bar &";
package = pkgs.polybar.override {
i3GapsSupport = true;
alsaSupport = true;
iwSupport = true;
nlSupport = false;
githubSupport = true;
};
config = {
"settings" = {screenchange-reload = "true";};
"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";
foreground = "#839496";
bottom = "false";
height = 50;
height = 32;
fixed-center = "true";
line-size = 6;
padding-right = "1%";
@ -17,8 +25,9 @@
module-margin-right = 1;
modules-left = "xwindow";
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" = {
type = "internal/date";
interval = 5;
@ -26,48 +35,62 @@
time = "%H:%M";
label = "%date% %time%";
};
"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%%";
interval = 3;
format = "CPU: <label>";
};
"module/memory" = {
type = "internal/memory";
label = " %percentage_used%%";
};
"module/filesystem" = {
type = "internal/fs";
mount-0 = "/";
mount-1 = "/home";
label-mounted = " %percentage_used%%";
interval = 3;
label = "MEM: %percentage_used%%";
};
"module/volume" = {
type = "internal/alsa";
label-volume = " %percentage%";
label-muted = "";
click-left = "pactl set-sink-mute 0 toggle";
type = "internal/pulseaudio";
use-ui-max = true;
format-volume = "<bar-volume>";
};
"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" = {
type = "internal/backlight";
format = "<ramp>";
format = "LIGHT: <bar>";
card = "intel_backlight";
ramp-0 = "🌕";
ramp-1 = "🌔";
ramp-2 = "🌓";
ramp-3 = "🌒";
ramp-4 = "🌑";
bar-width = 6;
bar-indicator = "|";
bar-fill = "";
bar-empty = "";
};
};
};

View file

@ -16,7 +16,13 @@ in
startup = [
{ command = "exec i3-sensible-terminal"; always = true; notification = false; }
];
workspaceLayout = "stacked";
window = {
hideEdgeBorders = "horizontal";
titlebar = false;
border = 0;
};
workspaceLayout = "tabbed";
bars = [];
gaps = {
inner = 8;
@ -31,6 +37,13 @@ in
"${mod}+Shift+c" = "reload";
"${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}+q" = "kill";
"${mod}+f" = "fullscreen toggle";