mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-01-19 01:21:39 +01:00
basic river configuration
This commit is contained in:
parent
3b3736c0d3
commit
ca8ac0f517
11 changed files with 150 additions and 57 deletions
30
flake.lock
30
flake.lock
|
@ -203,11 +203,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687506590,
|
"lastModified": 1687647343,
|
||||||
"narHash": "sha256-CSou9mrG9h/WVRjCptfTrATVxvhmtdQXElmWV/ZkrAs=",
|
"narHash": "sha256-1/o/i9KEFOBdlF9Cs04kBcqDFbYMt6W4SMqGa+QnnaI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "d2b6f2d154bf6b27a93ed895392f80c503df7cfa",
|
"rev": "0ee5ab611dc1fbb5180bd7d88d2aeb7841a4d179",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -223,11 +223,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1686758111,
|
"lastModified": 1687101087,
|
||||||
"narHash": "sha256-8FIiQNUv7CDsChBcEpstrM5vZKV+8ZPs5hpv/y33eNI=",
|
"narHash": "sha256-7whjv4o+IsqyILNPGtNA3TdBOdGTNqi7gd3SYneQXEs=",
|
||||||
"owner": "therealr5",
|
"owner": "therealr5",
|
||||||
"repo": "TruckSimulatorBot-images",
|
"repo": "TruckSimulatorBot-images",
|
||||||
"rev": "d879cd5d9b2028a47b2f0400819965ce6267b64a",
|
"rev": "c2b85c3117b9ddbab6c93d6ea3e3fca452643b71",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -333,11 +333,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687412861,
|
"lastModified": 1687681650,
|
||||||
"narHash": "sha256-Z/g0wbL68C+mSGerYS2quv9FXQ1RRP082cAC0Bh4vcs=",
|
"narHash": "sha256-M2If+gRcfpmaJy/XbfSsRzLlPpoU4nr0NHnKKl50fd8=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e603dc5f061ca1d8a19b3ede6a8cf9c9fcba6cdc",
|
"rev": "1c9db9710cb23d60570ad4d7ab829c2d34403de3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -461,11 +461,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687103994,
|
"lastModified": 1687686412,
|
||||||
"narHash": "sha256-HqpnLauoN4+dFAGTNCuFjmGPGCTPu4U5Ftfpz+yxpEo=",
|
"narHash": "sha256-Wq9D5tBxKNJVpeUDW8ZJRm1PM+JLgr16tdvaULuPMbo=",
|
||||||
"owner": "therealr5",
|
"owner": "therealr5",
|
||||||
"repo": "purge",
|
"repo": "purge",
|
||||||
"rev": "235766c0541f19a6259fdccfacd213ec40dc1c71",
|
"rev": "4fc0ee4454dc5afaa8b370f1f642e012a06fe42e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -583,11 +583,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687101157,
|
"lastModified": 1687686435,
|
||||||
"narHash": "sha256-IgYDpLUQcbBApMTd4cYwZkchPprVFLddT9PTUx0TRJM=",
|
"narHash": "sha256-G/GW1x4UEcj41ss6hjmtGim0tKzS/mFQ9lnE2b2hhig=",
|
||||||
"owner": "therealr5",
|
"owner": "therealr5",
|
||||||
"repo": "TruckSimulatorBot",
|
"repo": "TruckSimulatorBot",
|
||||||
"rev": "68ad7fb76fe7667db041034968c59627fc7ff2fb",
|
"rev": "17e3c09b0b29067614841d183800ac361773cd9a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
default_session = {
|
default_session = {
|
||||||
command = "${lib.getExe pkgs.greetd.tuigreet} --cmd sway";
|
command = "${lib.getExe pkgs.greetd.tuigreet} --cmd river";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
./git
|
./git
|
||||||
./gpg
|
./gpg
|
||||||
./helix
|
./helix
|
||||||
./sway
|
./wayland
|
||||||
./mpv
|
./mpv
|
||||||
./sops
|
./sops
|
||||||
./spotify
|
./spotify
|
||||||
|
|
|
@ -69,6 +69,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.texlive.enable = true;
|
programs.texlive.enable = true;
|
||||||
|
programs.obs-studio.enable = true;
|
||||||
|
|
||||||
xdg.mimeApps = {
|
xdg.mimeApps = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./sway.nix
|
||||||
|
./river.nix
|
||||||
|
./waybar.nix
|
||||||
|
./shikane.nix
|
||||||
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
swaylock-effects
|
swaylock-effects
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
|
@ -17,6 +25,7 @@
|
||||||
timeouts = [
|
timeouts = [
|
||||||
{ timeout = 300; command = lib.getExe pkgs.swaylock-effects; }
|
{ timeout = 300; command = lib.getExe pkgs.swaylock-effects; }
|
||||||
];
|
];
|
||||||
|
systemdTarget = "river-session.target";
|
||||||
};
|
};
|
||||||
systemd.user.services.swaync = {
|
systemd.user.services.swaync = {
|
||||||
Install.WantedBy = [ "graphical-session.target" ];
|
Install.WantedBy = [ "graphical-session.target" ];
|
||||||
|
@ -25,7 +34,7 @@
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
Unit = {
|
Unit = {
|
||||||
After = "graphical-session.target";
|
After = "graphical-session-pre.target";
|
||||||
Description = "Simple notification daemon with a GUI built for Sway";
|
Description = "Simple notification daemon with a GUI built for Sway";
|
||||||
Documentation = "https://github.com/ErikReider/SwayNotificationCenter";
|
Documentation = "https://github.com/ErikReider/SwayNotificationCenter";
|
||||||
PartOf = "graphical-session.target";
|
PartOf = "graphical-session.target";
|
||||||
|
@ -33,6 +42,27 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
|
"swaync".source = ./swaync;
|
||||||
|
"fuzzel/fuzzel.ini".text = ''
|
||||||
|
[main]
|
||||||
|
icon-theme=${config.gtk.iconTheme.name}
|
||||||
|
show-actions=yes
|
||||||
|
width=80
|
||||||
|
terminal=${lib.getExe pkgs.foot}
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
background=${config.colorScheme.colors.base00}ff
|
||||||
|
text=${config.colorScheme.colors.base05}ff
|
||||||
|
match=${config.colorScheme.colors.base08}ff
|
||||||
|
selection=${config.colorScheme.colors.base02}ff
|
||||||
|
selection-text=${config.colorScheme.colors.base04}ff
|
||||||
|
border=${config.colorScheme.colors.base01}ff
|
||||||
|
'';
|
||||||
|
"swappy/config".text = ''
|
||||||
|
[Default]
|
||||||
|
save_dir = ~/Pictures/Screenshots/
|
||||||
|
early_exit = true
|
||||||
|
'';
|
||||||
"swaylock/config".text = ''
|
"swaylock/config".text = ''
|
||||||
indicator-radius=200
|
indicator-radius=200
|
||||||
indicator-thickness=3
|
indicator-thickness=3
|
||||||
|
@ -44,7 +74,6 @@
|
||||||
screenshot
|
screenshot
|
||||||
effect-blur=7x5
|
effect-blur=7x5
|
||||||
'';
|
'';
|
||||||
|
|
||||||
"wlogout/style.css".text = ''
|
"wlogout/style.css".text = ''
|
||||||
* {
|
* {
|
||||||
background-image: none;
|
background-image: none;
|
88
users/rouven/modules/wayland/river.nix
Normal file
88
users/rouven/modules/wayland/river.nix
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
river
|
||||||
|
];
|
||||||
|
systemd.user.targets.river-session = {
|
||||||
|
Unit = {
|
||||||
|
After = "graphical-session-pre.target";
|
||||||
|
BindsTo = "graphical-session.target";
|
||||||
|
Description = "river compositor session";
|
||||||
|
Wants = "graphical-session-pre.target";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
xdg.configFile = {
|
||||||
|
"river/init" = {
|
||||||
|
source =
|
||||||
|
pkgs.writeShellScript "river-init.sh" ''
|
||||||
|
riverctl focus-follows-cursor always
|
||||||
|
riverctl spawn rivertile
|
||||||
|
riverctl default-layout rivertile
|
||||||
|
riverctl output-layout rivertile
|
||||||
|
riverctl keyboard-layout -variant dvorak-alt-intl us
|
||||||
|
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad tap enabled
|
||||||
|
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad drag enabled
|
||||||
|
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad middle-emulation enabled
|
||||||
|
|
||||||
|
riverctl spawn "${lib.getExe pkgs.swaybg} -i ${../../../../images/wallpaper.png}"
|
||||||
|
systemctl --user start river-session.target
|
||||||
|
${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL
|
||||||
|
|
||||||
|
riverctl map normal Super Return spawn footclient
|
||||||
|
riverctl map normal Super+Shift Q close
|
||||||
|
riverctl map normal Super F toggle-fullscreen
|
||||||
|
|
||||||
|
riverctl map normal Super S send-to-output next
|
||||||
|
|
||||||
|
riverctl map normal Super+Shift K send-layout-cmd rivertile "main-count +1"
|
||||||
|
riverctl map normal Super+Shift J send-layout-cmd rivertile "main-count -1"
|
||||||
|
riverctl map normal Super+Shift L send-layout-cmd rivertile "main-ratio +0.05"
|
||||||
|
riverctl map normal Super+Shift H send-layout-cmd rivertile "main-ratio -0.05"
|
||||||
|
|
||||||
|
riverctl map normal Super K focus-view next
|
||||||
|
riverctl map normal Super J focus-view previous
|
||||||
|
riverctl map normal Super L focus-output next
|
||||||
|
riverctl map normal Super H focus-output previous
|
||||||
|
riverctl map normal Super O send-to-output next
|
||||||
|
# riverctl map-pointer normal Super BTN_LEFT move-view
|
||||||
|
|
||||||
|
# riverctl map-pointer normal Super BTN_RIGHT resize-view
|
||||||
|
|
||||||
|
riverctl map normal Alt Space spawn ${lib.getExe pkgs.fuzzel}
|
||||||
|
|
||||||
|
for i in $(seq 1 9)
|
||||||
|
do
|
||||||
|
tags=$((1 << ($i - 1)))
|
||||||
|
|
||||||
|
# Super+[1-9] to focus tag [0-8]
|
||||||
|
riverctl map normal Super $i set-focused-tags $tags
|
||||||
|
|
||||||
|
# Super+Shift+[1-9] to tag focused view with tag [0-8]
|
||||||
|
riverctl map normal Super+Shift $i set-view-tags $tags
|
||||||
|
|
||||||
|
# Super+Control+[1-9] to toggle focus of tag [0-8]
|
||||||
|
riverctl map normal Super+Control $i toggle-focused-tags $tags
|
||||||
|
|
||||||
|
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
|
||||||
|
riverctl map normal Super+Shift+Control $i toggle-view-tags $tags
|
||||||
|
done
|
||||||
|
|
||||||
|
riverctl map normal None Print spawn "${lib.getExe pkgs.sway-contrib.grimshot} copy area"
|
||||||
|
riverctl map normal None XF86Launch2 spawn "${lib.getExe pkgs.sway-contrib.grimshot} save area - | ${lib.getExe pkgs.swappy} -f -"
|
||||||
|
riverctl map normal None XF86MonBrightnessUp spawn "${lib.getExe pkgs.light} -A 10"
|
||||||
|
riverctl map normal None XF86MonBrightnessDown spawn "${lib.getExe pkgs.light} -U 10"
|
||||||
|
riverctl map normal None XF86AudioMute spawn "${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||||||
|
riverctl map normal None XF86AudioMicMute spawn "${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle"
|
||||||
|
riverctl map normal None XF86AudioRaiseVolume spawn "${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%"
|
||||||
|
riverctl map normal None XF86AudioLowerVolume spawn "${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%"
|
||||||
|
riverctl map normal Shift XF86AudioRaiseVolume spawn "${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ +5%"
|
||||||
|
riverctl map normal Shift XF86AudioLowerVolume spawn "${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ -5%"
|
||||||
|
riverctl map normal None XF86Favorites spawn "${pkgs.systemd}/bin/loginctl lock-session"
|
||||||
|
# riverctl map normal None XF86PowerOff spawn "${lib.getExe pkgs.wlogout}"
|
||||||
|
riverctl map normal None XF86Messenger spawn "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel"
|
||||||
|
riverctl map normal None Cancel spawn "${pkgs.swaynotificationcenter}/bin/swaync-client --hide-latest"
|
||||||
|
riverctl map normal Shift Cancel spawn "${pkgs.swaynotificationcenter}/bin/swaync-client --cloes-all"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,12 +1,7 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
# ./hyprpaper.nix
|
|
||||||
./session.nix
|
|
||||||
./waybar.nix
|
|
||||||
./shikane.nix
|
|
||||||
];
|
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = rec {
|
config = rec {
|
||||||
|
@ -44,7 +39,6 @@
|
||||||
"XF86Launch2" = "exec ${lib.getExe pkgs.sway-contrib.grimshot} save area - | ${lib.getExe pkgs.swappy} -f -";
|
"XF86Launch2" = "exec ${lib.getExe pkgs.sway-contrib.grimshot} save area - | ${lib.getExe pkgs.swappy} -f -";
|
||||||
"XF86MonBrightnessUp" = "exec ${lib.getExe pkgs.light} -A 10";
|
"XF86MonBrightnessUp" = "exec ${lib.getExe pkgs.light} -A 10";
|
||||||
"XF86MonBrightnessDown" = "exec ${lib.getExe pkgs.light} -U 10";
|
"XF86MonBrightnessDown" = "exec ${lib.getExe pkgs.light} -U 10";
|
||||||
# audio controls
|
|
||||||
"XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
"XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||||
"XF86AudioMicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
"XF86AudioMicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||||
"XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
"XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||||
|
@ -61,27 +55,4 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
xdg.configFile = {
|
|
||||||
"swaync".source = ./swaync;
|
|
||||||
"fuzzel/fuzzel.ini".text = ''
|
|
||||||
[main]
|
|
||||||
icon-theme=${config.gtk.iconTheme.name}
|
|
||||||
show-actions=yes
|
|
||||||
width=80
|
|
||||||
terminal=${lib.getExe pkgs.foot}
|
|
||||||
|
|
||||||
[colors]
|
|
||||||
background=${config.colorScheme.colors.base00}ff
|
|
||||||
text=${config.colorScheme.colors.base05}ff
|
|
||||||
match=${config.colorScheme.colors.base08}ff
|
|
||||||
selection=${config.colorScheme.colors.base02}ff
|
|
||||||
selection-text=${config.colorScheme.colors.base04}ff
|
|
||||||
border=${config.colorScheme.colors.base01}ff
|
|
||||||
'';
|
|
||||||
"swappy/config".text = ''
|
|
||||||
[Default]
|
|
||||||
save_dir = ~/Pictures/Screenshots/
|
|
||||||
early_exit = true
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
}
|
|
@ -11,7 +11,7 @@
|
||||||
position = "top";
|
position = "top";
|
||||||
height = 26;
|
height = 26;
|
||||||
# modules-left = [ "wlr/workspaces" "custom/spotifytitle" "hyprland/window" ];
|
# modules-left = [ "wlr/workspaces" "custom/spotifytitle" "hyprland/window" ];
|
||||||
modules-left = [ "sway/workspaces" "custom/spotifytitle" "sway/window" ];
|
modules-left = [ "river/tags" "custom/spotifytitle" "river/window" ];
|
||||||
modules-right = [ "network" "cpu" "temperature" "pulseaudio" "battery" "tray" "custom/notification" "clock" ];
|
modules-right = [ "network" "cpu" "temperature" "pulseaudio" "battery" "tray" "custom/notification" "clock" ];
|
||||||
network = {
|
network = {
|
||||||
format-wifi = " {essid} ({signalStrength}%)";
|
format-wifi = " {essid} ({signalStrength}%)";
|
||||||
|
@ -21,11 +21,11 @@
|
||||||
format-disconnected = "Disconnected ⚠";
|
format-disconnected = "Disconnected ⚠";
|
||||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||||
};
|
};
|
||||||
"sway/workspaces" = {
|
"river/tags" = {
|
||||||
format = "{icon}";
|
format = "{icon}";
|
||||||
on-click = "activate";
|
on-click = "activate";
|
||||||
};
|
};
|
||||||
"sway/window" = {
|
"river/window" = {
|
||||||
format = " {}";
|
format = " {}";
|
||||||
# separate-outputs = true;
|
# separate-outputs = true;
|
||||||
};
|
};
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
format = "{usage}% ";
|
format = "{usage}% ";
|
||||||
};
|
};
|
||||||
temperature = {
|
temperature = {
|
||||||
hwmon-path = "/sys/class/hwmon/hwmon5/temp1_input";
|
hwmon-path = "/sys/devices/platform/thinkpad_hwmon/hwmon/hwmon4/temp1_input";
|
||||||
critical-threshold = 80;
|
critical-threshold = 80;
|
||||||
format = "{temperatureC}°C {icon}";
|
format = "{temperatureC}°C {icon}";
|
||||||
format-icons = [ "" ];
|
format-icons = [ "" ];
|
||||||
|
@ -114,18 +114,22 @@
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button {
|
#tags button {
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: #${config.colorScheme.colors.base05};
|
color: #${config.colorScheme.colors.base05};
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.active {
|
#tags button.occupied {
|
||||||
|
box-shadow: inset 0 -3px #${config.colorScheme.colors.base05};
|
||||||
|
}
|
||||||
|
|
||||||
|
#tags button.focused {
|
||||||
background-color: #${config.colorScheme.colors.base04};
|
background-color: #${config.colorScheme.colors.base04};
|
||||||
box-shadow: inset 0 -3px #${config.colorScheme.colors.base05};
|
box-shadow: inset 0 -3px #${config.colorScheme.colors.base05};
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.urgent {
|
#tags button.urgent {
|
||||||
background-color: #eb4d4b;
|
background-color: #eb4d4b;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue