about summary refs log tree commit diff stats
path: root/home-manager/wms
diff options
context:
space:
mode:
Diffstat (limited to 'home-manager/wms')
-rw-r--r--home-manager/wms/river/default.nix2
-rwxr-xr-xhome-manager/wms/river/init21
-rw-r--r--home-manager/wms/river/res/moonlander.ron64
3 files changed, 81 insertions, 6 deletions
diff --git a/home-manager/wms/river/default.nix b/home-manager/wms/river/default.nix
index d1a8606b..79830487 100644
--- a/home-manager/wms/river/default.nix
+++ b/home-manager/wms/river/default.nix
@@ -1,5 +1,4 @@
 {
-  config,
   pkgs,
   sysLib,
   river_init_lesser,
@@ -22,6 +21,7 @@
           mako
           swaybg
           swayidle
+          swaylock
           alacritty
           ;
       };
diff --git a/home-manager/wms/river/init b/home-manager/wms/river/init
index dd99a2da..fbe3062d 100755
--- a/home-manager/wms/river/init
+++ b/home-manager/wms/river/init
@@ -20,8 +20,18 @@ err_fail export XDG_CURRENT_DESKTOP=river
 #}}}
 
 # Setup of mappings {{{
-err_fail riverctl keyboard-layout 'dvorak'
-err_fail river_init_lesser ~/.config/river/res/keys.ron
+case $(cat /etc/hostname) in
+    "lahmu")
+        err_fail riverctl keyboard-layout 'dvorak'
+        err_fail river_init_lesser ~/.config/river/res/keys.ron
+        ;;
+    "tiamat")
+        err_fail riverctl keyboard-layout 'us'
+        err_fail river_init_lesser ~/.config/river/res/moonlander.ron
+        ;;
+    *)
+        warning "Host not supported for keymapping"
+esac
 # }}}
 
 # Setup of Rules {{{
@@ -40,13 +50,14 @@ err_fail riverctl border-color-focused 0x93a1a1
 err_fail riverctl border-color-unfocused 0x586e75
 
 # keyboard repeat rate
-err_fail riverctl set-repeat 50 300
+#err_fail riverctl set-repeat 50 300
 
 # Cursor
-err_fail riverctl focus-follows-cursor always
+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
@@ -64,7 +75,7 @@ case $(cat /etc/hostname) in
         err_fail gammastep &
         ;;
     *)
-        warning "Host not supported"
+        warning "Host not supported for screen"
 esac
 
 err_fail yambar &
diff --git a/home-manager/wms/river/res/moonlander.ron b/home-manager/wms/river/res/moonlander.ron
new file mode 100644
index 00000000..33fc4e56
--- /dev/null
+++ b/home-manager/wms/river/res/moonlander.ron
@@ -0,0 +1,64 @@
+#![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: "screen_shot",),
+
+    // Audio
+    RiverctlCommand( map_mode: Map,         mode: ["normal", "locked"], key: "M", mods: "Alt+Control+Super+Shift", command: "spawn",                command_args: "stop_playing_sound",),
+    RiverctlCommand( map_mode: Map,         mode: ["normal", "locked"], key: "N", mods: "Alt+Control+Super+Shift", command: "spawn",                command_args: "mpc --host /run/user/1000/mpd/socket toggle",), // TODO don't hardcode uid
+
+    // Launcher
+    RiverctlCommand( map_mode: Map,         mode: ["normal"],           key: "O", mods: "Alt+Control+Super+Shift", command: "spawn",                command_args: "bemenu-run",),
+    RiverctlCommand( map_mode: Map,         mode: ["normal"],           key: "P", mods: "Alt+Control+Super+Shift", command: "spawn",                command_args: "firefox",),
+    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: "steam",),
+    RiverctlCommand( map_mode: Map,         mode: ["normal"],           key: "T", mods: "Alt+Control+Super+Shift", command: "spawn",                command_args: "swaylock -f",),
+
+    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",),
+    //RiverctlCommand( map_mode: Map,         mode: ["normal"],           key: "Z", 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"),
+
+    // 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",),
+    ],
+)
+