chore: move out of useless nixos directory

This commit is contained in:
Khaïs COLIN 2024-08-26 13:38:20 +02:00
parent f76bee6384
commit ec6d839450
52 changed files with 0 additions and 0 deletions

8
wm/default.nix Normal file
View file

@ -0,0 +1,8 @@
{
imports = [
./river.nix
./swaylock.nix
./waybar.nix
./wluma.nix
];
}

133
wm/river.nix Normal file
View file

@ -0,0 +1,133 @@
let
lock-command = "swaylock";
in
{
wayland.windowManager.river = {
enable = true;
extraConfig = ''
rivertile -view-padding 0 -outer-padding 0 &
pkill waybar
waybar &
wlr-randr --output DP-1 --pos 1280,0 --output HDMI-A-1 --pos 0,0
'';
settings = {
border-width = 2;
keyboard-layout = "fr";
default-layout = "rivertile";
focus-follows-cursor = "normal";
map = {
normal = {
# screen lock & suspend
"Control+Alt L" = "spawn '${lock-command}'";
"Control+Alt+Shift L" = "spawn '${lock-command} & systemctl suspend'";
# terminal
"Super Return" = "spawn kitty";
# frequent programs
"Super Q" = "spawn firefox";
"Super D" = "spawn discord";
"Super G" = "spawn dolphin";
# program launcher
"Super R" = "spawn fuzzel";
# quit river
"Super+Alt+Control Q" = "exit";
# manipulate current view
"Super W" = "close";
"Super M" = "toggle-fullscreen";
"Super S" = "toggle-float";
"Super F" = "toggle-fullscreen";
# view focus
"Super H" = "focus-view left";
"Super J" = "focus-view down";
"Super K" = "focus-view up";
"Super L" = "focus-view right";
"Super I" = "focus-view previous";
"Super O" = "focus-view next";
# view movement
"Super+Shift H" = "swap left";
"Super+Shift J" = "swap down";
"Super+Shift K" = "swap up";
"Super+Shift L" = "swap right";
"Super+Shift I" = "swap previous";
"Super+Shift O" = "swap next";
# layout management
"Super+Alt H" = "send-layout-cmd rivertile 'main-ratio -0.05'";
"Super+Alt L" = "send-layout-cmd rivertile 'main-ratio +0.05'";
"Super+Alt J" = "send-layout-cmd rivertile 'main-count -1'";
"Super+Alt K" = "send-layout-cmd rivertile 'main-count +1'";
# tag (workspace) management
## rotate workspace
"Super Right" = "spawn 'river-shifttags --num-tags 10 --shifts 1'";
"Super Left" = "spawn 'river-shifttags --num-tags 10 --shifts -1'";
## switch to workspace
"Super ampersand" = "set-focused-tags 1";
"Super eacute" = "set-focused-tags 2";
"Super quotedbl" = "set-focused-tags 4";
"Super apostrophe" = "set-focused-tags 8";
"Super parenleft" = "set-focused-tags 16";
"Super minus" = "set-focused-tags 32";
"Super egrave" = "set-focused-tags 64";
"Super underscore" = "set-focused-tags 128";
"Super ccedilla" = "set-focused-tags 256";
"Super agrave" = "set-focused-tags 512";
## toggle workspace display
"Super+Alt ampersand" = "toggle-focused-tags 1";
"Super+Alt eacute" = "toggle-focused-tags 2";
"Super+Alt quotedbl" = "toggle-focused-tags 4";
"Super+Alt apostrophe" = "toggle-focused-tags 8";
"Super+Alt parenleft" = "toggle-focused-tags 16";
"Super+Alt minus" = "toggle-focused-tags 32";
"Super+Alt egrave" = "toggle-focused-tags 64";
"Super+Alt underscore" = "toggle-focused-tags 128";
"Super+Alt ccedilla" = "toggle-focused-tags 256";
"Super+Alt agrave" = "toggle-focused-tags 512";
## send to workspace
"Super+Shift ampersand" = "set-view-tags 1";
"Super+Shift eacute" = "set-view-tags 2";
"Super+Shift quotedbl" = "set-view-tags 4";
"Super+Shift apostrophe" = "set-view-tags 8";
"Super+Shift parenleft" = "set-view-tags 16";
"Super+Shift minus" = "set-view-tags 32";
"Super+Shift egrave" = "set-view-tags 64";
"Super+Shift underscore" = "set-view-tags 128";
"Super+Shift ccedilla" = "set-view-tags 256";
"Super+Shift agrave" = "set-view-tags 512";
## toggle visibility of window in workspace
"Super+Alt+Shift ampersand" = "toggle-view-tags 1";
"Super+Alt+Shift eacute" = "toggle-view-tags 2";
"Super+Alt+Shift quotedbl" = "toggle-view-tags 4";
"Super+Alt+Shift apostrophe" = "toggle-view-tags 8";
"Super+Alt+Shift parenleft" = "toggle-view-tags 16";
"Super+Alt+Shift minus" = "toggle-view-tags 32";
"Super+Alt+Shift egrave" = "toggle-view-tags 64";
"Super+Alt+Shift underscore" = "toggle-view-tags 128";
"Super+Alt+Shift ccedilla" = "toggle-view-tags 256";
"Super+Alt+Shift agrave" = "toggle-view-tags 512";
# music player control
# We have to specify None as the modifier, else riverctl complains that XF86Etc is not a valid modifier
"None XF86AudioPlay" = "spawn 'playerctl play-pause'";
"None Scroll_Lock" = "spawn 'playerctl previous'";
"None XF86AudioNext" = "spawn 'playerctl next'";
"None Pause" = "spawn 'cmus-remote -C player-next-album'";
"None XF86Bluetooth" = "spawn 'playerctl play-pause'";
"None XF86Tools" = "spawn 'playerctl previous'";
"None XF86Keyboard" = "spawn 'playerctl next'";
"None XF86Favorites" = "spawn 'cmus-remote -C player-next-album'";
# screen backlight brightness control
"None XF86MonBrightnessDown" = "spawn 'brightnessctl set 1%-'";
"None XF86MonBrightnessUp" = "spawn 'brightnessctl set 1%+'";
# audio volume control
"None XF86AudioLowerVolume" = "spawn 'wpctl set-volume @DEFAULT_SINK@ 1%-'";
"None XF86AudioRaiseVolume" = "spawn 'wpctl set-volume @DEFAULT_SINK@ 1%+'";
"None XF86AudioMute" = "spawn 'wpctl set-mute @DEFAULT_SINK@ toggle'";
};
};
map-pointer = {
normal = {
"Super BTN_LEFT" = "move-view";
"Super BTN_RIGHT" = "resize-view";
"Super BTN_MIDDLE" = "toggle-float";
};
};
};
};
}

11
wm/swaylock.nix Normal file
View file

@ -0,0 +1,11 @@
{
programs.swaylock = {
enable = true;
settings = {
ignore-empty-password = true;
show-failed-attempts = true;
daemonize = true;
show-keyboard-layout = true;
};
};
}

80
wm/waybar.nix Normal file
View file

@ -0,0 +1,80 @@
{
programs.waybar = {
enable = true;
style = ''
* {
border: none;
border-radius: 0;
padding: 0;
font-family: "VictorMono Nerd Font";
font-size: 10pt;
}
* {
transition: none;
}
#tags button.focused {
border-top: 2px solid @base05;
border-bottom: 2px solid @base05;
}
#tags button.occupied {
background-color: @base02;
}
#tags button.urgent {
background-color: @base08;
color: @base00;
}
'';
settings = {
mainBar = {
layer = "top";
position = "top";
height = 16;
output = [
"eDP-1"
"DP-1"
"HDMI-A-1"
];
modules-left = [
"river/tags"
"clock"
];
modules-center = [
"mpris"
];
modules-right = [
"pulseaudio"
"network"
"memory"
"cpu"
"temperature"
"battery"
"tray"
];
"river/tags" = {
num-tags = 10;
tag-labels = [ "1" "2" "3" "4" "5" "6" "7" "8" "9" "0" ];
set-tags = [ 1 2 4 8 16 32 64 128 256 512 ];
toogle-tags = [ 1 2 4 8 16 32 64 128 256 512 ];
};
"mpris" = {
interval = 1;
};
"pulseaudio" = {
format = "V{volume}%";
format-muted = "(mute)";
};
"network" = {
format = "disconected";
format-wifi = "{bandwidthTotalBytes}";
format-ethernet = "{bandwidthTotalBytes}";
format-disconected = "disconected";
interval = 1;
};
};
};
};
}

11
wm/wluma-config.toml Normal file
View file

@ -0,0 +1,11 @@
[als.time]
thresholds = { 0 = "night", 7 = "dark", 9 = "dim", 11 = "normal", 13 = "bright", 16 = "normal", 18 = "dark", 20 = "night" }
[[output.backlight]]
name = "eDP-1"
path = "/sys/class/backlight/intel_backlight"
capturer = "wlroots"
[[keyboard]]
name = "keyboard-t470"
path = "/sys/bus/platform/devices/thinkpad_acpi/leds/tpacpi::kbd_backlight/"

5
wm/wluma.nix Normal file
View file

@ -0,0 +1,5 @@
{
home.file.".config/wluma/config.toml" = {
source = ./wluma-config.toml;
};
}