aboutsummaryrefslogtreecommitdiffstats
path: root/modules/home.legacy/wms
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-02-02 18:14:33 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-02-02 18:25:39 +0100
commit34b8b4c52e4afa8b854e6c3d37780ce5faf74c05 (patch)
tree31079c091c83c7d02d1e9a4f7a9a34eb9db7f91e /modules/home.legacy/wms
parentfeat(lib): Init `baseLib` (diff)
downloadnixos-config-34b8b4c52e4afa8b854e6c3d37780ce5faf74c05.zip
refactor(modules/river): Migrate to `by-name`
This includes a near rewrite `river-mk-keymap` (previously, `river_init_lesser`.)
Diffstat (limited to 'modules/home.legacy/wms')
-rw-r--r--modules/home.legacy/wms/default.nix1
-rw-r--r--modules/home.legacy/wms/river/default.nix91
-rwxr-xr-xmodules/home.legacy/wms/river/init.sh80
-rw-r--r--modules/home.legacy/wms/river/res/keys.ron58
-rw-r--r--modules/home.legacy/wms/river/res/moonlander.ron66
5 files changed, 0 insertions, 296 deletions
diff --git a/modules/home.legacy/wms/default.nix b/modules/home.legacy/wms/default.nix
index 610ea2f4..340978f1 100644
--- a/modules/home.legacy/wms/default.nix
+++ b/modules/home.legacy/wms/default.nix
@@ -1,7 +1,6 @@
{config, ...}: {
imports = [
# ./sway
- ./river
# ./plasma
];
}
diff --git a/modules/home.legacy/wms/river/default.nix b/modules/home.legacy/wms/river/default.nix
deleted file mode 100644
index 9463e94e..00000000
--- a/modules/home.legacy/wms/river/default.nix
+++ /dev/null
@@ -1,91 +0,0 @@
-{
- pkgs,
- sysLib,
- river_init_lesser,
- nixosConfig,
- system,
- qmk_firmware,
- ...
-}: let
- inherit (nixosConfig.networking) hostName;
- mappings =
- if hostName == "tiamat"
- then ''
- err_fail riverctl keyboard-layout 'us-modified'
- err_fail river_init_lesser ~/.config/river/res/moonlander.ron
- ''
- else if hostName == "lahmu" || hostName == "apzu" || hostName == "mammun" || hostName == "isimud"
- then ''
- err_fail riverctl keyboard-layout 'dvorak-modified'
- err_fail river_init_lesser ~/.config/river/res/keys.ron
- ''
- else builtins.throw "Host not covered in river mappings";
- screen_setup =
- if hostName == "lahmu"
- then ''
- err_fail wlr-randr --output Virtual-1 --mode 1920x1080
- ''
- else if hostName == "tiamat"
- then ''
- err_fail wlr-randr --output DP-2 --pos 2560,0
- err_fail wlr-randr --output DP-1 --scale 1.5 --pos 0,0
- err_fail gammastep &
- ''
- else if hostName == "apzu" || hostName == "mammun" || hostName == "isimud"
- then ''
- err_fail gammastep &
- ''
- else builtins.throw "Host not covered in river screen setup";
- env_vars = "XDG_CURRENT_DESKTOP=river DESKTOP_SESSION=river";
- init_scr = pkgs.substituteAll {
- src = ./init.sh;
- inherit mappings screen_setup env_vars;
- };
-in {
- home.sessionVariables = {
- WM = "river";
- XDG_CURRENT_DESKTOP = "river";
- DESKTOP_SESSION = "river";
-
- # Export Wayland env Vars {{{
- QT_QPA_PLATFORM = "wayland";
- QT_QPA_PLATFORMTHEME = "qt5ct"; # needs qt5ct
- CLUTTER_BACKEND = "wayland";
- SDL_VIDEODRIVER = "wayland"; # might brake some things
- # }}}
- };
-
- xdg.configFile."river/init".source =
- sysLib.writeShellScript {
- name = "river_init";
- src = init_scr;
- keepPath = true;
- dependencies = builtins.attrValues {
- river_init_lesser = river_init_lesser.packages.${system}.default;
- inherit (qmk_firmware.packages.${system}) qmk_unicode_type;
-
- inherit
- (pkgs)
- dash
- river
- glib # gnome lib
- gammastep
- wlr-randr
- yambar
- mako
- swaybg
- swayidle
- swaylock
- alacritty
- ;
- };
- }
- + /bin/river_init;
-
- # TODO: These mappings should be generated in nix. (Which would allow to replace the
- # `mpc` pat adding.) <2024-11-16>
-
- # Needed for the key-mappings.
- home.packages = [pkgs.mpc];
- xdg.configFile."river/res".source = ./res;
-}
diff --git a/modules/home.legacy/wms/river/init.sh b/modules/home.legacy/wms/river/init.sh
deleted file mode 100755
index 06a2e2f4..00000000
--- a/modules/home.legacy/wms/river/init.sh
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/env bash
-
-# shellcheck source=/dev/null
-SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH
-
-err_fail() {
- if ! "$@"; then
- warning "\"$*\" failed!\n" >>~/river_log
- # msg "Executing the safe init!"
- # exec ~/.config/river/res/safe_init.sh
- fi
-}
-err_fail rm ~/river_log
-exec 1>>"$HOME"/river_log
-exec 2>>"$HOME"/river_log
-
-#trap err_fail ERR
-
-#Setup of environment variables {{{
-err_fail riverctl spawn "exec dbus-update-activation-environment --systemd SEATD_SOCK DISPLAY WAYLAND_DISPLAY DESKTOP_SESSION=river XDG_CURRENT_DESKTOP=river"
-export @env_vars@
-#}}}
-
-# Setup of mappings {{{
-@mappings@
-# }}}
-
-# Setup of Rules {{{
-err_fail riverctl rule-add -app-id float -title '*' float
-err_fail riverctl rule-add -app-id mpv -title '*' float
-err_fail riverctl rule-add -app-id ModernGL -title '*' float
-err_fail riverctl rule-add -app-id '*' -title 'Manim Slides' float
-err_fail riverctl rule-add -app-id '*' -title 'floating please' float
-
-err_fail riverctl rule-add -app-id '*' -title '*' ssd
-err_fail riverctl rule-add -app-id firefox -title '*' csd # This remove the focus border around Firefox (which is useful because the Firefox is nearly always in its own tag.)
-# }}}
-
-# Set riverctl settings {{{
-# background
-err_fail riverctl background-color 0x002b36
-err_fail riverctl border-color-focused 0x93a1a1
-err_fail riverctl border-color-unfocused 0x586e75
-
-# keyboard repeat rate
-err_fail riverctl set-repeat 50 300
-
-# Cursor
-err_fail riverctl focus-follows-cursor normal
-#riverctl hide-cursor timeout 2000
-err_fail riverctl hide-cursor when-typing enabled
-err_fail riverctl set-cursor-warp on-output-change
-err_fail riverctl xcursor-theme Nordzy-cursors 24
-
-err_fail riverctl input pointer-1133-49970-Logitech_Gaming_Mouse_G502 pointer-accel 0
-err_fail riverctl input pointer-1133-49970-Logitech_Gaming_Mouse_G502 accel-profile none
-
-err_fail riverctl input pointer-12951-6505-ZSA_Technology_Labs_Moonlander_Mark_I pointer-accel 0
-err_fail riverctl input pointer-12951-6505-ZSA_Technology_Labs_Moonlander_Mark_I accel-profile none
-# }}}
-
-# Setup of general apps {{{
-@screen_setup@
-
-err_fail yambar &
-
-err_fail mako &
-err_fail swaybg -i "$WALLPAPER" &
-err_fail swayidle &
-err_fail alacritty &
-# }}}
-
-# Setup of layout [acts as exec!] {{{
-err_fail riverctl default-layout rivertile
-@env_vars@ rivertile -main-ratio 0.5 -view-padding 1 -outer-padding 0
-
-#riverctl default-layout luatile
-#river-luatile
-# }}}
-# vim: ft=sh
diff --git a/modules/home.legacy/wms/river/res/keys.ron b/modules/home.legacy/wms/river/res/keys.ron
deleted file mode 100644
index a2bc0fa1..00000000
--- a/modules/home.legacy/wms/river/res/keys.ron
+++ /dev/null
@@ -1,58 +0,0 @@
-#![enable(implicit_some)]
-RiverctlCommandArray(
- commands: [
- // Focus change
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Super", command: "focus-view", command_args: "next",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "N", mods: "Super", command: "focus-view", command_args: "previous",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Super+Control", command: "focus-output", command_args: "next",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "N", mods: "Super+Control", command: "focus-output", command_args: "previous",),
-
- // Standard program
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Return", mods: "Super", command: "spawn", command_args: "alacritty",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "q", mods: "Super+Shift", command: "exit", command_args: None,),
-
- // Screenshot
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Print", mods: "None", command: "spawn", command_args: "screenshot_persistent",),
-
- // Audio
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "XF86AudioRaiseVolume", mods: "None", command: "spawn", command_args: "pactl set-sink-volume 1 +5%",),
- RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "XF86AudioLowerVolume", mods: "None", command: "spawn", command_args: "pactl set-sink-volume 1 -5%",),
- RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "XF86AudioMute", mods: "None", command: "spawn", command_args: "mpc toggle",),
-
- // Launcher
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "R", mods: "Super", command: "spawn", command_args: "rofi -show combi -modes combi -combi-modes 'window,drun,run' -show-icons",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F1", mods: "Super", command: "spawn", command_args: "neorg dmenu",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F2", mods: "Super", command: "spawn", command_args: "keepassxc",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F3", mods: "Super", command: "spawn", command_args: "signal-desktop",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F4", mods: "Super", command: "spawn", command_args: "steam",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "L", mods: "Super", command: "spawn", command_args: "lock",),
-
- // Client
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "f", mods: "Super", command: "toggle-fullscreen", command_args: None,),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "c", mods: "Super+Shift", command: "close", command_args: None,),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "space", mods: "Super+Control", command: "toggle-float", command_args: None,),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Return", mods: "Super+Control", command: "zoom", command_args: None,),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "o", mods: "Super", command: "send-to-output", command_args: "next",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Super+Shift", command: "swap", command_args: "next",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "N", mods: "Super+Shift", command: "swap", command_args: "previous",),
-
- // Toggle all tags
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Super", command: "set-focused-tags", command_args: "4294967295"),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Super+Shift", command: "set-view-tags", command_args: "4294967295"),
-
- // Mouse
- RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_LEFT", mods: "Super", command: "move-view", command_args: None,),
- RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_RIGHT", mods: "Super", command: "resize-view", command_args: None,),
-
- ],
- // Set these mappings for the tags 0-8 with key [1-9]
- tags_number: 9,
- tag_commands: [
- RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super", command: "set-focused-tags",),
- RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Shift", command: "set-view-tags",),
- RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Control", command: "toggle-focused-tags",),
- RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Shift+Control", command: "toggle-view-tags",),
- ],
-)
-
-// vim: nolinebreak nowrap textwidth=0
diff --git a/modules/home.legacy/wms/river/res/moonlander.ron b/modules/home.legacy/wms/river/res/moonlander.ron
deleted file mode 100644
index 247c1697..00000000
--- a/modules/home.legacy/wms/river/res/moonlander.ron
+++ /dev/null
@@ -1,66 +0,0 @@
-#![enable(implicit_some)]
-RiverctlCommandArray(
- // TODO: add toggle-focus mapping
- commands: [
- // Movement
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "A", mods: "Alt+Control+Super+Shift", command: "exit", command_args: None,),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "B", mods: "Alt+Control+Super+Shift", command: "close", command_args: None,),
-
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "C", mods: "Alt+Control+Super+Shift", command: "focus-view", command_args: "previous",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "D", mods: "Alt+Control+Super+Shift", command: "focus-view", command_args: "next",),
-
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "E", mods: "Alt+Control+Super+Shift", command: "swap", command_args: "previous",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F", mods: "Alt+Control+Super+Shift", command: "swap", command_args: "next",),
-
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "G", mods: "Alt+Control+Super+Shift", command: "zoom", command_args: None,),
-
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "H", mods: "Alt+Control+Super+Shift", command: "toggle-fullscreen", command_args: None,),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "I", mods: "Alt+Control+Super+Shift", command: "toggle-float", command_args: None,),
-
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "J", mods: "Alt+Control+Super+Shift", command: "send-to-output", command_args: "next",),
-
-
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "K", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "alacritty",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "L", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "screenshot_persistent",),
-
- // Audio
- // RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "M", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "video-pause toggle",),
- RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "N", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "mpc toggle",),
-
- // Launcher
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "O", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "rofi -show combi -modes combi -combi-modes 'window,drun,run' -show-icons",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "P", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "neorg dmenu",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Q", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "keepassxc",),
- // RiverctlCommand( map_mode: Map, mode: ["normal"], key: "R", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "nheko",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "S", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "signal-desktop",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "lock",),
-
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "U", mods: "Alt+Control+Super+Shift", command: "focus-output", command_args: "next",),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "V", mods: "Alt+Control+Super+Shift", command: "focus-previous-tags", command_args: None,),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "W", mods: "Alt+Control+Super+Shift", command: "send-to-previous-tags",command_args: None,),
- //RiverctlCommand( map_mode: Map, mode: ["normal"], key: "X", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "bemenu-run",),
- //RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Y", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "bemenu-run",),
-
-
- // Toggle all tags
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Alt+Control+Super+Shift", command: "set-focused-tags", command_args: "4294967295"),
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Alt+Control+Shift", command: "set-view-tags", command_args: "4294967295"),
-
- // Support Unicode input
- RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Z", mods: "Alt+Control+Super+Shift", command: "spawn", command_args: "qmk-unicode-type 106 65377",),
-
- // Mouse
- RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_LEFT", mods: "Super", command: "move-view", command_args: None,),
- RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_RIGHT", mods: "Super", command: "resize-view", command_args: None,),
- ],
-
- // Set these mappings for the tags 0-8 with key [1-9]
- tags_number: 9,
- tag_commands: [
- RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Alt+Control+Super+Shift", command: "set-focused-tags",),
- RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Alt+Control+Shift", command: "set-view-tags",),
- // TODO: RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Control", command: "toggle-focused-tags",),
- // TODO: RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Shift+Control", command: "toggle-view-tags",),
- ],
-)
-// vim: nolinebreak nowrap textwidth=0