Fireweed commit before install

This commit is contained in:
Thai Noodles 2024-03-02 09:22:26 -08:00
parent 6ce0d0c189
commit 7c62da7b0f
14 changed files with 475 additions and 262 deletions

View File

@ -32,7 +32,7 @@
enable = true;
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp exts.pass-import ]);
settings = {
PASSWORD_STORE_DIR = "XDG_DATA_HOME/password-store";
PASSWORD_STORE_DIR = "${config.xdg.dataHome}/password-store";
PASSWORD_STORE_CLIP_TIME = "60";
};
};

View File

@ -46,6 +46,30 @@
TERMINAL = "${user.term}";
VISUAL = "$EDITOR";
};
sessionVariables = {
SYSTEMD_PAGER = "";
INPUTRC = "$XDG_CONFIG_HOME/inputrc";
LIBSEAT_BACKEND = "logind";
BEMENU_OPTS = ''
--fn 'Comic Mono 12' \
--tb '#6272a4' \
--tf '#f8f8f2' \
--fb '#282a36' \
--ff '#f8f8f2' \
--nb '#282a36' \
--nf '#6272a4' \
--hb '#44475a' \
--hf '#50fa7b' \
--sb '#44475a' \
--sf '#50fa7b' \
--scb '#282a36' \
--scf '#ff79c6' \
--hp '10' \
--binding 'vim' \
--vim-esc-exits \
--ignorecase --no-overlap
'';
};
};
fonts.packages = with pkgs; [
comic-mono
@ -60,9 +84,6 @@
programs.dconf = {
enable = true;
};
programs.gnupg.agent = {
pinentryFlavor = "qt";
};
programs.river = {
enable = true;
extraPackages = with pkgs; [

View File

@ -17,6 +17,14 @@ in
wireless.enable = false;
};
services = {
greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet -c river";
};
};
};
davfs2 = {
enable = true;
};
@ -58,7 +66,13 @@ in
nushell
python311Packages.eyeD3
tagutil
greetd.tuigreet
];
};
environment.sessionVariables = {
SYSTEMD_PAGER = "";
INPUTRC = "$XDG_CONFIG_HOME/inputrc";
LIBSEAT_BACKEND = "logind";
};
system.stateVersion = "23.11";
}

View File

@ -34,19 +34,6 @@
};
};
};
#udiskie = {
# enable = true;
# automount = true;
# notify = true;
# settings = {
# program_options = {
# udisks_version = 2;
# };
# icon_names.media = [
# "media-optical"
# ];
# };
#};
};
home.stateVersion = "23.11";
}

View File

@ -6,6 +6,7 @@ in
{
imports = [
./hardware-configuration.nix
../../modules/nixos/full.nix
];
boot = {
loader = {
@ -27,21 +28,14 @@ in
networking = {
hostName = "${hostname}"; # Define your hostname.
firewall = {
# To disable the firewall altogether:
# enable = false;
allowedTCPPorts = [ 445 139 ];
allowedUDPPorts = [ 137 138 ];
enable = true;
allowedTCPPorts = [];
allowedUDPPorts = [];
};
};
users.users.${user.name} = {
extraGroups = [ "davfs2" ];
packages = with pkgs; [
];
};
services = {
davfs2 = {
enable = true;
};
mullvad-vpn = {
enable = true;
package = pkgs.mullvad-vpn;
@ -52,5 +46,4 @@ in
user = "${user.name}";
};
};
getty.autologinUser = "${user.name}";
}

View File

@ -1,19 +1,11 @@
# Fireweed home.nix
{ config, lib, pkgs, inputs, user, ... }:
{
services = {
udiskie = {
enable = true;
automount = true;
notify = true;
settings = {
program_options = {
udisks_version = 2;
};
icon_names.media = [
"media-optical"
];
};
};
};
imports = [
../../modules/home-manager/bash.nix
../../modules/home-manager/foot.nix
../../modules/home-manager/neovim.nix
../../modules/home-manager/tmux.nix
];
home.stateVersion = "23.11";
}

View File

@ -5,9 +5,9 @@
enable = true;
text = ''
[[ -f ~/.bashrc ]] && . ~/.bashrc
if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
exec river
fi
#if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
# exec river
#fi
'';
};
".bash_logout" = {
@ -30,6 +30,8 @@
alias mkfoo='. $HOME/.local/bin/mkfoo.sh'
alias ed='ed -p "> "'
alias info='info --vi-keys'
alias matrix="unimatrix -f -l ocCgGkS -s 93"
alias ematrix="unimatrix -c yellow -l 'e'"
# Functions
function ranstr() {
COUNT=$1
@ -65,28 +67,28 @@
# Environmental Variables
# Uncomment the following line if you don't like systemctl's auto-paging feature:
export SYSTEMD_PAGER=
export PS1="\n\u@\h:\w (\j)\n$? \$ "
export INPUTRC="$XDG_CONFIG_HOME/inputrc"
export LIBSEAT_BACKEND=logind
export BEMENU_OPTS="--fn 'Comic Mono 12'\
--tb '#6272a4'\
--tf '#f8f8f2'\
--fb '#282a36'\
--ff '#f8f8f2'\
--nb '#282a36'\
--nf '#6272a4'\
--hb '#44475a'\
--hf '#50fa7b'\
--sb '#44475a'\
--sf '#50fa7b'\
--scb '#282a36'\
--scf '#ff79c6'\
--hp '10'\
--binding 'vim'\
--vim-esc-exits\
--ignorecase\
--no-overlap"
#export SYSTEMD_PAGER=
#export INPUTRC="$XDG_CONFIG_HOME/inputrc"
#export LIBSEAT_BACKEND=logind
#export BEMENU_OPTS="--fn 'Comic Mono 12'\
# --tb '#6272a4'\
# --tf '#f8f8f2'\
# --fb '#282a36'\
# --ff '#f8f8f2'\
# --nb '#282a36'\
# --nf '#6272a4'\
# --hb '#44475a'\
# --hf '#50fa7b'\
# --sb '#44475a'\
# --sf '#50fa7b'\
# --scb '#282a36'\
# --scf '#ff79c6'\
# --hp '10'\
# --binding 'vim'\
# --vim-esc-exits\
# --ignorecase\
# --no-overlap"
eval "$(zoxide init bash)"
'';

View File

@ -6,7 +6,7 @@
borderColor = "#BD93F9";
borderRadius = 5;
borderSize = 2;
margin = "20";
margin = "13";
textColor = "#F8F8F2";
anchor = "bottom-right";
layer = "overlay";

View File

@ -1,195 +1,202 @@
{ pkgs, config, ... }:
{
xdg.configFile = {
"river/init" = {
enable = true;
executable = true;
text = ''
#!/usr/bin/env sh
# See the river(1), riverctl(1), and rivertile(1) man pages for complete
# documentation.
# Variables
TERMINAL="foot"
LOCKSCREEN="swaylock"
# Autostart
riverctl spawn "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
riverctl spawn "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
riverctl spawn "kanshi"
riverctl spawn "waybar"
riverctl spawn "river-tag-overlay --border-width 0 --square-inactive-background-colour "0x282A36" --square-inactive-border-colour "0x282A36" --square-padding 0 --square-inner-padding 4 --square-size 18 --anchors 1:0:0:1 --timeout 2000"
riverctl spawn "mako"
riverctl spawn "wl-paste --type text --watch cliphist store"
riverctl spawn "wl-paste --type image --watch cliphist store"
riverctl spawn "mullvad-gui"
riverctl spawn "nm-applet"
# Theme
riverctl background-color 0x282A36
riverctl border-color-focused 0xBD93F9
riverctl border-color-unfocused 0x282A36
# Launch Shortcuts
riverctl map normal Super Return spawn "$TERMINAL tmux.sh"
riverctl map normal Super+Shift Return spawn "$TERMINAL"
riverctl map normal Super Space spawn 'wmenu.sh'
riverctl map normal Super+Shift S spawn 'grim -g "$(slurp)" - | swappy -f -'
riverctl map normal Super+Shift V spawn "cliphist list | bemenu -p 'Cliphist ' -l 10 | cliphist decode | wl-copy"
# Focus Controls
riverctl map normal Super H focus-view previous
riverctl map normal Super J focus-view next
riverctl map normal Super K focus-view previous
riverctl map normal Super L focus-view next
riverctl map normal Alt Tab focus-view next
riverctl map normal Alt+Shift Tab focus-view previous
riverctl map normal Super P focus-previous-tags
riverctl map normal Super Tab focus-output next
riverctl map normal Super U focus-output next
riverctl map normal Super+Shift U send-to-output next
# Move Controls
riverctl map normal Super+Shift H swap previous
riverctl map normal Super+Shift J swap next
riverctl map normal Super+Shift K swap previous
riverctl map normal Super+Shift L swap next
riverctl map normal Super+Shift Space zoom
riverctl map normal Super+Shift P send-to-previous-tags
riverctl map normal Super+Shift Tab send-to-output next
# Layout Controls
riverctl map normal Super+Alt H send-layout-cmd rivertile "main-ratio -0.05"
riverctl map normal Super+Alt L send-layout-cmd rivertile "main-ratio +0.05"
riverctl map normal Super I send-layout-cmd rivertile "main-count +1"
riverctl map normal Super+Shift I send-layout-cmd rivertile "main-count -1"
riverctl map normal Super Up send-layout-cmd rivertile "main-location top"
riverctl map normal Super Right send-layout-cmd rivertile "main-location right"
riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom"
riverctl map normal Super Left send-layout-cmd rivertile "main-location left"
# Floating Controls
riverctl map normal Super+Shift F toggle-float
riverctl map normal Super+Control H move left 100
riverctl map normal Super+Control J move down 100
riverctl map normal Super+Control K move up 100
riverctl map normal Super+Control L move right 100
riverctl map normal Super+Shift+Control H snap left
riverctl map normal Super+Shift+Control J snap down
riverctl map normal Super+Shift+Control K snap up
riverctl map normal Super+Shift+Control L snap right
riverctl map normal Super+Alt+Shift H resize horizontal -100
riverctl map normal Super+Alt+Shift J resize vertical 100
riverctl map normal Super+Alt+Shift K resize vertical -100
riverctl map normal Super+Alt+Shift L resize horizontal 100
riverctl map-pointer normal Super BTN_LEFT move-view
riverctl map-pointer normal Super BTN_RIGHT resize-view
# Close focused view
riverctl map normal Super W close
riverctl map normal Super Q close
# Exit River
riverctl map normal Super+Shift Q exit
for i in $(seq 1 9)
do
tags=$((1 << ($i - 1)))
# Super+[1-9] to focus tag [0-8]
riverctl map normal Super $i spawn "riverctl set-focused-tags $tags"
# Super+Shift+[1-9] to tag focused view with tag [0-8]
riverctl map normal Super+Shift $i spawn "riverctl set-view-tags $tags"
# Super+Control+[1-9] to toggle focus of tag [0-8]
riverctl map normal Super+Control $i spawn "riverctl toggle-focused-tags $tags"
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
riverctl map normal Super+Shift+Control $i spawn "riverctl toggle-view-tags $tags"
done
MINIMIZED=$((1 << 20 ))
riverctl map normal Super M toggle-focused-tags ''${MINIMIZED}
riverctl map normal Super+Shift M set-view-tags ''${MINIMIZED}
ALL_BUT_MINIMIZED=$(( ((1 << 32) - 1 ) ^ $MINIMIZED ))
riverctl spawn-tagmask ''${ALL_BUT_MINIMIZED}
# Super+0 to focus all tags
# Super+Shift+0 to tag focused view with all tags
all_tags=$(((1 << 32) - 1))
riverctl map normal Super 0 spawn "riverctl set-focused-tags $all_tags"
riverctl map normal Super+Shift 0 spawn "riverctl set-view-tags $all_tags"
# Toggle fullscreen
riverctl map normal None F11 toggle-fullscreen
riverctl map normal Super F toggle-fullscreen
# Passthrough Mode
riverctl declare-mode passthrough
riverctl map normal Super F11 enter-mode passthrough
riverctl map passthrough Super F11 enter-mode normal
# Command Mode
riverctl declare-mode command
riverctl map normal Super B enter-mode command
riverctl map command None+Shift Comma spawn 'playerctl previous'
riverctl map command None Space spawn 'playerctl play-pause'
riverctl map command None+Shift Period spawn 'playerctl next'
riverctl map command None 1 spawn 'mullvad-browser'
riverctl map command None 2 spawn 'librewolf'
riverctl map command None 3 spawn 'libreoffice'
riverctl map command None 4 spawn 'thunderbird'
riverctl map command None 5 spawn 'discord'
riverctl map command None 6 spawn 'signal-desktop'
riverctl map command None 9 spawn 'steam'
riverctl map command None Z spawn 'riverctl toggle-fullscreen; riverctl enter-mode normal'
riverctl map command None Escape enter-mode normal
# Various media key mapping examples for both normal and locked mode which do
# not have a modifier
for mode in normal locked
do
riverctl map $mode None XF86Eject spawn 'eject -T'
# Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer)
riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5'
riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5'
riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute'
# Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause'
riverctl map $mode None XF86AudioPrev spawn 'playerctl previous'
riverctl map $mode None XF86AudioNext spawn 'playerctl next'
# Control screen backlight brightness with light (https://github.com/haikarainen/light)
riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5'
riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5'
done
# Set keyboard repeat rate
riverctl set-repeat 50 300
# Make all views with an app-id that starts with "float" and title "foo" start floating.
riverctl rule-add -app-id 'float*' -title 'foo' float
# Make all views with app-id "bar" and any title use client-side decorations
riverctl rule-add -app-id "bar" csd
# Global Configuration Settings
riverctl default-layout rivertile
rivertile -view-padding 10 -outer-padding 10 &
riverctl attach-mode bottom
riverctl hide-cursor timeout 10000
riverctl hide-cursor when-typing enabled
riverctl set-cursor-warp on-focus-change
riverctl focus-follows-cursor always
riverctl focus-output DP-1
riverctl send-layout-cmd rivertile "main-location right"
riverctl focus-output DP-2
riverctl send-layout-cmd rivertile "main-location left"
'';
wayland.windowManager.river = {
enable = true;
extraSessionVariables = {
MINIMIZED = "$((1 << 20))";
ALL_TAGS = "$(((1 << 32) - 1))";
ALL_BUT_MINIMIZED = "$(( ((1 << 32) - 1 ) ^ $MINIMIZED ))";
};
settings = {
background-color = "0x282A36";
border-color-focused = "0xBD93F9";
border-color-unfocused = "0x282A36";
border-width = 2;
declare-mode = [
"locked"
"normal"
"passthrough"
"command"
];
set-repeat = "50 300";
default-layout = "rivertile";
attach-mode = "bottom";
hide-cursor = {
timeout = "10000";
when-typing = "enabled";
};
set-cursor-warp = "on-focus-change";
focus-follows-cursor = "always";
rule-add = {
"'bar'" = "csd";
"-app-id" = {
"'float*'" = {
"-title" = {
"'foo'" = "float";
};
};
};
};
spawn = [
"'dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river'"
"'systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river'"
"kanshi"
"waybar"
"'river-tag-overlay --border-width 0 --square-inactive-background-colour 0x282A36 --square-inactive-border-colour 0x282A36 --square-padding 0 --square-inner-padding 4 --square-size 18 --anchors 1:0:0:1 --timeout 2000'"
"mako"
"'wl-paste --type text --watch cliphist store'"
"'wl-paste --type image --watch cliphist store'"
"mullvad-gui"
"nm-applet"
];
map-pointer = {
normal = {
"Super BTN_LEFT" = "move-view";
"Super BTN_RIGHT" = "resize-view";
};
};
map = {
command = {
"None+Shift Comma" = "spawn 'playerctl previous'";
"None Space" = "spawn 'playerctl play-pause'";
"None+Shift Period" = "spawn 'playerctl next'";
"None 1" = "spawn 'mullvad-browser'";
"None 2" = "spawn 'librewolf'";
"None 3" = "spawn 'libreoffice'";
"None 4" = "spawn 'thunderbird'";
"None 5" = "spawn 'discord'";
"None 6" = "spawn 'signal-desktop'";
"None 9" = "spawn 'steam'";
"None Z" = "spawn 'riverctl toggle-fullscreen; riverctl enter-mode normal'";
"None Escape" = "enter-mode normal";
};
locked = {
"None XF86Eject" = "spawn 'eject -T'";
"None XF86AudioRaiseVolume" = "spawn 'pamixer -i 5'";
"None XF86AudioLowerVolume" = "spawn 'pamixer -d 5'";
"None XF86AudioMute" = "spawn 'pamixer --toggle-mute'";
"None XF86AudioMedia" = "spawn 'playerctl play-pause'";
"None XF86AudioPlay" = "spawn 'playerctl play-pause'";
"None XF86AudioPrev" = "spawn 'playerctl previous'";
"None XF86AudioNext" = "spawn 'playerctl next'";
"None XF86MonBrightnessUp" = "spawn 'light -A 5'";
"None XF86MonBrightnessDown" = "spawn 'light -U 5'";
};
normal = {
# Launch Shortcuts
"Super Return" = "spawn 'foot tmux.sh'";
"Super+Shift Return" = "spawn foot";
"Super Space" = "spawn 'wmenu.sh'";
"Super+Shift S" = "spawn 'grim -g $(slurp) - | swappy -f -'";
"Super+Shift V" = "spawn 'cliphist list | bemenu -p Cliphist -l 10 | cliphist decode | wl-copy'";
# Focus Controls
"Super H" = "focus-view previous";
"Super J" = "focus-view next";
"Super K" = "focus-view previous";
"Super L" = "focus-view next";
"Alt Tab" = "focus-view next";
"Alt+Shift Tab" = "focus-view previous";
"Super P" = "focus-previous-tags";
"Super Tab" = "focus-output next";
"Super U" = "focus-output next";
"Super+Shift U" = "send-to-output next";
# Move Controls
"Super+Shift H" = "swap previous";
"Super+Shift J" = "swap next";
"Super+Shift K" = "swap previous";
"Super+Shift L" = "swap next";
"Super+Shift Space" = "zoom";
"Super+Shift P" = "send-to-previous-tags";
"Super+Shift Tab" = "send-to-output next";
# Layout Controls
"Super+Alt H" = "send-layout-cmd rivertile 'main-ratio -0.05'";
"Super+Alt L" = "send-layout-cmd rivertile 'main-ratio +0.05'";
"Super I" = "send-layout-cmd rivertile 'main-count +1'";
"Super+Shift I" = "send-layout-cmd rivertile 'main-count -1'";
"Super Up" = "send-layout-cmd rivertile 'main-location top'";
"Super Right" = "send-layout-cmd rivertile 'main-location right'";
"Super Down" = "send-layout-cmd rivertile 'main-location bottom'";
"Super Left" = "send-layout-cmd rivertile 'main-location left'";
# Floating Controls
"Super+Shift F" = "toggle-float";
"Super+Control H" = "move left 100";
"Super+Control J" = "move down 100";
"Super+Control K" = "move up 100";
"Super+Control L" = "move right 100";
"Super+Shift+Control H" = "snap left";
"Super+Shift+Control J" = "snap down";
"Super+Shift+Control K" = "snap up";
"Super+Shift+Control L" = "snap right";
"Super+Alt+Shift H" = "resize horizontal -100";
"Super+Alt+Shift J" = "resize vertical 100";
"Super+Alt+Shift K" = "resize vertical -100";
"Super+Alt+Shift L" = "resize horizontal 100";
"Super W" = "close";
"Super Q" = "close";
"Super+Shift Q" ="exit";
"Super 1" = "spawn 'riverctl set-focused-tags 1'";
"Super 2" = "spawn 'riverctl set-focused-tags 2'";
"Super 3" = "spawn 'riverctl set-focused-tags 4'";
"Super 4" = "spawn 'riverctl set-focused-tags 8'";
"Super 5" = "spawn 'riverctl set-focused-tags 16'";
"Super 6" = "spawn 'riverctl set-focused-tags 32'";
"Super 7" = "spawn 'riverctl set-focused-tags 64'";
"Super 8" = "spawn 'riverctl set-focused-tags 128'";
"Super 9" = "spawn 'riverctl set-focused-tags 256'";
"Super+Shift 1" = "spawn 'riverctl set-view-tags 1'";
"Super+Shift 2" = "spawn 'riverctl set-view-tags 2'";
"Super+Shift 3" = "spawn 'riverctl set-view-tags 4'";
"Super+Shift 4" = "spawn 'riverctl set-view-tags 8'";
"Super+Shift 5" = "spawn 'riverctl set-view-tags 16'";
"Super+Shift 6" = "spawn 'riverctl set-view-tags 32'";
"Super+Shift 7" = "spawn 'riverctl set-view-tags 64'";
"Super+Shift 8" = "spawn 'riverctl set-view-tags 128'";
"Super+Shift 9" = "spawn 'riverctl set-view-tags 256'";
"Super+Control 1" = "spawn 'riverctl toggle-focused-tags 1'";
"Super+Control 2" = "spawn 'riverctl toggle-focused-tags 2'";
"Super+Control 3" = "spawn 'riverctl toggle-focused-tags 4'";
"Super+Control 4" = "spawn 'riverctl toggle-focused-tags 8'";
"Super+Control 5" = "spawn 'riverctl toggle-focused-tags 16'";
"Super+Control 6" = "spawn 'riverctl toggle-focused-tags 32'";
"Super+Control 7" = "spawn 'riverctl toggle-focused-tags 64'";
"Super+Control 8" = "spawn 'riverctl toggle-focused-tags 128'";
"Super+Control 9" = "spawn 'riverctl toggle-focused-tags 256'";
"Super+Shift+Control 1" = "spawn 'riverctl toggle-view-tags 1'";
"Super+Shift+Control 2" = "spawn 'riverctl toggle-view-tags 2'";
"Super+Shift+Control 3" = "spawn 'riverctl toggle-view-tags 4'";
"Super+Shift+Control 4" = "spawn 'riverctl toggle-view-tags 8'";
"Super+Shift+Control 5" = "spawn 'riverctl toggle-view-tags 16'";
"Super+Shift+Control 6" = "spawn 'riverctl toggle-view-tags 32'";
"Super+Shift+Control 7" = "spawn 'riverctl toggle-view-tags 64'";
"Super+Shift+Control 8" = "spawn 'riverctl toggle-view-tags 128'";
"Super+Shift+Control 9" = "spawn 'riverctl toggle-view-tags 256'";
"Super 0" = "spawn 'riverctl set-focused-tags $ALL_TAGS'";
"Super+Shift 0" = "spawn 'riverctl set-view-tags $ALL_TAGS'";
"Super M" = "toggle-focused-tags $MINIMIZED";
"Super+Shift M" = "set-view-tags $MINIMIZED";
"None F11" = "toggle-fullscreen";
"Super F" = "toggle-fullscreen";
"None XF86Eject" = "spawn 'eject -T'";
"None XF86AudioRaiseVolume" = "spawn 'pamixer -i 5'";
"None XF86AudioLowerVolume" = "spawn 'pamixer -d 5'";
"None XF86AudioMute" = "spawn 'pamixer --toggle-mute'";
"None XF86AudioMedia" = "spawn 'playerctl play-pause'";
"None XF86AudioPlay" = "spawn 'playerctl play-pause'";
"None XF86AudioPrev" = "spawn 'playerctl previous'";
"None XF86AudioNext" = "spawn 'playerctl next'";
"None XF86MonBrightnessUp" = "spawn 'light -A 5'";
"None XF86MonBrightnessDown" = "spawn 'light -U 5'";
"Super F11" = "enter-mode passthrough";
"Super B" = "enter-mode command";
};
passthrough = {
"Super F11" = "enter-mode normal";
};
};
};
extraConfig = ''
riverctl spawn-tagmask ''${ALL_BUT_MINIMIZED}
rivertile -view-padding 10 -outer-padding 10 &
'';
};
}

View File

@ -0,0 +1,195 @@
{ pkgs, config, ... }:
{
xdg.configFile = {
"river/init" = {
enable = true;
executable = true;
text = ''
#!/usr/bin/env sh
# See the river(1), riverctl(1), and rivertile(1) man pages for complete
# documentation.
# Variables
TERMINAL="foot"
LOCKSCREEN="swaylock"
# Autostart
riverctl spawn "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
riverctl spawn "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
riverctl spawn "kanshi"
riverctl spawn "waybar"
riverctl spawn "river-tag-overlay --border-width 0 --square-inactive-background-colour "0x282A36" --square-inactive-border-colour "0x282A36" --square-padding 0 --square-inner-padding 4 --square-size 18 --anchors 1:0:0:1 --timeout 2000"
riverctl spawn "mako"
riverctl spawn "wl-paste --type text --watch cliphist store"
riverctl spawn "wl-paste --type image --watch cliphist store"
riverctl spawn "mullvad-gui"
riverctl spawn "nm-applet"
# Theme
riverctl background-color 0x282A36
riverctl border-color-focused 0xBD93F9
riverctl border-color-unfocused 0x282A36
# Launch Shortcuts
riverctl map normal Super Return spawn "$TERMINAL tmux.sh"
riverctl map normal Super+Shift Return spawn "$TERMINAL"
riverctl map normal Super Space spawn 'wmenu.sh'
riverctl map normal Super+Shift S spawn 'grim -g "$(slurp)" - | swappy -f -'
riverctl map normal Super+Shift V spawn "cliphist list | bemenu -p 'Cliphist ' -l 10 | cliphist decode | wl-copy"
# Focus Controls
riverctl map normal Super H focus-view previous
riverctl map normal Super J focus-view next
riverctl map normal Super K focus-view previous
riverctl map normal Super L focus-view next
riverctl map normal Alt Tab focus-view next
riverctl map normal Alt+Shift Tab focus-view previous
riverctl map normal Super P focus-previous-tags
riverctl map normal Super Tab focus-output next
riverctl map normal Super U focus-output next
riverctl map normal Super+Shift U send-to-output next
# Move Controls
riverctl map normal Super+Shift H swap previous
riverctl map normal Super+Shift J swap next
riverctl map normal Super+Shift K swap previous
riverctl map normal Super+Shift L swap next
riverctl map normal Super+Shift Space zoom
riverctl map normal Super+Shift P send-to-previous-tags
riverctl map normal Super+Shift Tab send-to-output next
# Layout Controls
riverctl map normal Super+Alt H send-layout-cmd rivertile "main-ratio -0.05"
riverctl map normal Super+Alt L send-layout-cmd rivertile "main-ratio +0.05"
riverctl map normal Super I send-layout-cmd rivertile "main-count +1"
riverctl map normal Super+Shift I send-layout-cmd rivertile "main-count -1"
riverctl map normal Super Up send-layout-cmd rivertile "main-location top"
riverctl map normal Super Right send-layout-cmd rivertile "main-location right"
riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom"
riverctl map normal Super Left send-layout-cmd rivertile "main-location left"
# Floating Controls
riverctl map normal Super+Shift F toggle-float
riverctl map normal Super+Control H move left 100
riverctl map normal Super+Control J move down 100
riverctl map normal Super+Control K move up 100
riverctl map normal Super+Control L move right 100
riverctl map normal Super+Shift+Control H snap left
riverctl map normal Super+Shift+Control J snap down
riverctl map normal Super+Shift+Control K snap up
riverctl map normal Super+Shift+Control L snap right
riverctl map normal Super+Alt+Shift H resize horizontal -100
riverctl map normal Super+Alt+Shift J resize vertical 100
riverctl map normal Super+Alt+Shift K resize vertical -100
riverctl map normal Super+Alt+Shift L resize horizontal 100
riverctl map-pointer normal Super BTN_LEFT move-view
riverctl map-pointer normal Super BTN_RIGHT resize-view
# Close focused view
riverctl map normal Super W close
riverctl map normal Super Q close
# Exit River
riverctl map normal Super+Shift Q exit
for i in $(seq 1 9)
do
tags=$((1 << ($i - 1)))
# Super+[1-9] to focus tag [0-8]
riverctl map normal Super $i spawn "riverctl set-focused-tags $tags"
# Super+Shift+[1-9] to tag focused view with tag [0-8]
riverctl map normal Super+Shift $i spawn "riverctl set-view-tags $tags"
# Super+Control+[1-9] to toggle focus of tag [0-8]
riverctl map normal Super+Control $i spawn "riverctl toggle-focused-tags $tags"
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
riverctl map normal Super+Shift+Control $i spawn "riverctl toggle-view-tags $tags"
done
MINIMIZED=$((1 << 20 ))
riverctl map normal Super M toggle-focused-tags ''${MINIMIZED}
riverctl map normal Super+Shift M set-view-tags ''${MINIMIZED}
ALL_BUT_MINIMIZED=$(( ((1 << 32) - 1 ) ^ $MINIMIZED ))
riverctl spawn-tagmask ''${ALL_BUT_MINIMIZED}
# Super+0 to focus all tags
# Super+Shift+0 to tag focused view with all tags
all_tags=$(((1 << 32) - 1))
riverctl map normal Super 0 spawn "riverctl set-focused-tags $all_tags"
riverctl map normal Super+Shift 0 spawn "riverctl set-view-tags $all_tags"
# Toggle fullscreen
riverctl map normal None F11 toggle-fullscreen
riverctl map normal Super F toggle-fullscreen
# Passthrough Mode
riverctl declare-mode passthrough
riverctl map normal Super F11 enter-mode passthrough
riverctl map passthrough Super F11 enter-mode normal
# Command Mode
riverctl declare-mode command
riverctl map normal Super B enter-mode command
riverctl map command None+Shift Comma spawn 'playerctl previous'
riverctl map command None Space spawn 'playerctl play-pause'
riverctl map command None+Shift Period spawn 'playerctl next'
riverctl map command None 1 spawn 'mullvad-browser'
riverctl map command None 2 spawn 'librewolf'
riverctl map command None 3 spawn 'libreoffice'
riverctl map command None 4 spawn 'thunderbird'
riverctl map command None 5 spawn 'discord'
riverctl map command None 6 spawn 'signal-desktop'
riverctl map command None 9 spawn 'steam'
riverctl map command None Z spawn 'riverctl toggle-fullscreen; riverctl enter-mode normal'
riverctl map command None Escape enter-mode normal
# Various media key mapping examples for both normal and locked mode which do
# not have a modifier
for mode in normal locked
do
riverctl map $mode None XF86Eject spawn 'eject -T'
# Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer)
riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5'
riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5'
riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute'
# Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause'
riverctl map $mode None XF86AudioPrev spawn 'playerctl previous'
riverctl map $mode None XF86AudioNext spawn 'playerctl next'
# Control screen backlight brightness with light (https://github.com/haikarainen/light)
riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5'
riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5'
done
# Set keyboard repeat rate
riverctl set-repeat 50 300
# Make all views with an app-id that starts with "float" and title "foo" start floating.
riverctl rule-add -app-id 'float*' -title 'foo' float
# Make all views with app-id "bar" and any title use client-side decorations
riverctl rule-add -app-id "bar" csd
# Global Configuration Settings
riverctl default-layout rivertile
rivertile -view-padding 10 -outer-padding 10 &
riverctl attach-mode bottom
riverctl hide-cursor timeout 10000
riverctl hide-cursor when-typing enabled
riverctl set-cursor-warp on-focus-change
riverctl focus-follows-cursor always
riverctl focus-output DP-1
riverctl send-layout-cmd rivertile "main-location right"
riverctl focus-output DP-2
riverctl send-layout-cmd rivertile "main-location left"
'';
};
};
}

View File

@ -46,14 +46,11 @@
set -g status-position top
set -g status-left "[#S] "
set -g status-right "#{=21:pane_title} %H:%M"
set -g status-right "#{=21:pane_title}"
set -g status-style "bg=#282a36 fg=#f8f8f2"
setw -g window-status-current-style "bg=#BD93F9 fg=#282a36"
setw -g window-status-current-format " #I:#W #F "
setw -g window-status-format "#I:#W #F"
'';
plugins = with pkgs.tmuxPlugins; [
urlview
];
};
}

View File

@ -7,6 +7,7 @@
ffmpeg
imagemagick
imv
lsix
mangal
mpv
playerctl

View File

@ -4,6 +4,7 @@
users.users.${user.name}.packages = with pkgs; [
dua
dstat
fdupes
fq
fx
gitui
@ -23,6 +24,8 @@
recutils
shellcheck
ssss
tealdeer
unimatrix
unrar
unzip
up

View File

@ -26,6 +26,7 @@
sqlmap
termshark
thc-hydra
trippy
tshark
wpscan
yersinia