about summary refs log tree commit diff stats
path: root/modules
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
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')
-rwxr-xr-xmodules/by-name/ri/river/init_base.sh20
-rw-r--r--modules/by-name/ri/river/module.nix192
-rw-r--r--modules/home.legacy/files/default.nix1
-rw-r--r--modules/home.legacy/files/wallpaper/abstract-nord.pngbin140219 -> 0 bytes
-rw-r--r--modules/home.legacy/files/wallpaper/default.nix14
-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
10 files changed, 211 insertions, 312 deletions
diff --git a/modules/by-name/ri/river/init_base.sh b/modules/by-name/ri/river/init_base.sh
new file mode 100755
index 00000000..5ed1d00a
--- /dev/null
+++ b/modules/by-name/ri/river/init_base.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env sh
+
+err_fail() {
+    if ! "$@"; then
+        output=""
+        for arg in "$@"; do
+            if [ -z "$output" ]; then
+                output="'$arg'"
+            else
+                output="$output '$arg'"
+            fi
+        done
+        printf "%s failed!\n" "$output" >>~/river_log
+    fi
+}
+err_fail rm ~/river_log
+exec 1>>"$HOME"/river_log
+exec 2>>"$HOME"/river_log
+
+# Start of the generated stuff.
diff --git a/modules/by-name/ri/river/module.nix b/modules/by-name/ri/river/module.nix
index a059da4d..1f1f2cae 100644
--- a/modules/by-name/ri/river/module.nix
+++ b/modules/by-name/ri/river/module.nix
@@ -3,19 +3,209 @@
   lib,
   qmk_firmware,
   system,
+  pkgs,
   ...
 }: let
   cfg = config.soispha.programs.river;
+  esa = lib.strings.escapeShellArg;
+  riverctl = lib.getExe' pkgs.river "riverctl";
+
+  mkOutputFlags = output: flags: let
+    expandedFlags = builtins.concatStringsSep " " (lib.attrsets.mapAttrsToList (flag: value: "--${esa flag} ${esa value}") flags);
+  in ''
+    err_fail ${lib.getExe pkgs.wlr-randr} --output ${esa output} ${expandedFlags}
+  '';
+  screenSetupCode = builtins.concatStringsSep "" (lib.attrsets.mapAttrsToList mkOutputFlags cfg.init.screenSetupCode);
+
+  mkLrProgram = input: let
+    program = builtins.concatStringsSep " " (
+      if lib.isDerivation input
+      then [(lib.getExe input)]
+      else builtins.map esa input
+    );
+  in "err_fail ${program} &";
+  longRunningPrograms = builtins.concatStringsSep "\n" (builtins.map mkLrProgram cfg.init.backgroundStart);
+
+  keymapFormat = pkgs.formats.json {};
+
+  keymappings = ''
+    err_fail ${riverctl} keyboard-layout ${esa cfg.init.mappings.layout}
+    err_fail ${lib.getExe pkgs.river-mk-keymap} ${keymapFormat.generate "keys.json" cfg.init.mappings.keymap}
+  '';
+
+  mkRule = {
+    app-id,
+    title,
+    action,
+  }: ''
+    err_fail ${riverctl} rule-add -app-id ${esa app-id} -title ${esa title} ${esa action}
+  '';
+  ruleSetup = builtins.concatStringsSep "" (builtins.map mkRule cfg.init.rules);
+
+  mkSetting = name: maybe_values: let
+    rawValues =
+      if builtins.isString maybe_values
+      then [maybe_values]
+      else maybe_values;
+    values = builtins.concatStringsSep " " (builtins.map esa rawValues);
+  in ''
+    err_fail ${riverctl} ${esa name} ${values}
+  '';
+  generalSettings =
+    builtins.concatStringsSep "" (lib.attrsets.mapAttrsToList mkSetting
+      cfg.init.generalSettings);
+
+  mkInput = name: arguments:
+    builtins.concatStringsSep "" (builtins.map (argumentLine: mkSetting "input" ([name] ++ argumentLine)) arguments);
+  inputs =
+    builtins.concatStringsSep "" (lib.attrsets.mapAttrsToList mkInput cfg.init.inputs);
 in {
   options.soispha.programs.river = {
     enable = lib.mkEnableOption "river";
+
     unicodeInput = {
       enable = lib.mkEnableOption "udev rules for rawhid based unicode input";
     };
+
+    init = {
+      mappings = {
+        layout = lib.mkOption {
+          type = lib.types.str;
+          description = "The keymap to use";
+          default = "dvorak-modified";
+        };
+
+        keymap = lib.mkOption {
+          type = lib.types.submodule {
+            freeformType = keymapFormat.type;
+
+            options = {};
+          };
+          default = {};
+
+          description = ''
+            Configuration for river-mk-keymap via `keys.json`.
+          '';
+        };
+      };
+
+      rules = lib.mkOption {
+        type = lib.types.listOf (lib.types.attrsOf lib.types.str);
+        default = [];
+
+        example = ''
+          [
+            {
+              app-id = "*";
+              title = "floating please";
+              action = "float";
+            }
+            {
+              app-id = "*";
+              title = "*";
+              action = "ssd";
+            }
+          ]
+        '';
+
+        description = ''
+          Configuration for river_init_lesser via `keys.json`.
+        '';
+      };
+
+      generalSettings = lib.mkOption {
+        type = lib.types.attrsOf (lib.types.either (lib.types.listOf lib.types.str) lib.types.str);
+        description = "Simple key value settings.";
+        default = {};
+        example = ''
+          {
+            background-color = "0x002b36";
+            set-repeat = ["50" "300"];
+            hide-cursor = ["when-typing" "enabled"];
+          }
+        '';
+      };
+
+      inputs = lib.mkOption {
+        type = lib.types.attrsOf (lib.types.listOf (lib.types.listOf lib.types.str));
+        description = "Options to set per input device";
+        default = {};
+        example = ''
+          {
+            pointer-1133-49970-Logitech_Gaming_Mouse_G502 = [["pointer-accel" "0"] ["accel-profile" "none"]];
+            pointer-12951-6505-ZSA_Technology_Labs_Moonlander_Mark_I = [["pointer-accel" "0"] ["accel-profile" "none"]];
+          }
+        '';
+      };
+
+      backgroundStart = lib.mkOption {
+        type = lib.types.listOf (lib.types.either lib.types.package (lib.types.listOf lib.types.str));
+        description = "List of programs to start in the background";
+        example = ''
+          [
+            pkgs.gammastep
+          ]
+        '';
+      };
+
+      screenSetupCode = lib.mkOption {
+        type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
+        default = {};
+        description = ''
+          `wlr-randr` flags to set up outputs. The attribute names are the `--output` keys
+          and the attrs are flag value pairs to setup.
+        '';
+        example = ''
+          {
+            "Virtual-1" = {mode = "1920x1080";};
+            "DP-2" = {pos = "2560,0";};
+            "DP-1" = {scale = "1.5"; pos = "0,0";};
+          }
+        '';
+      };
+    };
   };
 
   config = lib.mkIf cfg.enable {
-    # TODO: Migrate the complete river module <2024-12-30>
     services.udev.packages = lib.mkIf cfg.unicodeInput.enable [qmk_firmware.packages.${system}.qmk_unicode_type];
+
+    home-manager.users.soispha = {
+      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".text = let
+        mkHeading = text: other_stuff: ''
+          # ${text}
+          ${other_stuff}
+        '';
+      in
+        builtins.readFile ./init_base.sh
+        +
+        # bash
+        mkHeading "Environment variables" ''
+          err_fail ${riverctl} spawn "${lib.getExe' pkgs.dbus "dbus-update-activation-environment"} --verbose --systemd SEATD_SOCK DISPLAY WAYLAND_DISPLAY DESKTOP_SESSION=river XDG_CURRENT_DESKTOP=river"
+          export XDG_CURRENT_DESKTOP=river DESKTOP_SESSION=river;
+        ''
+        + mkHeading "Key Mappings" keymappings
+        + mkHeading "Rules" ruleSetup
+        + mkHeading "General Settings" generalSettings
+        + mkHeading "Input Section" inputs
+        + mkHeading "Screen setup code" screenSetupCode
+        + mkHeading "Background services" longRunningPrograms
+        + mkHeading "Layout Setup" ''
+          err_fail ${riverctl} default-layout rivertile
+          ${lib.getExe' pkgs.river "rivertile"} -main-ratio 0.5 -view-padding 1 -outer-padding 0
+        '';
+    };
   };
 }
diff --git a/modules/home.legacy/files/default.nix b/modules/home.legacy/files/default.nix
index 16fe9afe..50b340b8 100644
--- a/modules/home.legacy/files/default.nix
+++ b/modules/home.legacy/files/default.nix
@@ -1,6 +1,5 @@
 {...}: {
   imports = [
-    ./wallpaper
     ./manifest_json
   ];
 }
diff --git a/modules/home.legacy/files/wallpaper/abstract-nord.png b/modules/home.legacy/files/wallpaper/abstract-nord.png
deleted file mode 100644
index 5ef498bf..00000000
--- a/modules/home.legacy/files/wallpaper/abstract-nord.png
+++ /dev/null
Binary files differdiff --git a/modules/home.legacy/files/wallpaper/default.nix b/modules/home.legacy/files/wallpaper/default.nix
deleted file mode 100644
index 119df225..00000000
--- a/modules/home.legacy/files/wallpaper/default.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{config, ...}: {
-  home = {
-    sessionVariables = {
-      WALLPAPER = "${config.home.homeDirectory}/media/pictures/wallpaper";
-    };
-
-    file = {
-      wallpaper = {
-        source = ./abstract-nord.png;
-        target = "media/pictures/wallpaper";
-      };
-    };
-  };
-}
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