sept rice

This commit is contained in:
iofq 2025-08-03 10:38:37 -05:00
parent 89ab499605
commit 66ba28aaf3
12 changed files with 572 additions and 293 deletions

View file

@ -93,7 +93,7 @@
services.gpg-agent = {
enable = true;
enableSshSupport = true;
pinentry.package = pkgs.pinentry-curses;
pinentry.package = pkgs.pinentry-rofi;
extraConfig = ''
allow-loopback-pinentry
'';

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, config, ... }:
{
programs.git = {
enable = true;
@ -77,6 +77,24 @@
git -C "$right" clean -q -df # remove untracked files
''
];
diff-args = [
"-c"
''
set -eu
rm -f "$right/JJ-INSTRUCTIONS"
git -C "$left" init -q
git -C "$left" add -A
git -C "$left" commit -q -m baseline --allow-empty
mv "$left/.git" "$right"
git -C "$right" add --intent-to-add -A
(cd "$right"; nvim -c "lua vim.g.snacks_indent=false" -c "lua require('lazy').load({plugins = {'diffview.nvim'}})" -c DiffviewOpen)
git -C "$right" diff-index --quiet --cached HEAD && { echo "No changes done, aborting split."; exit 1; }
git -C "$right" commit -q -m split
git -C "$right" restore . # undo changes in modified files
git -C "$right" reset . # undo --intent-to-add
git -C "$right" clean -q -df # remove untracked files
''
];
};
snapshot = {
max-new-file-size = "10MiB";

View file

@ -1,6 +1,8 @@
{config, ...}: {
{ config, pkgs, ... }:
{
programs.tmux = {
enable = true;
terminal = "xterm-256color";
keyMode = "vi";
mouse = true;
newSession = true;
@ -11,10 +13,13 @@
customPaneNavigationAndResize = true;
extraConfig = ''
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i'
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel '${pkgs.wl-clipboard}/bin/wl-copy'
set -g status-right ""
setw -g status-style 'bg=colour0 fg=colour7'
setw -g status-style 'bg=terminal fg=colour7'
setw -g window-status-current-format '[#P:#W*] '
set-option -g history-limit 50000
bind-key C-a last-window
bind-key C-s run-shell 'export tmpfile=$(mktemp) && tmux capture-pane -pS -32768 > "$tmpfile" && tmux new-window "nvim $tmpfile"'
'';
};

View file

@ -1,11 +1,12 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = true;
extraConfig = ''
monitor=,preferred,auto,1
'';
plugins = [pkgs.hyprlandPlugins.hyprexpo];
plugins = [ pkgs.hyprlandPlugins.hyprexpo ];
settings = {
"$mod" = "SUPER";
general = {
@ -49,6 +50,7 @@
accel_profile = "flat";
sensitivity = 0.4;
touchpad = {
disable_while_typing = true;
natural_scroll = true;
tap_button_map = "lrm";
middle_button_emulation = false;
@ -68,65 +70,68 @@
"$mod ALT, j, resizeactive, 0 50"
"$mod ALT, k, resizeactive, 0 -50"
];
bind =
[
"$mod, a, hyprexpo:expo, toggle"
"$mod, Return, exec, alacritty"
"$mod, x, killactive"
"$mod, f, fullscreen"
"$mod SHIFT, Escape, exit"
"$mod SHIFT, f, fullscreenstate, 0 3"
"$mod, Space, exec, ${pkgs.wofi}/bin/wofi --show run"
"$mod, Escape, exec, ${pkgs.wlogout}/bin/wlogout"
"$mod, t, togglefloating"
"$mod, g, togglegroup"
"$mod, b, exec, pkill -SIGUSR1 waybar"
"$mod, bracketleft, exec, grimshot --notify save area /tmp/scrot-$(date \"+%Y-%m-%d\"T\"%H:%M:%S\").png"
"$mod, bracketright, exec, grimshot --notify copy area"
"$mod SHIFT, q, exec, swaylock"
",XF86MonBrightnessDown, exec, light -U 10"
",XF86MonBrightnessUp, exec, light -A 10"
",XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +1%"
",XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -1%"
",XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle"
bind = [
"$mod, a, hyprexpo:expo, toggle"
"$mod, Return, exec, alacritty"
"$mod, x, killactive"
"$mod, f, fullscreen"
"$mod SHIFT, Escape, exit"
"$mod SHIFT, f, fullscreenstate, 0 3"
"$mod, Space, exec, ${pkgs.wofi}/bin/wofi --show run"
"$mod, Escape, exec, ${pkgs.wlogout}/bin/wlogout"
"$mod, t, togglefloating"
"$mod, g, togglegroup"
"$mod, b, exec, pkill -SIGUSR1 waybar"
"$mod, bracketleft, exec, grimshot --notify save area /tmp/scrot-$(date \"+%Y-%m-%d\"T\"%H:%M:%S\").png"
"$mod, bracketright, exec, grimshot --notify copy area"
"$mod SHIFT, q, exec, swaylock"
",XF86MonBrightnessDown, exec, light -U 10"
",XF86MonBrightnessUp, exec, light -A 10"
",XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +1%"
",XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -1%"
",XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle"
## Movement
"$mod, m, layoutmsg, swapwithmaster"
"$mod, e, layoutmsg, orientationnext"
"$mod, i, layoutmsg, addmaster"
"$mod, d, layoutmsg, removemaster"
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod, n, changegroupactive, f"
"$mod, p, changegroupactive, b"
"$mod SHIFT, h, movewindoworgroup, l"
"$mod SHIFT, l, movewindoworgroup, r"
"$mod SHIFT, k, movewindoworgroup, u"
"$mod SHIFT, j, movewindoworgroup, d"
"$mod, COMMA, focusmonitor, l"
"$mod, PERIOD, focusmonitor, r"
"$mod SHIFT, COMMA, movewindow, mon:l"
"$mod SHIFT, PERIOD, movewindow, mon:r"
"$mod, s, togglespecialworkspace"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
x: let
ws = let
## Movement
"$mod, m, layoutmsg, swapwithmaster"
"$mod, e, layoutmsg, orientationnext"
"$mod, i, layoutmsg, addmaster"
"$mod, d, layoutmsg, removemaster"
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod, n, changegroupactive, f"
"$mod, p, changegroupactive, b"
"$mod SHIFT, h, movewindoworgroup, l"
"$mod SHIFT, l, movewindoworgroup, r"
"$mod SHIFT, k, movewindoworgroup, u"
"$mod SHIFT, j, movewindoworgroup, d"
"$mod, COMMA, focusmonitor, l"
"$mod, PERIOD, focusmonitor, r"
"$mod SHIFT, COMMA, movewindow, mon:l"
"$mod SHIFT, PERIOD, movewindow, mon:r"
"$mod, s, togglespecialworkspace"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (
builtins.genList (
x:
let
ws =
let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
"$mod, ${ws}, focusworkspaceoncurrentmonitor, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}"
]
)
10)
);
builtins.toString (x + 1 - (c * 10));
in
[
"$mod, ${ws}, focusworkspaceoncurrentmonitor, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}"
]
) 10
)
);
windowrulev2 = [
"workspace 9, class:^(Discord|discord)$"
"workspace 9, class:^(Signal|signal)$"
@ -153,7 +158,7 @@
services.hyprpaper = {
enable = true;
settings = {
preload = ["/home/pape"];
preload = [ "/home/pape" ];
wallpaper = ",/home/pape";
ipc = "off";
splash = false;