From 8b3c85fa1720158ecd85ed5cf50aba8da30060bc Mon Sep 17 00:00:00 2001 From: Daniel Patterson Date: Thu, 11 Apr 2024 23:10:47 +0100 Subject: [PATCH] more river --- hosts/common/graphical/default.nix | 5 +- users/configs/desktop/river/default.nix | 77 +++++++++++++++++-------- users/configs/desktop/river/pingbox | 3 + users/configs/desktop/river/sidon | 3 + 4 files changed, 64 insertions(+), 24 deletions(-) create mode 100644 users/configs/desktop/river/pingbox create mode 100644 users/configs/desktop/river/sidon diff --git a/hosts/common/graphical/default.nix b/hosts/common/graphical/default.nix index 8cb4b63..c2ef7c7 100644 --- a/hosts/common/graphical/default.nix +++ b/hosts/common/graphical/default.nix @@ -53,7 +53,10 @@ programs = { hyprland.enable = true; - river.enable = true; + river = { + enable = true; + package = null; + }; steam = { enable = true; diff --git a/users/configs/desktop/river/default.nix b/users/configs/desktop/river/default.nix index 90a36ed..26d4e60 100644 --- a/users/configs/desktop/river/default.nix +++ b/users/configs/desktop/river/default.nix @@ -10,39 +10,70 @@ ]; wayland.windowManager.river = { enable = true; + package = pkgs.river.overrideAttrs (finalAttrs: previousAttrs: { + version = "2024-11-04"; - extraConfig = '' - MAINMOD="Super" + src = pkgs.fetchFromGitea { + domain = "codeberg.org"; + owner = "river"; + repo = "river"; + rev = "14e941bae16b1ca478c32198c131c4297157f888"; + hash = "sha256-uACc9Cb1tSw3I0fMlEMX74NfU+Tg3It74tb+nc51AZ4="; + fetchSubmodules = true; + }; - riverctl map normal $MAINMOD D spawn 'tofi-drun --drun-launch=true' - riverctl map normal $MAINMOD Return spawn 'kitty' - riverctl map normal $MAINMOD+Shift p exit - riverctl map normal $MAINMOD q close + buildInputs = + (pkgs.lib.lists.remove pkgs.wlroots_0_16 previousAttrs.buildInputs) + ++ [ + pkgs.wlroots + pkgs.makeWrapper + ]; - riverctl map normal $MAINMOD l focus-view next - riverctl map normal $MAINMOD h focus-view previous + postInstall = + previousAttrs.postInstall + + '' + wrapProgram "$out/bin/river" --set WLR_NO_HARDWARE_CURSORS 1 --set WLR_RENDERER vulkan + ''; + }); - riverctl map normal $MAINMOD+Shift l swap next - riverctl map normal $MAINMOD+Shift h swap previous + extraConfig = + (builtins.readFile ./${hostname}) + + '' + riverctl map normal $MAINMOD D spawn 'tofi-drun --drun-launch=true' + riverctl map normal $MAINMOD Return spawn 'kitty' + riverctl map normal $MAINMOD+Shift p exit + riverctl map normal $MAINMOD q close + riverctl map normal $MAINMOD escape spawn 'swaylock -i ~/wallpapers/lock.png' + riverctl map normal $MAINMOD l focus-view next + riverctl map normal $MAINMOD h focus-view previous - riverctl map -repeat normal None XF86AudioLowerVolume spawn 'wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%-' - riverctl map -repeat normal None XF86AudioRaiseVolume spawn 'wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+' - riverctl map normal None XF86AudioMute spawn 'wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle' + riverctl map normal $MAINMOD m swap next + riverctl map normal $MAINMOD COMMA swap previous - riverctl map -repeat normal None XF86MonBrightnessUp spawn 'xbacklight -inc 10' - riverctl map -repeat normal None XF86MonBrightnessDown spawn 'xbacklight -dec 10' + riverctl map -repeat normal None XF86AudioLowerVolume spawn 'wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%-' + riverctl map -repeat normal None XF86AudioRaiseVolume spawn 'wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+' + riverctl map normal None XF86AudioMute spawn 'wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle' - riverctl spawn rivertile - riverctl output-layout rivertile + riverctl map -repeat normal None XF86MonBrightnessUp spawn 'xbacklight -inc 10' + riverctl map -repeat normal None XF86MonBrightnessDown spawn 'xbacklight -dec 10' - riverctl input 'pointer-2362-628-PIXA3854:00_093A:0274_Touchpad' accel-profile flat - riverctl input 'pointer-2362-628-PIXA3854:00_093A:0274_Touchpad' natural-scroll enabled - riverctl input 'pointer-2362-628-PIXA3854:00_093A:0274_Touchpad' tap enabled + riverctl spawn rivertile + riverctl default-layout rivertile - riverctl keyboard-layout -options caps:escape gb + riverctl input 'pointer-2362-628-PIXA3854:00_093A:0274_Touchpad' accel-profile flat + riverctl input 'pointer-2362-628-PIXA3854:00_093A:0274_Touchpad' natural-scroll enabled + riverctl input 'pointer-2362-628-PIXA3854:00_093A:0274_Touchpad' tap enabled - wlr-randr --output eDP-1 --scale 1.33 - ''; + riverctl keyboard-layout -options caps:escape gb + + for i in $(seq 1 9); do + tags=$((1 << ($i - 1))) + + riverctl map normal $MAINMOD $i set-focused-tags $tags + + # riverctl map normal $MAINMOD $i + done + ''; }; } diff --git a/users/configs/desktop/river/pingbox b/users/configs/desktop/river/pingbox new file mode 100644 index 0000000..40aee59 --- /dev/null +++ b/users/configs/desktop/river/pingbox @@ -0,0 +1,3 @@ +MAINMOD="Super" + +wlr-randr --output eDP-1 --scale 1.33 diff --git a/users/configs/desktop/river/sidon b/users/configs/desktop/river/sidon new file mode 100644 index 0000000..02ae63b --- /dev/null +++ b/users/configs/desktop/river/sidon @@ -0,0 +1,3 @@ +MAINMOD="Control+Alt+Shift" + +wlr-randr --output DP-2 --pos 0,0 --output HDMI-A-2 --pos 3840,0