blob: 67507f61b9dbc6304604f7cd277223f3f346813f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
{ pkgs, config, lib, ... }:
let
vars = import ./variables.nix;
mod = "Mod4";
in
{
xsession.windowManager = {
i3 = {
enable = true;
config = {
modifier = mod;
bars = [ ];
window = {
titlebar = false;
border = 10;
};
startup = [
{ command = "sh -c 'feh --bg-fill ${vars.wallpaper}'"; }
];
keybindings = lib.mkOptionDefault {
"${mod}+Return" = "exec ${pkgs.alacritty}/bin/alacritty"; # Lanuch alacritty as a terminal
"${mod}+m" = "exec ${pkgs.dmenu}/bin/dmenu"; # Launch dmenu (app launcher)
"${mod}+q" = "kill"; # Close an app (kill the process)
"${mod}+Alt+l" = "exec ''sh -c 'lock-screen'''"; # Lock screen
"${mod}+Shift+r" = "restart";
"${mod}+Ctrl+Shift+e" = "exec sh -c 'i3-msg exit'";
# === FOCUS === #
# Vim bindings
"${mod}+h" = "focus left";
"${mod}+j" = "focus down";
"${mod}+k" = "focus up";
"${mod}+l" = "focus right";
# Arrow keys
"${mod}+Left" = "focus left";
"${mod}+Down" = "focus down";
"${mod}+Up" = "focus up";
"${mod}+Right" = "focus right";
# === MOVE === #
# Vim bindings
"${mod}+Shift+h" = "move left";
"${mod}+Shift+j" = "move down";
"${mod}+Shift+k" = "move up";
"${mod}+Shift+l" = "move right";
# Arrow keys
"${mod}+Shift+Left" = "focus left";
"${mod}+Shift+Down" = "focus down";
"${mod}+Shift+Up" = "focus up";
"${mod}+Shift+Right" = "focus right";
};
};
};
};
home.packages = with pkgs; [
dmenu # App launcher
i3lock # Lock screen
imagemagick # Handle wallpaper resizing for i3-lock
polybar # Status bar
alacritty # Terminal Emulator
feh # Wallpaper utility
];
}
|