i3 config for chupacabra
This commit is contained in:
parent
0fcb6d0ca3
commit
59f6680d85
1 changed files with 278 additions and 217 deletions
|
@ -2,13 +2,38 @@
|
||||||
let
|
let
|
||||||
mod = "Mod4";
|
mod = "Mod4";
|
||||||
solarized = import ../common/solarized.nix;
|
solarized = import ../common/solarized.nix;
|
||||||
decorationFont = "MesloLGSDZ 6";
|
# TODO pull this out into lib
|
||||||
|
emacsclient = eval: pkgs.writeShellScript "emacsclient-eval" ''
|
||||||
|
msg=$(emacsclient --eval '${eval}' 2>&1)
|
||||||
|
echo "''${msg:1:-1}"
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
|
options = with lib; {
|
||||||
|
system.machine.wirelessInterface = mkOption {
|
||||||
|
description = ''
|
||||||
|
Name of the primary wireless interface. Used by i3status, etc.
|
||||||
|
'';
|
||||||
|
default = "wlp3s0";
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
|
||||||
|
system.machine.i3FontSize = mkOption {
|
||||||
|
description = "Font size to use in i3 window decorations etc.";
|
||||||
|
default = 6;
|
||||||
|
type = types.int;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config =
|
||||||
|
let decorationFont = "MesloLGSDZ ${toString config.system.machine.i3FontSize}"; in
|
||||||
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
maim
|
maim
|
||||||
rofi
|
rofi
|
||||||
i3status
|
i3status
|
||||||
python38Packages.py3status
|
python38Packages.py3status
|
||||||
|
i3lock
|
||||||
|
dconf # for gtk
|
||||||
];
|
];
|
||||||
|
|
||||||
xsession.scriptPath = ".hm-xsession";
|
xsession.scriptPath = ".hm-xsession";
|
||||||
|
@ -16,7 +41,7 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
modifier = mod;
|
modifier = mod;
|
||||||
keybindings = lib.mkOptionDefault {
|
keybindings = lib.mkOptionDefault rec {
|
||||||
"${mod}+h" = "focus left";
|
"${mod}+h" = "focus left";
|
||||||
"${mod}+j" = "focus down";
|
"${mod}+j" = "focus down";
|
||||||
"${mod}+k" = "focus up";
|
"${mod}+k" = "focus up";
|
||||||
|
@ -68,6 +93,10 @@ in {
|
||||||
"XF86AudioLowerVolume" = "exec pulseaudio-ctl down";
|
"XF86AudioLowerVolume" = "exec pulseaudio-ctl down";
|
||||||
"XF86AudioMute" = "exec pulseaudio-ctl mute";
|
"XF86AudioMute" = "exec pulseaudio-ctl mute";
|
||||||
|
|
||||||
|
# Lock
|
||||||
|
Pause = "exec \"sh -c 'playerctl pause; ${pkgs.i3lock}/bin/i3lock -c 222222'\"";
|
||||||
|
F7 = Pause;
|
||||||
|
|
||||||
# Screen Layout
|
# Screen Layout
|
||||||
"${mod}+Shift+t" = "exec xrandr --auto";
|
"${mod}+Shift+t" = "exec xrandr --auto";
|
||||||
# TODO
|
# TODO
|
||||||
|
@ -114,9 +143,11 @@ in {
|
||||||
interval = 1
|
interval = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
order += "mpd"
|
order += "external_script current_task"
|
||||||
order += "wireless wlp3s0"
|
order += "external_script inbox"
|
||||||
order += "ethernet enp3s0f0"
|
order += "spotify"
|
||||||
|
order += "wireless ${config.system.machine.wirelessInterface}"
|
||||||
|
# order += "ethernet enp3s0f0"
|
||||||
order += "cpu_usage"
|
order += "cpu_usage"
|
||||||
order += "battery 0"
|
order += "battery 0"
|
||||||
# order += "volume master"
|
# order += "volume master"
|
||||||
|
@ -154,6 +185,29 @@ in {
|
||||||
format = " %a %h %d ⌚ %I:%M "
|
format = " %a %h %d ⌚ %I:%M "
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spotify {
|
||||||
|
color_playing = "#fdf6e3"
|
||||||
|
color_paused = "#93a1a1"
|
||||||
|
format_stopped = ""
|
||||||
|
format_down = ""
|
||||||
|
format = "{title} - {artist} ({album})"
|
||||||
|
}
|
||||||
|
|
||||||
|
external_script inbox {
|
||||||
|
script_path = '${emacsclient "(grfn/num-inbox-items-message)"}'
|
||||||
|
format = 'Inbox: {output}'
|
||||||
|
cache_timeout = 120
|
||||||
|
color = "#93a1a1"
|
||||||
|
}
|
||||||
|
|
||||||
|
external_script current_task {
|
||||||
|
script_path = '${emacsclient "(grfn/org-current-clocked-in-task-message)"}'
|
||||||
|
# format = '{output}'
|
||||||
|
cache_timeout = 60
|
||||||
|
color = "#93a1a1"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# volume master {
|
# volume master {
|
||||||
# format = "☊ %volume"
|
# format = "☊ %volume"
|
||||||
# format_muted = "☊ X"
|
# format_muted = "☊ X"
|
||||||
|
@ -189,12 +243,12 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = with solarized; {
|
settings = with solarized; {
|
||||||
global = {
|
global = {
|
||||||
font = "Meslo 6";
|
font = "Meslo 10";
|
||||||
allow_markup = true;
|
allow_markup = true;
|
||||||
format = "<b>%s</b>\n%b";
|
format = "<b>%s</b>\n%b";
|
||||||
sort = true;
|
sort = true;
|
||||||
alignment = "left";
|
alignment = "left";
|
||||||
geometry = "600x5-30+20";
|
geometry = "600x15-30+20";
|
||||||
idle_threshold = 120;
|
idle_threshold = 120;
|
||||||
separator_color = "frame";
|
separator_color = "frame";
|
||||||
};
|
};
|
||||||
|
@ -230,4 +284,11 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
iconTheme.name = "Adwaita";
|
||||||
|
theme.name = "Adwaita";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue