141 lines
3.4 KiB
Nix
141 lines
3.4 KiB
Nix
# hm/desktop/bspwm.nix
|
|
{
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: {
|
|
imports = [
|
|
../common/betterlockscreen.nix
|
|
../common/picom.nix
|
|
../common/polybar.nix
|
|
];
|
|
home.packages = with pkgs; [
|
|
bspwm
|
|
sxhkd
|
|
xorg.xinit
|
|
xterm
|
|
alacritty
|
|
rofi
|
|
feh
|
|
font-awesome
|
|
pywal16
|
|
imagemagick
|
|
pulsemixer
|
|
ranger
|
|
jq
|
|
file
|
|
highlight
|
|
unzip
|
|
mpv
|
|
protonvpn-gui
|
|
];
|
|
|
|
services.ssh-agent.enable = true;
|
|
|
|
xsession = {
|
|
enable = true;
|
|
windowManager.bspwm = {
|
|
enable = true;
|
|
|
|
startupPrograms = [
|
|
"sxhkd -m 1"
|
|
"setxkbmap bepovim"
|
|
"xrandr --output DisplayPort-1 --rate 60 --pos 0x0"
|
|
"polybar main"
|
|
"bash ~/.fehbg"
|
|
];
|
|
|
|
extraConfigEarly = ''
|
|
bspc config borderless_monocle true
|
|
bspc config gapless_monocle true
|
|
bspc config single_monocle true
|
|
bspc monitor -d I II III IV V VI
|
|
'';
|
|
};
|
|
};
|
|
|
|
services = {
|
|
sxhkd = {
|
|
enable = true;
|
|
extraOptions = ["-m" "1"];
|
|
keybindings = {
|
|
"super + Return" = "alacritty";
|
|
"super + c" = "bspc node -c";
|
|
"Menu" = "rofi -show drun";
|
|
"super + space" = "rofi -show drun";
|
|
|
|
"F1" = "bspc desktop -f ^1";
|
|
"F2" = "bspc desktop -f ^2";
|
|
"F3" = "bspc desktop -f ^3";
|
|
"F4" = "bspc desktop -f ^4";
|
|
"F5" = "bspc desktop -f ^5";
|
|
"F6" = "bspc desktop -f ^6";
|
|
|
|
"shift + F1" = "bspc node -d ^1 --follow";
|
|
"shift + F2" = "bspc node -d ^2 --follow";
|
|
"shift + F3" = "bspc node -d ^3 --follow";
|
|
"shift + F4" = "bspc node -d ^4 --follow";
|
|
"shift + F5" = "bspc node -d ^5 --follow";
|
|
"shift + F6" = "bspc node -d ^6 --follow";
|
|
|
|
"super + h" = "bspc node -f west";
|
|
"super + j" = "bspc node -f south";
|
|
"super + k" = "bspc node -f north";
|
|
"super + l" = "bspc node -f east";
|
|
|
|
"super + shift + h" = "bspc node -s west";
|
|
"super + shift + j" = "bspc node -s south";
|
|
"super + shift + k" = "bspc node -s north";
|
|
"super + shift + l" = "bspc node -s east";
|
|
|
|
"super + f" = "bspc node -t fullscreen";
|
|
"super + s" = "bspc node -t floating";
|
|
"super + shift + t" = "bspc node -t pseudo_tiled";
|
|
"super + t" = "bspc node -t tiled";
|
|
};
|
|
};
|
|
};
|
|
|
|
programs = {
|
|
alacritty = {
|
|
enable = true;
|
|
settings = {
|
|
general.import = ["~/.cache/wal/colors-alacritty.toml"];
|
|
font = {
|
|
normal = {
|
|
family = lib.mkForce "Iosevka Nerd Font";
|
|
style = "Regular";
|
|
};
|
|
bold = {
|
|
family = lib.mkForce "Iosevka Nerd Font";
|
|
style = "Bold";
|
|
};
|
|
italic = {
|
|
family = lib.mkForce "Iosevka Nerd Font";
|
|
style = "Italic";
|
|
};
|
|
size = lib.mkForce 8;
|
|
};
|
|
};
|
|
};
|
|
|
|
rtorrent = {
|
|
enable = true;
|
|
extraConfig = ''
|
|
directory = /srv/raid
|
|
port_range = 6881-6891
|
|
max_peers = 150
|
|
max_peers_seed = 100
|
|
protocol.pex.set = true ;
|
|
schedule = watch_directory,5,5,load.start=~/Téléchargements/*.torrent
|
|
pieces.hash.on_completion.set = no
|
|
network.max_open_files.set = 8192
|
|
session = /home/lomig/.cache/rtorrent/session
|
|
'';
|
|
};
|
|
};
|
|
|
|
home.activation.createRtorrentSessionDir = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
|
mkdir -p ~/.cache/rtorrent/session
|
|
'';
|
|
}
|