Pārlūkot izejas kodu

dev: automated commit - 2025-09-22 09:56:48

Mariano Z. 4 mēneši atpakaļ
vecāks
revīzija
7bf9a172ac
37 mainītis faili ar 311 papildinājumiem un 140 dzēšanām
  1. 1 1
      git/.config/git/config
  2. BIN
      gnupg/.gnupg/gpg-agent.conf
  3. BIN
      gnupg/.gnupg/gpg.conf
  4. BIN
      gnupg/.gnupg/sshcontrol
  5. 3 3
      local-bin/.local/bin/code.sh
  6. 1 1
      local-bin/.local/bin/dbeaver-backup.sh
  7. 1 1
      local-bin/.local/bin/dbeaver-restore.sh
  8. 1 1
      local-bin/.local/bin/fix-git.sh
  9. 1 1
      local-bin/.local/bin/font-manager
  10. 1 1
      local-bin/.local/bin/goq.sh
  11. 1 1
      local-bin/.local/bin/leapp.sh
  12. 1 1
      local-bin/.local/bin/lock.sh
  13. 1 1
      local-bin/.local/bin/maintenance.sh
  14. 1 1
      local-bin/.local/bin/nosql.sh
  15. 1 1
      local-bin/.local/bin/openlens.sh
  16. 1 1
      local-bin/.local/bin/randwall
  17. 1 1
      local-bin/.local/bin/redis.sh
  18. 1 1
      local-bin/.local/bin/rop.sh
  19. 1 1
      local-bin/.local/bin/screenshot-upload
  20. 1 1
      local-bin/.local/bin/sdm-ui.sh
  21. 1 1
      local-bin/.local/bin/sm.sh
  22. 4 4
      local-bin/.local/bin/waybar.sh
  23. 2 1
      sway/.config/sway/config
  24. 10 10
      sway/.config/sway/config.d/appearance
  25. 8 8
      sway/.config/sway/config.d/autostart
  26. 1 1
      sway/.config/sway/config.d/keybindings
  27. 21 1
      tmux/.config/tmux/tmux.conf
  28. 10 10
      waybar/.config/waybar/common.jsonc
  29. 26 26
      waybar/.config/waybar/config.jsonc
  30. 1 1
      waybar/.config/waybar/style.css
  31. 1 0
      zsh/.config/zsh/.zprofile
  32. 3 2
      zsh/.config/zsh/alias.zsh
  33. 42 0
      zsh/.config/zsh/completions.zsh
  34. 144 54
      zsh/.config/zsh/functions.zsh
  35. 2 2
      zsh/.config/zsh/init.zsh
  36. 16 0
      zsh/.config/zsh/keymap.zsh
  37. BIN
      zsh/.config/zsh/zsh_history_fw

+ 1 - 1
git/.config/git/config

@@ -1,7 +1,7 @@
 [user]
 	email = marianoz@posteo.net
 	name = Mariano Z.
-	signingkey = 13D35660EC8E8AA03D4370A83FA93CB876C8FFAA
+	signingkey = E54F23DDA33256B4BC82B7184C73BAD25156DACE
 
 [core]
 	autocrlf = input

BIN
gnupg/.gnupg/gpg-agent.conf


BIN
gnupg/.gnupg/gpg.conf


BIN
gnupg/.gnupg/sshcontrol


+ 3 - 3
local-bin/.local/bin/code.sh

@@ -1,12 +1,12 @@
-#!/bin/bash
-MODULE_URL="mzunino.com.uy/go/code"
+#!/usr/bin/env bash
+MODULE_URL="github.com/marianozunino/code/v2"
 BINARY_NAME="code"
 TARGET_DIR="$HOME/.local/bin"
 BINARY_PATH="$TARGET_DIR/$BINARY_NAME"
 
 if [ ! -x "$BINARY_PATH" ]; then
 	notify-send "📦 Installing $BINARY_NAME" "Installing from $MODULE_URL..."
-	GO111MODULE=on GOBIN="$TARGET_DIR" go install "$MODULE_URL@master" || {
+	GO111MODULE=on GOBIN="$TARGET_DIR" go install "$MODULE_URL@v2.0.2" || {
 		notify-send -u critical "Installation Failed" "Failed to install $BINARY_NAME from $MODULE_URL"
 		exit 1
 	}

+ 1 - 1
local-bin/.local/bin/dbeaver-backup.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # DBeaver Profile Backup Script
 # This script creates a backup of DBeaver profiles and configurations

+ 1 - 1
local-bin/.local/bin/dbeaver-restore.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # DBeaver Profile Restore Script
 # This script restores a DBeaver backup created with the backup script
 

+ 1 - 1
local-bin/.local/bin/fix-git.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 OLD_URL=$(git remote get-url origin)
 if [[ $OLD_URL == "https://github.com"* ]]; then

+ 1 - 1
local-bin/.local/bin/font-manager

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # ~/.local/bin/font-manager
 # This script extracts font archives and rebuilds font cache
 # Enhanced version with better integration and error handling

+ 1 - 1
local-bin/.local/bin/goq.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 MODULE_URL="github.com/marianozunino/goq"
 BINARY_NAME="goq"
 TARGET_DIR="$HOME/.local/bin"

+ 1 - 1
local-bin/.local/bin/leapp.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 REPO="noovolari/leapp"
 BINARY_NAME="leapp"
 TARGET_DIR="$HOME/.local/bin"

+ 1 - 1
local-bin/.local/bin/lock.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 swaylock -f \
 	--screenshots \
 	--clock \

+ 1 - 1
local-bin/.local/bin/maintenance.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Make sure we're running as root or with sudo
 if [ "$(id -u)" -ne 0 ]; then

+ 1 - 1
local-bin/.local/bin/nosql.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 BINARY_NAME="nosql"
 TARGET_DIR="$HOME/.local/bin"
 BINARY_PATH="$TARGET_DIR/$BINARY_NAME"

+ 1 - 1
local-bin/.local/bin/openlens.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 REPO="MuhammedKalkan/OpenLens"
 BINARY_NAME="openlens"
 TARGET_DIR="$HOME/.local/bin"

+ 1 - 1
local-bin/.local/bin/randwall

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Kill any existing swaybg or feh instances
 pkill swaybg

+ 1 - 1
local-bin/.local/bin/redis.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 REPO="qishibo/AnotherRedisDesktopManager"
 BINARY_NAME="redis"
 TARGET_DIR="$HOME/.local/bin"

+ 1 - 1
local-bin/.local/bin/rop.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 MODULE_URL="github.com/marianozunino/rop"
 BINARY_NAME="rop"
 TARGET_DIR="$HOME/.local/bin"

+ 1 - 1
local-bin/.local/bin/screenshot-upload

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 file=/tmp/$(date "+%Y%m%d-%H%M%S")_screenshot.png
 
 grim -g "$(slurp)" "$file" &&

+ 1 - 1
local-bin/.local/bin/sdm-ui.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 MODULE_URL="github.com/marianozunino/sdm-ui"
 BINARY_NAME="sdm-ui"
 TARGET_DIR="$HOME/.local/bin"

+ 1 - 1
local-bin/.local/bin/sm.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 BINARY_NAME="sm"
 TARGET_DIR="$HOME/.local/bin"
 BINARY_PATH="$TARGET_DIR/$BINARY_NAME"

+ 4 - 4
local-bin/.local/bin/waybar.sh

@@ -1,11 +1,11 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 CONFIG_FILES="$HOME/.config/waybar/config.jsonc $HOME/.config/waybar/style.css"
 
 trap "killall waybar" EXIT
 
 while true; do
-    waybar &
-    inotifywait -e create,modify $CONFIG_FILES
-    killall waybar
+	waybar &
+	inotifywait -e create,modify $CONFIG_FILES
+	killall waybar
 done

+ 2 - 1
sway/.config/sway/config

@@ -1,5 +1,6 @@
 # Include system defaults
-include /etc/sway/config.d/*
+# include /etc/sway/config.d/*
+exec systemd-cat --identifier=sway dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
 
 # Include custom configuration modules
 include ~/.config/sway/config.d/variables

+ 10 - 10
sway/.config/sway/config.d/appearance

@@ -15,13 +15,13 @@ gaps outer 5
 xwayland enable
 
 # SwayFX Settings
-smart_corner_radius on
-corner_radius 10
-
-default_dim_inactive 0.05
-blur enable
-blur_passes 1
-blur_radius 1
-layer_effects "waybar" "blur enable"; shadows enable
-shadows on
-shadow_blur_radius 20
+# smart_corner_radius on
+# corner_radius 10
+# 
+# default_dim_inactive 0.05
+# blur enable
+# blur_passes 1
+# blur_radius 1
+# layer_effects "waybar" "blur enable"; shadows enable
+# shadows on
+# shadow_blur_radius 20

+ 8 - 8
sway/.config/sway/config.d/autostart

@@ -1,28 +1,28 @@
 # vim: ft=swayconfig
 # System Services
 exec {
-    /usr/lib/mate-polkit/polkit-mate-authentication-agent-1
+    # /usr/lib/mate-polkit/polkit-mate-authentication-agent-1
     blueman-applet
     nm-applet
     swaync
     wlsunset -l -34.9 -L -56.2 -t 4500 -g 0.9
     easyeffects --gapplication-service
 }
-
-# User Interface
+#
+# # User Interface
 exec {
     ~/.local/bin/randwall
     ~/.local/bin/waybar.sh
 }
-
+#
 # Applications
 exec {
     $term --class="uy.com.mzunino"
     slack
     davmail
-    betterbird
-    zen-browser
-    obsidian
-    localsend
+    thunderbird
+    zen
+    # obsidian
+    localsend_app
     vesktop
 }

+ 1 - 1
sway/.config/sway/config.d/keybindings

@@ -16,7 +16,7 @@ bindgesture swipe:down workspace prev
 bindsym {
     $mod+Return   exec $term
     $mod+d        exec rofi -show combi -combi-modi "window,drun" -modi combi
-    $mod+t        exec ~/.local/bin/code.sh -s ~/.local/bin/fuzzel.lua
+    $mod+t        exec ~/.local/bin/code.sh -s ~/.local/bin/rofi.yaml
     $mod+shift+t  exec ~/.local/bin/present
     $mod+n        exec ~/.local/bin/sdm-ui.sh dmenu
     $mod+o        exec ~/.local/bin/launch-or-focus obsidian "cd /home/forbi/Documents/Vault && $term --class obsidian nvim"

+ 21 - 1
tmux/.config/tmux/tmux.conf

@@ -15,6 +15,7 @@ setw -g aggressive-resize on               # Only resize screen if smaller scree
 set -g history-limit 10000                 # Store 10k lines of history
 set-option -g allow-rename off             # Disable automatic window renaming
 set-option -s set-clipboard on             # Enable clipboard support
+setw -g mode-keys vi                       # Use vi keys in copy mode
 
 
 # Key Bindings
@@ -35,6 +36,25 @@ bind -r J resize-pane -D 5
 bind -r K resize-pane -U 5
 bind -r L resize-pane -R 5
 
+# Vim-like copy mode navigation
+bind-key -T copy-mode-vi h send-keys -X cursor-left
+bind-key -T copy-mode-vi j send-keys -X cursor-down
+bind-key -T copy-mode-vi k send-keys -X cursor-up
+bind-key -T copy-mode-vi l send-keys -X cursor-right
+bind-key -T copy-mode-vi w send-keys -X next-word
+bind-key -T copy-mode-vi b send-keys -X previous-word
+bind-key -T copy-mode-vi 0 send-keys -X start-of-line
+bind-key -T copy-mode-vi $ send-keys -X end-of-line
+bind-key -T copy-mode-vi G send-keys -X history-bottom
+bind-key -T copy-mode-vi g send-keys -X history-top
+bind-key -T copy-mode-vi / command-prompt -T search -I "#{pane_current_path}" "send -X search-forward \"%%\""
+bind-key -T copy-mode-vi ? command-prompt -T search -I "#{pane_current_path}" "send -X search-backward \"%%\""
+bind-key -T copy-mode-vi n send-keys -X search-again
+bind-key -T copy-mode-vi N send-keys -X search-reverse
+bind-key -T copy-mode-vi v send-keys -X begin-selection
+bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
+bind-key -T copy-mode-vi Escape send-keys -X cancel
+
 # Move pane to a different window
 bind-key m choose-window -F "#{window_index}: #{window_name}" "join-pane -h -t %%"
 bind-key M choose-window -F "#{window_index}: #{window_name}" "join-pane -v -t %%"
@@ -85,7 +105,7 @@ set -g @catppuccin_window_current_text "#W#{?window_zoomed_flag,(🔍),}"
 set -g @catppuccin_window_default_text "#W"
 
 # Determine status modules based on hostname
-run-shell "if [ $(hostname) = 't14' ]; then \
+run-shell "if [ $(hostname) = 'fw' ]; then \
     tmux set -g @catppuccin_status_modules_right 'date_time battery session'; \
   else \
     tmux set -g @catppuccin_status_modules_right 'date_time session'; \

+ 10 - 10
waybar/.config/waybar/common.jsonc

@@ -123,16 +123,16 @@
 			]
 		}
 	},
-	"pulseaudio#microphone": {
-		"format": "{format_source}",
-		"format-source": " {volume}%",
-		"format-source-muted": "  Muted",
-		"on-click": "wpctl set-mute @DEFAULT_SOURCE@ toggle",
-		"on-click-right": "pavucontrol",
-		"on-scroll-up": "wpctl set-volume -l 1 @DEFAULT_SOURCE@ 5%+",
-		"on-scroll-down": "wpctl set-volume -l 1 @DEFAULT_SOURCE@ 5%-",
-		"scroll-step": 5
-	},
+	// "pulseaudio#microphone": {
+	// 	"format": "{format_source}",
+	// 	"format-source": " {volume}%",
+	// 	"format-source-muted": "  Muted",
+	// 	"on-click": "wpctl set-mute @DEFAULT_SOURCE@ toggle",
+	// 	"on-click-right": "pavucontrol",
+	// 	"on-scroll-up": "wpctl set-volume -l 1 @DEFAULT_SOURCE@ 5%+",
+	// 	"on-scroll-down": "wpctl set-volume -l 1 @DEFAULT_SOURCE@ 5%-",
+	// 	"scroll-step": 5
+	// },
 	"temperature": {
 		"thermal-zone": 1,
 		"format": " {temperatureC}°C",

+ 26 - 26
waybar/.config/waybar/config.jsonc

@@ -45,21 +45,21 @@
       "custom/wf-recorder",
       "custom/randwall",
       "pulseaudio",
-      "custom/vpn",
+      // "custom/vpn",
       "custom/notification",
       "tray",
       "clock"
     ],
     "output": [
       "HDMI-A-1"
-    ],
-    "custom/vpn": {
-      "format": "{}",
-      "return-type": "json",
-      "interval": 1,
-      "exec": "/home/forbi/.local/bin/vpn",
-      "on-click": "/home/forbi/.local/bin/vpn toggle"
-    }
+    ]
+    // "custom/vpn": {
+    //   "format": "{}",
+    //   "return-type": "json",
+    //   "interval": 1,
+    //   "exec": "/home/forbi/.local/bin/vpn",
+    //   "on-click": "/home/forbi/.local/bin/vpn toggle"
+    // }
   },
   {
     "include": [
@@ -73,10 +73,10 @@
       "custom/playerlabel"
     ],
     "modules-right": [
-      "custom/microphone",
+      // "custom/microphone",
       "custom/randwall",
       "pulseaudio",
-      "custom/vpn",
+      // "custom/vpn",
       "custom/notification",
       "backlight",
       "battery",
@@ -85,20 +85,20 @@
     ],
     "output": [
       "eDP-1"
-    ],
-    "custom/vpn": {
-      "format": "{}",
-      "return-type": "json",
-      "interval": 1,
-      "exec": "/home/forbi/.local/bin/vpn",
-      "on-click": "/home/forbi/.local/bin/vpn toggle"
-    },
-    "custom/microphone": {
-      "format": "{}",
-      "return-type": "json",
-      "exec": "~/.config/waybar/scripts/mic-status.sh --monitor",
-      "restart-interval": 1,
-      "on-click": "pavucontrol -t 4"
-    }
+    ]
+    // "custom/vpn": {
+    //   "format": "{}",
+    //   "return-type": "json",
+    //   "interval": 1,
+    //   "exec": "/home/forbi/.local/bin/vpn",
+    //   "on-click": "/home/forbi/.local/bin/vpn toggle"
+    // }
+    // "custom/microphone": {
+    //   "format": "{}",
+    //   "return-type": "json",
+    //   "exec": "~/.config/waybar/scripts/mic-status.sh --monitor",
+    //   "restart-interval": 1,
+    //   "on-click": "pavucontrol -t 4"
+    // }
   }
 ]

+ 1 - 1
waybar/.config/waybar/style.css

@@ -25,7 +25,7 @@ tooltip {
 #workspaces button {
     color: #fff;
     border-radius: 10px;
-    padding: 0px;
+    padding: 5px;
     margin: 4px 4px;
 }
 

+ 1 - 0
zsh/.config/zsh/.zprofile

@@ -11,5 +11,6 @@ export ZDOTDIR=${ZDOTDIR:-~/.config/zsh}
 if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
     #exec niri
     exec sway
+    # exec niri
 fi
 

+ 3 - 2
zsh/.config/zsh/alias.zsh

@@ -1,6 +1,6 @@
 # Package management
 alias fly='flyctl'
-alias yay="paru --bottomup"
+# alias yay="paru --bottomup"
 alias yeet="sudo pacman -Rns"
 alias orphan="doas pacman -Rns (pacman -Qtdq)"
 
@@ -44,7 +44,6 @@ alias gho="gh browse"
 alias gh-clone='gc'
 alias task='go-task'
 alias sdu='sdm-ui fzf'
-alias fd='/bin/fd'
 
 
 # Tmux
@@ -58,6 +57,8 @@ alias doomconf="vim ~/.config/gzdoom/gzdoom.ini"
 alias pluginconf="vim ~/.config/nvim/plugins.vim"
 alias i3conf="vim ~/.config/i3/config"
 alias cssh="vim ~/.ssh/config"
+alias sm="sublime_merge"
+alias nv = "nix run github:vic/nix-versions --";
 
 function vimwhich {
   nvim $(which $1)

+ 42 - 0
zsh/.config/zsh/completions.zsh

@@ -46,3 +46,45 @@ _kf_completion() {
 
 # Register the completion
 compdef _kf_completion kf
+
+
+_yay_completion() {
+    local cur prev opts
+    COMPREPLY=()
+    cur="${COMP_WORDS[COMP_CWORD]}"
+    prev="${COMP_WORDS[COMP_CWORD-1]}"
+
+    opts="-Syyu -Syu -Ss -S -R -Q -Si -Sc help install remove list clean"
+
+    COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+    return 0
+}
+
+# For zsh:
+_yay_zsh_completion() {
+    local -a opts
+    opts=(
+        '-Syyu:Update system'
+        '-Syu:Update system'
+        '-Ss:Search packages'
+        '-S:Install system-wide'
+        '-R:Remove package'
+        '-Q:List installed'
+        '-Si:Package info'
+        '-Sc:Clean cache'
+        'help:Show help'
+        'install:Install to user env'
+        'remove:Remove from user env'
+        'list:List installed packages'
+        'clean:Clean nix store'
+    )
+    _describe 'yay commands' opts
+}
+
+# Enable completion based on shell
+if [[ -n "${BASH_VERSION:-}" ]]; then
+    complete -F _yay_completion yay
+elif [[ -n "${ZSH_VERSION:-}" ]]; then
+    compdef _yay_zsh_completion yay
+fi
+

+ 144 - 54
zsh/.config/zsh/functions.zsh

@@ -23,7 +23,7 @@ function open {
     echo "Opens files using the system default application"
     return 1
   fi
-  
+
   for i in "$@"; do
     if [[ ! -e "$i" ]]; then
       echo "Warning: '$i' does not exist" >&2
@@ -39,12 +39,12 @@ function fopen() {
     echo "Error: fd is not installed" >&2
     return 1
   fi
-  
+
   if ! command -v fzf >/dev/null 2>&1; then
     echo "Error: fzf is not installed" >&2
     return 1
   fi
-  
+
   local selected
   selected=$(fd "$@" | fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}')
   [[ -n "$selected" ]] && setsid nohup xdg-open "$selected" >/dev/null 2>&1 &
@@ -57,7 +57,7 @@ function fopen() {
 # Smart package manager detection and execution
 function _package_manager {
   local pkg_manager=""
-  
+
   # Detect package manager based on lock files
   if [[ -f bun.lockb ]]; then
     pkg_manager="bun"
@@ -95,7 +95,7 @@ function dc() {
     echo "If no message provided, uses timestamp-based message"
     return 0
   fi
-  
+
   if ! git rev-parse --is-inside-work-tree &>/dev/null; then
     echo "Error: Not in a git repository" >&2
     return 1
@@ -139,7 +139,7 @@ function git-clean() {
     echo "Protects main, master, and develop branches"
     return 0
   fi
-  
+
   if ! git rev-parse --is-inside-work-tree &>/dev/null; then
     echo "Error: Not in a git repository" >&2
     return 1
@@ -174,22 +174,13 @@ function git-clean() {
   fi
 }
 
-# Open Sublime Merge
-function sm {
-  if [[ ! -f /opt/sublime_merge/sublime_merge ]]; then
-    echo "Error: Sublime Merge not found at /opt/sublime_merge/sublime_merge" >&2
-    return 1
-  fi
-  /opt/sublime_merge/sublime_merge "$@"
-}
-
 # Quick access to Neovim config
 function vimrc {
   if [[ -z "$XDG_CONFIG_HOME" ]]; then
     echo "Error: XDG_CONFIG_HOME not set" >&2
     return 1
   fi
-  
+
   local original_dir=$(pwd)
   cd "$XDG_CONFIG_HOME/nvim" || {
     echo "Error: Cannot access $XDG_CONFIG_HOME/nvim" >&2
@@ -199,13 +190,29 @@ function vimrc {
   cd "$original_dir"
 }
 
+
+function nixrc {
+  if [[ -z "$XDG_CONFIG_HOME" ]]; then
+    echo "Error: XDG_CONFIG_HOME not set" >&2
+    return 1
+  fi
+
+  local original_dir=$(pwd)
+  cd "$XDG_CONFIG_HOME/nixos" || {
+    echo "Error: Cannot access $XDG_CONFIG_HOME/nixos" >&2
+    return 1
+  }
+  nvim
+  cd "$original_dir"
+}
+
 # Quick access to Zsh config
 function zshrc {
   if [[ -z "$XDG_CONFIG_HOME" ]]; then
     echo "Error: XDG_CONFIG_HOME not set" >&2
     return 1
   fi
-  
+
   local original_dir=$(pwd)
   cd "$XDG_CONFIG_HOME/zsh" || {
     echo "Error: Cannot access $XDG_CONFIG_HOME/zsh" >&2
@@ -224,19 +231,19 @@ function expose() {
     echo "Example: expose 3000  # Exposes localhost:3000"
     return 0
   fi
-  
+
   if [[ -z "$1" ]]; then
     echo "Error: Port number required" >&2
     echo "Usage: expose <port>" >&2
     return 1
   fi
-  
+
   # Validate port number
   if ! [[ "$1" =~ ^[0-9]+$ ]] || [[ "$1" -lt 1 ]] || [[ "$1" -gt 65535 ]]; then
     echo "Error: Invalid port number. Must be between 1-65535" >&2
     return 1
   fi
-  
+
   # Check if port is already in use
   if lsof -i ":$1" >/dev/null 2>&1; then
     echo "Warning: Port $1 is already in use" >&2
@@ -249,7 +256,7 @@ function expose() {
       return 1
     fi
   fi
-  
+
   echo "Creating SSH tunnel for port $1..."
   ssh marianozunino@srv.us -R 1:localhost:"$1"
 }
@@ -263,19 +270,19 @@ function ppid {
     echo "Alias: pport"
     return 0
   fi
-  
+
   if [[ -z "$1" ]]; then
     echo "Error: Port number required" >&2
     echo "Usage: ppid <port>" >&2
     return 1
   fi
-  
+
   # Validate port number
   if ! [[ "$1" =~ ^[0-9]+$ ]] || [[ "$1" -lt 1 ]] || [[ "$1" -gt 65535 ]]; then
     echo "Error: Invalid port number. Must be between 1-65535" >&2
     return 1
   fi
-  
+
   lsof -i ":$1"
 }
 
@@ -295,7 +302,7 @@ function kf {
     echo "Example: kf prod my-service"
     return 0
   fi
-  
+
   if [[ -z "$1" ]]; then
     echo "Error: Cluster name required" >&2
     echo "Usage: kf <cluster> [service-name]" >&2
@@ -314,7 +321,7 @@ function kf {
     echo "Error: kubefwd is not installed" >&2
     return 1
   fi
-  
+
   echo "Starting kubefwd for cluster: $cluster"
   sudo -E kubefwd svc -n "${namespace}" -x "${cluster}" ${svc_filter}
 }
@@ -347,15 +354,15 @@ function wacom {
     echo "Supports both Wayland and X11 sessions"
     return 0
   fi
-  
+
   if [[ "$XDG_SESSION_TYPE" = "wayland" ]]; then
     if ! command -v otd >/dev/null 2>&1; then
       echo "Error: opentabletdriver (otd) not found" >&2
       return 1
     fi
-    
+
     systemctl --user enable opentabletdriver --now
-    
+
     local config_file="$HOME/Sync/System/Configs/wacom/wacom.json"
     if [[ -f "$config_file" ]]; then
       otd loadsettings "$config_file"
@@ -368,14 +375,14 @@ function wacom {
       echo "Error: xsetwacom not found" >&2
       return 1
     fi
-    
+
     xsetwacom --set "Wacom One by Wacom S Pen stylus" ResetArea
     xsetwacom --set "Wacom One by Wacom S Pen stylus" MapToOutput DisplayPort-0
     xsetwacom --set "Wacom One by Wacom S Pen stylus" Rotate half
 
     xsetwacom --set "Wacom One by Wacom S Pen eraser" ResetArea
     xsetwacom --set "Wacom One by Wacom S Pen eraser" MapToOutput DisplayPort-0
-    
+
     echo "Wacom configured for X11"
   fi
 }
@@ -389,13 +396,13 @@ function cat {
     echo "Automatically adjusts output for SSH sessions"
     return 0
   fi
-  
+
   if ! command -v bat >/dev/null 2>&1; then
     echo "Warning: bat not found, falling back to system cat" >&2
     command cat "$@"
     return $?
   fi
-  
+
   if [[ -n "$SSH_TTY" ]] || [[ -n "$SSH_CLIENT" ]] || [[ -n "$SSH_CONNECTION" ]]; then
     bat --plain --paging=never "$@"
   else
@@ -413,7 +420,7 @@ function toggle_resolution() {
     echo "  -m, --mirror    Force mirror mode"
     return 0
   fi
-  
+
   local mirror_mode=false
 
   # Parse flags
@@ -434,7 +441,7 @@ function toggle_resolution() {
     echo "Error: swaymsg not found. This function requires Sway window manager" >&2
     return 1
   fi
-  
+
   # Check if jq is available
   if ! command -v jq >/dev/null 2>&1; then
     echo "Error: jq not found. Required for JSON parsing" >&2
@@ -501,18 +508,18 @@ function cb {
     echo "Launch Code::Blocks with high contrast theme"
     return 0
   fi
-  
+
   if [[ ! -f /usr/bin/codeblocks ]]; then
     echo "Error: Code::Blocks not found at /usr/bin/codeblocks" >&2
     return 1
   fi
-  
+
   # Store original values
   local original_gtk_theme="$GTK_THEME"
   local original_gdk_theme="$GDK_THEME"
   local original_qt_style="$QT_STYLE_OVERRIDE"
   local original_xdg_desktop="$XDG_CURRENT_DESKTOP"
-  
+
   # Set high contrast theme temporarily
   GTK_THEME=HighContrast \
   GDK_THEME=HighContrast \
@@ -521,7 +528,7 @@ function cb {
   GTK2_RC_FILES="" \
   GTK_RC_FILES="" \
   /usr/bin/codeblocks "$@"
-  
+
   # Restore original values
   export GTK_THEME="$original_gtk_theme"
   export GDK_THEME="$original_gdk_theme"
@@ -539,13 +546,13 @@ function zrepo() {
     echo "Example: zrepo my-project"
     return 0
   fi
-  
+
   if [[ -z "$1" ]]; then
     echo "Error: Repository name required" >&2
     echo "Usage: zrepo <repo-name>" >&2
     return 1
   fi
-  
+
   # Validate repository name (basic check)
   if [[ ! "$1" =~ ^[a-zA-Z0-9_-]+$ ]]; then
     echo "Error: Repository name contains invalid characters" >&2
@@ -558,7 +565,7 @@ function zrepo() {
   local PATH_ON_SERVER="/var/git/$REPO.git"
 
   echo "Creating repository '$REPO' on $SERVER..."
-  
+
   ssh "$SERVER" "
     if [ -d $PATH_ON_SERVER ]; then
       echo 'Error: Repository '$REPO' already exists'
@@ -592,7 +599,7 @@ function _has {
     echo "Usage: _has <command>" >&2
     return 1
   fi
-  
+
   whence "$1" >/dev/null 2>&1
 }
 
@@ -604,12 +611,12 @@ function cdr {
     echo "Navigate to recently visited directories using fzf"
     return 0
   fi
-  
+
   if ! command -v fzf >/dev/null 2>&1; then
     echo "Error: fzf is not installed" >&2
     return 1
   fi
-  
+
   local dir
   dir=$(dirs -pl | awk '!x[$0]++' | fzf --height 40% --reverse)
   [[ -n "$dir" ]] && cd "$dir"
@@ -653,15 +660,15 @@ function font-switch() {
         echo "Example: font-switch jetbrains-mono"
         return 0
     fi
-    
+
     if [[ -z "$1" ]]; then
         echo "Available fonts:"
         font-manager list
         return 0
     fi
-    
+
     local font_name="$1"
-    
+
     # Check if font exists
     if ! font-manager list | grep -q "$font_name"; then
         echo "Error: Font '$font_name' not found" >&2
@@ -669,17 +676,17 @@ function font-switch() {
         font-manager list >&2
         return 1
     fi
-    
+
     echo "Switching to $font_name fonts..."
     font-manager clean
     font-manager extract "$font_name"
-    
+
     # Reload terminal if in kitty
     if [[ "$TERM" == "xterm-kitty" ]] && command -v kitty >/dev/null 2>&1; then
         echo "Reloading kitty configuration..."
         kitty @ set-colors --all ~/.config/kitty/kitty.conf
     fi
-    
+
     echo "Font switch complete!"
 }
 
@@ -692,24 +699,107 @@ function font-preview() {
         echo "Example: font-preview jetbrains-mono"
         return 0
     fi
-    
+
     if [[ -z "$1" ]]; then
         echo "Error: Font name required" >&2
         echo "Usage: font-preview [font-name]" >&2
         return 1
     fi
-    
+
     local font_name="$1"
     local preview_text="The quick brown fox jumps over the lazy dog
 ABCDEFGHIJKLMNOPQRSTUVWXYZ
 abcdefghijklmnopqrstuvwxyz
 0123456789
 !@#$%^&*()_+-=[]{}|;':\",./<>?"
-    
+
     echo "Previewing font: $font_name"
     echo "----------------------------------------"
     echo "$preview_text" | font-manager extract "$font_name" && echo "$preview_text"
 }
 
 
+yay() {
+    case "$1" in
+        # System update
+        update|"-Syu")
+            echo "Updating NixOS system..."
+              nh os switch ~/.config/nixos --update
+            ;;
+
+        # Search packages
+        search|"-Ss")
+            [ -z "$2" ] && { echo "Usage: yay search <package>"; return 1; }
+            echo "Searching for '$2'..."
+            nix search nixpkgs "$2" 2>/dev/null || nix-env -qaP | grep -i "$2"
+            ;;
+
+        # Install package to user environment
+        install|"-S")
+            [ -z "$2" ] && { echo "Usage: yay install <package>"; return 1; }
+            echo "Installing $2..."
+            nix-env -iA nixpkgs.$2
+            ;;
+
+        # Remove package
+        remove|"-R")
+            [ -z "$2" ] && { echo "Usage: yay remove <package>"; return 1; }
+            echo "Removing $2..."
+            nix-env -e "$2"
+            ;;
+
+        # List installed packages
+        list|"-Q")
+            echo "Installed packages:"
+            nix-env -q
+            ;;
+
+        # Clean up
+        clean|"-Sc")
+            echo "Cleaning nix store..."
+            nix-collect-garbage
+            sudo nix-collect-garbage -d
+            ;;
+
+        # Help
+        help|"-h")
+            bat -Pp << 'EOF'
+yay - Simple NixOS package manager wrapper
+
+Commands:
+  yay                    Rebuild system
+  yay update             Update system
+  yay search <pkg>       Search packages
+  yay install <pkg>      Install package (user)
+  yay remove <pkg>       Remove package
+  yay list              List installed packages
+  yay clean             Clean package cache
+  yay help              Show this help
+
+Note: For system packages, edit ~/.config/nixos/configuration.nix
+EOF
+            ;;
+
+        # Default: rebuild system
+        "")
+            echo "Rebuilding NixOS system..."
+              nh os switch ~/.config/nixos
+            ;;
+
+        # Try to install unknown commands
+        *)
+            if [[ ! "$1" =~ ^- ]]; then
+                echo "Installing '$1'..."
+                nix-env -iA nixpkgs.$1
+            else
+                echo "Unknown option: $1"
+                echo "Run 'yay help' for available commands"
+                return 1
+            fi
+            ;;
+    esac
+}
 
+function nas() {
+  rclone mount --vfs-cache-mode writes --dir-cache-time 5s --no-check-certificate --allow-other nas: /home/mzunino/nas
+}

+ 2 - 2
zsh/.config/zsh/init.zsh

@@ -76,10 +76,10 @@ source "$PLUGIN_DIR/minimal/minimal.zsh"
 # Source config files
 source "$ZDOTDIR/opts.zsh"
 source "$ZDOTDIR/rose-pine.sh"
-source "$ZDOTDIR/maintenance.zsh"
+#source "$ZDOTDIR/maintenance.zsh"
 
 # Defer loading
 zsh-defer source "$PLUGIN_DIR/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
 for config in mise.zsh tmux.zsh functions.zsh alias.zsh keymap.zsh path.zsh pnpm.zsh; do
   zsh-defer source "$ZDOTDIR/$config"
-done
+done

+ 16 - 0
zsh/.config/zsh/keymap.zsh

@@ -73,3 +73,19 @@ bindkey "^[[H" beginning-of-line
 bindkey "^[[F" end-of-line
 bindkey "^[[1~" beginning-of-line
 bindkey "^[[4~" end-of-line
+
+# Function to open NixOS config directory
+function edit-nixos-config() {
+    # Store current directory
+    local original_dir="$PWD"
+
+    # Build the command that will cd, run nvim, then cd back
+    BUFFER="cd ~/.config/nixos && nvim . && cd '$original_dir'"
+    zle accept-line
+}
+zle -N edit-nixos-config
+
+# Bind Ctrl+X then C in both insert and command modes
+bindkey -M viins '^xc' edit-nixos-config
+bindkey -M vicmd '^xc' edit-nixos-config
+

BIN
zsh/.config/zsh/zsh_history_fw