diff --git a/sway/.config/sway/config b/sway/.config/sway/config index 1b863ae..ffe1b5e 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -318,9 +318,9 @@ exec { # Applications $term --class="uy.com.mzunino" slack - #davmail + davmail betterbird - vesktop + legcord # Browser - using gtk-launch instead of BROWSER variable zen-browser diff --git a/waybar/.config/waybar/config.jsonc b/waybar/.config/waybar/config.jsonc index eac0854..b37f276 100644 --- a/waybar/.config/waybar/config.jsonc +++ b/waybar/.config/waybar/config.jsonc @@ -1,4 +1,66 @@ [ + { + "include": [ + "~/.config/waybar/common.jsonc" + ], + "modules-left": [ + "sway/workspaces" + ], + "modules-right": [ + "disk", + "cpu", + "memory" + ], + "output": [ + "DP-1" + ], + "cpu": { + "interval": 10, + "format": " {}%", + "max-length": 10 + }, + "memory": { + "interval": 30, + "format": " {used:0.1f}/{total:0.1f} GiB" + }, + "disk": { + "interval": 30, + "format": " {used}/{total}", + "unit": "GiB", + "path": "/home" + } + }, + { + "include": [ + "~/.config/waybar/common.jsonc" + ], + "modules-left": [ + "sway/workspaces" + ], + "modules-center": [ + "custom/playerctl", + "custom/playerlabel" + ], + "modules-right": [ + "custom/wf-recorder", + "custom/randwall", + "pulseaudio", + "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" + } + }, { "include": [ "~/.config/waybar/common.jsonc" diff --git a/zsh/.config/zsh/alias.zsh b/zsh/.config/zsh/alias.zsh index 864bb32..041f6cc 100644 --- a/zsh/.config/zsh/alias.zsh +++ b/zsh/.config/zsh/alias.zsh @@ -58,8 +58,11 @@ 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 vd='vim -c ":VimwikiMakeDiaryNote"' -alias vw='vim -c ":VimwikiIndex"' + +function vimwhich { + nvim $(which $1) +} +alias vw="vimwhich" # Clipboard operations - with auto-detection if [ "$XDG_SESSION_TYPE" = "wayland" ]; then diff --git a/zsh/.config/zsh/functions.zsh b/zsh/.config/zsh/functions.zsh index edbbc9c..5c3d354 100644 --- a/zsh/.config/zsh/functions.zsh +++ b/zsh/.config/zsh/functions.zsh @@ -287,6 +287,7 @@ fi # COMPLETIONS for completion_file in ~/.local/share/zsh/*-autocomplete.zsh; do + echo $completion_file if [ -f "$completion_file" ]; then source "$completion_file" fi @@ -298,14 +299,7 @@ if command -v kubefwd &> /dev/null; then eval "$(kubefwd completion zsh)"; fi if command -v bombadil &> /dev/null; then eval "$(bombadil generate-completions zsh)"; fi if command -v eza &> /dev/null; then compdef eza=ls; fi -# ALIASES -# yarn() { echo 🖕; } -# yarnpkg() { echo 🖕; } -# pnpm() { echo 🖕; } -# pn() { echo 🖕; } -# pnpx() { echo 🖕; } -# npm() { echo 🖕; } - +alias dev='~/Dev/marianozunino/dev/dev' alias p='_package_manager' alias fo='fopen' alias drop='upload_file' diff --git a/zsh/.config/zsh/tmux.zsh b/zsh/.config/zsh/tmux.zsh index cf09f8d..91147e9 100644 --- a/zsh/.config/zsh/tmux.zsh +++ b/zsh/.config/zsh/tmux.zsh @@ -23,19 +23,30 @@ if [ -z "$TMUX" ]; then fi fi -# tmux project launcher function function tmuxLauncher { - selected_dir=$(/bin/fd --base-directory ~/Dev --search-path . -t d -d 2 | fzf) - if [[ -n "$selected_dir" ]]; then - if git rev-parse --git-dir &>/dev/null; then - tmux rename-window "$selected_dir" - cd "$HOME/Dev/$selected_dir" - else - tmux new-window -n "$selected_dir" -c "$HOME/Dev/$selected_dir" - fi + local selected_dir full_path session_name + + selected_dir=$(fd --base-directory ~/Dev --search-path . -t d -d 2 | fzf) + [[ -z "$selected_dir" ]] && { zle reset-prompt; return } + + selected_dir="${selected_dir#./}" + selected_dir="${selected_dir%/}" + full_path="$HOME/Dev/$selected_dir" + + session_name="${selected_dir//\//-}" + session_name="${session_name%-}" + + if [[ -n "$TMUX" ]]; then + tmux new-window -n "$session_name" -c "$full_path" + zle reset-prompt + else + echo "tmux new-session -s '$session_name' -c '$full_path'" > /tmp/tmux_cmd + zle accept-line + BUFFER="source /tmp/tmux_cmd && rm /tmp/tmux_cmd" + zle accept-line fi - zle reset-prompt } zle -N tmuxLauncher bindkey "^t" tmuxLauncher +