From ad7aaf822c6a9565c01f5976fa4b3012aec6c4ec Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 30 Jan 2026 13:20:29 +0200 Subject: only 5 --- dotfiles/Rexfile | 15 ++++++++------- dotfiles/zsh/.zshrc | 22 ---------------------- dotfiles/zsh/zshrc | 22 ++++++++++++++++++++++ 3 files changed, 30 insertions(+), 29 deletions(-) delete mode 100644 dotfiles/zsh/.zshrc create mode 100644 dotfiles/zsh/zshrc diff --git a/dotfiles/Rexfile b/dotfiles/Rexfile index f6a3a39..839309e 100644 --- a/dotfiles/Rexfile +++ b/dotfiles/Rexfile @@ -160,10 +160,10 @@ task 'home_bash', sub { desc 'Install ZSH configuration'; task 'home_zsh', sub { if ( $^O eq 'darwin' ) { - ensure "$DOT/zsh/.zshrc" => "$HOME/.zshrc"; + ensure "$DOT/zsh/zshrc" => "$HOME/.zshrc"; } else { - Rex::Logger::info('Skipping ZSH configuration (not on macOS)', 'warn'); + Rex::Logger::info( 'Skipping ZSH configuration (not on macOS)', 'warn' ); } }; @@ -236,11 +236,11 @@ desc 'Manage ~/QuickEdit directory and symlinks'; task 'home_quickedit', sub { if ( $^O eq 'linux' || $^O eq 'freebsd' ) { Rex::Logger::info('Setting up ~/QuickEdit'); - + file "$HOME/QuickEdit", ensure => 'directory', mode => '0700'; - + my %symlinks = ( 'data' => "$HOME/data/", 'Documents' => "$HOME/Documents//", @@ -250,11 +250,11 @@ task 'home_quickedit', sub { 'public-snippets' => "$HOME/git/conf/snippets//", 'worktime' => "$HOME/git/worktime/", ); - + for my $name ( keys %symlinks ) { my $link_path = "$HOME/QuickEdit/$name"; my $target = $symlinks{$name}; - + # Remove existing symlink if it points to a different target if ( -l $link_path ) { my $current_target = readlink($link_path); @@ -264,7 +264,7 @@ task 'home_quickedit', sub { } } elsif ( -e $link_path ) { - Rex::Logger::info("$link_path exists but is not a symlink, skipping", 'warn'); + Rex::Logger::info( "$link_path exists but is not a symlink, skipping", 'warn' ); } else { symlink $target => $link_path or die "Could not create symlink $link_path: $!"; @@ -273,6 +273,7 @@ task 'home_quickedit', sub { } elsif ( $^O eq 'darwin' ) { Rex::Logger::info('QuickEdit placeholder for macOS (not yet implemented)'); + # TODO: Implement QuickEdit management for macOS } }; diff --git a/dotfiles/zsh/.zshrc b/dotfiles/zsh/.zshrc deleted file mode 100644 index f1241af..0000000 --- a/dotfiles/zsh/.zshrc +++ /dev/null @@ -1,22 +0,0 @@ -if [ -f $HOME/.nofish ]; then - current_time=$(date +%s) - file_time=$(stat -f %m $HOME/.nofish) - time_diff=$((current_time - file_time)) - if [ $time_diff -gt 3600 ]; then - rm -vf $HOME/.nofish - fi -fi -if [ ! -f $HOME/.nofish ]; then - if [ -e /opt/homebrew/bin/fish ]; then - exec /opt/homebrew/bin/fish - elif [ -e /bin/fish ]; then - exec /bin/fish - elif [ -e /usr/bin/fish ]; then - exec /usr/bin/fish - elif [ -e /data/data/com.termux/files/usr/bin/fish ]; then - exec /data/data/com.termux/files/usr/bin/fish - fi - echo 'I might want to install fish on this host' -fi - -alias f=fish diff --git a/dotfiles/zsh/zshrc b/dotfiles/zsh/zshrc new file mode 100644 index 0000000..fa84d26 --- /dev/null +++ b/dotfiles/zsh/zshrc @@ -0,0 +1,22 @@ +if [ -f $HOME/.nofish ]; then + current_time=$(date +%s) + file_time=$(stat -f %m $HOME/.nofish) + time_diff=$((current_time - file_time)) + if [ $time_diff -gt 5 ]; then + rm -vf $HOME/.nofish + fi +fi +if [ ! -f $HOME/.nofish ]; then + if [ -e /opt/homebrew/bin/fish ]; then + exec /opt/homebrew/bin/fish + elif [ -e /bin/fish ]; then + exec /bin/fish + elif [ -e /usr/bin/fish ]; then + exec /usr/bin/fish + elif [ -e /data/data/com.termux/files/usr/bin/fish ]; then + exec /data/data/com.termux/files/usr/bin/fish + fi + echo 'I might want to install fish on this host' +fi + +alias f=fish -- cgit v1.2.3