From a7ad6989208f38554fa14ffffd610bd1f6b49e6a Mon Sep 17 00:00:00 2001 From: Liam Malone Date: Fri, 1 Aug 2025 23:17:12 +0100 Subject: [PATCH] Further river setup --- configs/ghostty/config | 2 +- configs/river/init | 29 ++++++++++++++++++++++++++++- configs/swaync/config.json | 1 - hosts/darp8/configuration.nix | 1 - hosts/darp8/pkgs.nix | 2 ++ hosts/desktop/configuration.nix | 13 ++++++++----- hosts/desktop/file.nix | 5 +++++ hosts/desktop/pkgs.nix | 10 ++++------ 8 files changed, 48 insertions(+), 15 deletions(-) diff --git a/configs/ghostty/config b/configs/ghostty/config index c5db5b0..1de48e5 100644 --- a/configs/ghostty/config +++ b/configs/ghostty/config @@ -11,7 +11,7 @@ keybind = ctrl+shift+o=ignore background-opacity=0.9 confirm-close-surface = false window-theme = dark -window-decoration = true +window-decoration = false # Linux Specific gtk-wide-tabs = true diff --git a/configs/river/init b/configs/river/init index be2b141..417cd83 100755 --- a/configs/river/init +++ b/configs/river/init @@ -1,5 +1,9 @@ #!/usr/bin/env bash +# Dublin lat/long +latitude="53.2" +longitude="-6.2" + function execs() { systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river && systemctl --user restart xdg-desktop-portal xdg-desktop-portal-wlr @@ -9,8 +13,22 @@ function execs() { quickshell & wl-clipboard-history -t & wl-paste -p --watch wl-copy -p '' & + wlsunset -l $longitude -L $latitude & } +# Monitors +function monitors() { + host=$1 + + if [ $host == "lmdesktop" ] + then + wlr-randr --output DP-1 --mode 2560x1440@143.973007Hz --pos 0,0 --scale 1 + wlr-randr --output HDMI-A-1 --mode 1920x1080@60Hz --pos 2560,180 --scale 1 + elif [ $host == "darp8" ] + wlr-randr --output eDP-1 --mode 1920x1080@59.999001Hz --pos 0,0 --scale 1 + then + fi +} # Inputs @@ -36,6 +54,7 @@ function touchpad_apply_rules() { # Inputs :: General function inputs() { riverctl keyboard-layout us + riverctl focus-follows-cursor normal touchpads=$(riverctl list-inputs | grep '^pointer-.*Touchpad' | awk '{print $1}') for touchpad in $touchpads @@ -115,6 +134,12 @@ function binds() { riverctl map normal $mod+Shift J swap next riverctl map normal $mod+Shift K swap previous + # Binds :: Controls :: Displays + riverctl map normal $mod Comma focus-output previous + riverctl map normal $mod Period focus-output next + riverctl map normal $mod+Shift Comma send-to-output previous + riverctl map normal $mod+Shift Period send-to-output next + # Binds :: Controls :: Tags for i in $(seq 1 9) do @@ -134,8 +159,10 @@ function colors() { for arg in "$@"; do declare $arg='1'; done # Run Sections -inputs +monitors $HOSTNAME layout colors +inputs binds + if ! [ -v noexec ]; then execs ; fi diff --git a/configs/swaync/config.json b/configs/swaync/config.json index 1e344ce..017f84e 100644 --- a/configs/swaync/config.json +++ b/configs/swaync/config.json @@ -1,5 +1,4 @@ { - "$schema": "/etc/xdg/swaync/configSchema.json", "positionX": "right", "positionY": "top", "layer": "overlay", diff --git a/hosts/darp8/configuration.nix b/hosts/darp8/configuration.nix index 444891e..81543e4 100644 --- a/hosts/darp8/configuration.nix +++ b/hosts/darp8/configuration.nix @@ -205,7 +205,6 @@ in dconf.enable = true; nix-ld.enable = true; mtr.enable = true; - uwsm.enable = true; }; lib.inputMethod.fcitx5.waylandFrontend = true; diff --git a/hosts/darp8/pkgs.nix b/hosts/darp8/pkgs.nix index e32d1c9..0e2a044 100644 --- a/hosts/darp8/pkgs.nix +++ b/hosts/darp8/pkgs.nix @@ -59,6 +59,8 @@ tree waybar wev + wlr-randr + wlsunset ]; # BEGIN PROGRAMS diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 39d018e..96affb7 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -76,7 +76,7 @@ restart = true; settings = { default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd Hyprland"; + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd river"; }; }; }; @@ -101,6 +101,7 @@ environment.etc."greetd/environments".text = '' Hyprland + river ''; hardware = { @@ -178,13 +179,15 @@ plugins = [ ]; }; + river = { + enable = true; + xwayland.enable = true; + }; + gnupg.agent = { enable = true; enableSSHSupport = true; }; - uwsm = { - enable = false; - }; hyprlock.enable = true; dconf.enable = true; @@ -204,7 +207,6 @@ }; environment.systemPackages = with pkgs; [ - alacritty bat discord fd @@ -225,6 +227,7 @@ vim wget wl-clipboard + xdg-user-dirs zip ]; diff --git a/hosts/desktop/file.nix b/hosts/desktop/file.nix index f58f32d..9a81ab0 100644 --- a/hosts/desktop/file.nix +++ b/hosts/desktop/file.nix @@ -26,6 +26,11 @@ in outOfStoreSymlink = true; recursive = true; }; + ".config/river" = { + source = ../../configs/river; + outOfStoreSymlink = true; + recursive = true; + }; ".config/waybar" = { source = ../../configs/waybar; outOfStoreSymlink = true; diff --git a/hosts/desktop/pkgs.nix b/hosts/desktop/pkgs.nix index 9603764..90bf0c4 100644 --- a/hosts/desktop/pkgs.nix +++ b/hosts/desktop/pkgs.nix @@ -18,6 +18,7 @@ fastfetch filezilla floorp + fuzzel fzf genymotion gimp @@ -51,17 +52,14 @@ slurp swaynotificationcenter swww - - # Temporarily removing texliveFull as it currently has a dependency (xindy) - # with a dependency (clisp) with a broken drv - - # texliveFull - + texliveFull xfce.thunar xfce.thunar-volman tree waybar wev + wlr-randr + wlsunset ]; # BEGIN PROGRAMS