River wip

This commit is contained in:
2024-07-05 16:57:26 +07:00
parent b25aba1719
commit 981cd4d6bc
4 changed files with 185 additions and 1 deletions
+1
View File
@@ -20,6 +20,7 @@
};
home.pointerCursor = {
gtk.enable = true;
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
size = 24;
+1 -1
View File
@@ -74,7 +74,7 @@ static const int drag_lock = 0;
static const int natural_scrolling = 1;
static const int disable_while_typing = 1;
static const int left_handed = 0;
static const int middle_button_emulation = 0;
static const int middle_button_emulation = 1;
/* You can choose between:
LIBINPUT_CONFIG_SCROLL_NO_SCROLL
LIBINPUT_CONFIG_SCROLL_2FG
+67
View File
@@ -0,0 +1,67 @@
{pkgs, ...}: {
services.xserver = {
enable = true;
displayManager.gdm = {
enable = true;
settings = {
"org/gnome/desktop/peripherals/touchpad" = {
tap-to-click = true;
};
};
};
};
services.displayManager = {
autoLogin = {
enable = true;
user = "zoriya";
};
};
networking.networkmanager.enable = true;
hardware.pulseaudio.enable = false;
hardware.bluetooth.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
jack.enable = true;
pulse.enable = true;
};
services.printing.enable = true;
services.power-profiles-daemon.enable = true;
security.polkit.enable = true;
security.rtkit.enable = true;
services.upower.enable = true;
services.gvfs.enable = true;
services.udisks2.enable = true;
services.libinput.enable = true;
services.colord.enable = true;
services.system-config-printer.enable = true;
services.gnome.glib-networking.enable = true;
services.gnome.gnome-settings-daemon.enable = true;
services.avahi.enable = true;
programs.dconf.enable = true;
services.dbus.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
# gtk portal needed to make gtk apps happy
extraPortals = [pkgs.xdg-desktop-portal-gtk];
config.common.default = "*";
};
environment.systemPackages = with pkgs; [
gnome-bluetooth
polkit_gnome
wineWowPackages.stable
wineWowPackages.waylandFull
winetricks
];
hardware.steam-hardware.enable = true;
services.flatpak.enable = true;
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
}
+116
View File
@@ -0,0 +1,116 @@
{pkgs, ...}: let
cliphist = "${pkgs.cliphist}/bin/cliphist";
screenshot = pkgs.writeShellApplication {
name = "screenshot";
runtimeInputs = [pkgs.slurp pkgs.grim];
text = ''
grim -g \"$(slurp -b 00000000 -s 61616140)\" - | wl-copy
'';
};
in {
services.cliphist.enable = true;
wayland.windowManager.river = {
enable = true;
settings = {
default-layout = "rivercarro";
spawn = [
"${pkgs.rivercarro}/bin/rivercarro"
"discord"
"youtube-music"
];
default-attach-mode = "top";
focus-follows-cursor = "normal"; # might try "always" if this does not feel right
set-cursor-warp = "on-focus-change";
hide-cursor = {
when-typing = true;
};
set-repeat = "25 600";
keyboard-layout = "-options 'caps:escape_shifted_capslock'";
input = {
"*" = {
events = true;
accel-profile = "adaptive";
pointer-accel = 0;
click-method = "button-areas";
tap = false;
drag = true;
disable-while-typing = true;
middle-emulation = true;
natural-scroll = true;
tap-button-map = "left-right-middle";
scroll-method = "two-finger";
};
};
rule-add = {
"-app-id" = {
"discord" = "tags '2'";
"YouTube Music" = "tags '1'";
# disable all client side decorations
"*" = "ssd";
};
};
map = {
normal = {
"Super+Shift Q" = "exit";
"Super C" = "close";
"Super K" = "focus-view next";
"Super J" = "focus-view previous";
"Super+Shift K" = "swap previous";
"Super+Shift J" = "swap previous";
"Super Return" = "zoom";
"Super Period" = "focus-output next";
"Super Comma" = "focus-output previous";
"Super+Shift Period" = "send-to-output next";
"Super+Shift Comma" = "send-to-output previous";
"Super H" = "send-layout-cmd rivercarro 'main-ratio -0.05'";
"Super L" = "send-layout-cmd rivercarro 'main-ratio +0.05'";
"Super U" = "send-layout-cmd rivercarro 'main-count -1'";
"Super I" = "send-layout-cmd rivercarro 'main-count +1'";
"Super T" = "send-layout-cmd rivercarro 'main-location-cycle left,monocle'";
"Super M" = "send-layout-cmd rivercarro 'main-location-cycle left,monocle'";
"Super F" = "toggle-fullscreen";
"Super+Shift F" = "toggle-float";
"Super+Shift BTN_LEFT" = "move-view";
"Super+Shift BTN_RIGHT" = "resize-view";
"Super X" = "spawn '${screenshot}/bin/screenshot'";
"Super B" = "spawn '${pkgs.hyperpicker}/bin/hyperpicker | wl-copy'";
"Super V" = "spawn '${cliphist} list | rofi -dmenu | ${cliphist} decode | wl-copy'";
};
};
};
extraConfig = ''
for i in $(seq 1 9)
do
tags=$((1 << (i - 1)))
riverctl map normal Super "$i" set-focused-tags $tags
riverctl map normal Super+Shift "$i" set-view-tags $tags
riverctl map normal Super+Control "$i" toggle-focused-tags $tags
riverctl map normal Super+Shift+Control "$i" toggle-view-tags $tags
done
all_tags=$(((1 << 32) - 1))
riverctl map normal Super 0 set-focused-tags "$all_tags"
riverctl map normal Super+Shift 0 set-view-tags "$all_tags"
'';
};
home.packages = with pkgs; [
gnome-control-center
gnome.gnome-weather
wdisplays
wlr-randr
alsa-utils
playerctl
];
}