Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config/hyprland/hyprland.conf
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ bind = $mod, PRINT, exec, hyprpicker -a
bind = $mod SHIFT, V, exec, cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy && sleep 0.1 && wtype -M ctrl -k v -m ctrl

# Clipboard manager TUI with image preview (clipse)
bind = CTRL ALT SHIFT SUPER, V, exec, ghostty --class clipse -e clipse
# Use $mod+Ctrl+V instead of Hyper+V to avoid xremap conflict (Hyper+V → Ctrl+V)
bind = $mod CTRL, V, exec, ghostty --class clipse -e clipse

# =============================================================================
# Media / Hardware Keys (Framework 13 AI 300)
Expand Down
16 changes: 12 additions & 4 deletions config/serena/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
{ config, ... }:
let
serenaConfigSrc = ./serena_config.yml;
serenaConfigDest = "${config.home.homeDirectory}/.serena/serena_config.yml";
in
{
home.file.".serena/serena_config.yml" = {
text = builtins.readFile ./serena_config.yml;
force = true;
};
home.activation.serenaConfig = config.lib.dag.entryAfter [ "writeBoundary" ] ''
mkdir -p "$(dirname "${serenaConfigDest}")"
if [ ! -f "${serenaConfigDest}" ] || [ -L "${serenaConfigDest}" ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current condition [ ! -f "${serenaConfigDest}" ] || [ -L "${serenaConfigDest}" ] can lead to unexpected behavior. If ${serenaConfigDest} points to a directory, [ ! -f ... ] evaluates to true, causing the script to attempt rm -f on a directory. This will fail and is likely not the intended behavior.

Using [ ! -e "${serenaConfigDest}" ] || [ -L "${serenaConfigDest}" ] is more robust. It correctly triggers the copy only if the destination doesn't exist or is a symlink, and it correctly does nothing if it's an existing file or directory.

    if [ ! -e "${serenaConfigDest}" ] || [ -L "${serenaConfigDest}" ]; then

rm -f "${serenaConfigDest}"
cp "${serenaConfigSrc}" "${serenaConfigDest}"
chmod u+w "${serenaConfigDest}"
Comment on lines +8 to +12

Copilot AI Feb 11, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Activation snippet performs filesystem mutations (mkdir/rm/cp/chmod) without using Home Manager’s $DRY_RUN_CMD, so home-manager switch --dry-run (and similar tooling) will still modify the real filesystem. Please prefix these commands with $DRY_RUN_CMD (consistent with other activation entries in this repo) so dry-runs remain side-effect free.

Suggested change
mkdir -p "$(dirname "${serenaConfigDest}")"
if [ ! -f "${serenaConfigDest}" ] || [ -L "${serenaConfigDest}" ]; then
rm -f "${serenaConfigDest}"
cp "${serenaConfigSrc}" "${serenaConfigDest}"
chmod u+w "${serenaConfigDest}"
$DRY_RUN_CMD mkdir -p "$(dirname "${serenaConfigDest}")"
if [ ! -f "${serenaConfigDest}" ] || [ -L "${serenaConfigDest}" ]; then
$DRY_RUN_CMD rm -f "${serenaConfigDest}"
$DRY_RUN_CMD cp "${serenaConfigSrc}" "${serenaConfigDest}"
$DRY_RUN_CMD chmod u+w "${serenaConfigDest}"

Copilot uses AI. Check for mistakes.
fi
'';
}
4 changes: 2 additions & 2 deletions home-manager/programs/tmux/tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ setw -g mouse on

# Fix SSH agent after reconnecting
# https://blog.testdouble.com/posts/2016-11-18-reconciling-tmux-and-ssh-agent-forwarding/
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY WAYLAND_DISPLAY SWAYSOCK"
setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock

# Ensure window index numbers get reordered on delete.
Expand Down Expand Up @@ -102,7 +102,7 @@ set -g clock-mode-style 24
# =============================================================================
set -g status-style "bg=colour22,fg=colour255"
set -g status-left "#[bg=colour28,fg=colour255,bold] #S #[bg=colour22,fg=colour28] "
set -g status-right "#[fg=colour250]#{?#{pane_current_command},#{pane_current_command},} #[fg=colour28]| #[fg=colour255]%Y/%m/%d %H:%M "
set -g status-right "#[fg=colour250]#{?#{pane_current_command},#{pane_current_command},} #[fg=colour28]| #[fg=colour255]%Y/%m/%d %H:%M:%S "
set -g status-left-length 30
set -g status-right-length 60

Expand Down
Loading