From f87d1a8e4efae1000910971e60a08518549f46cb Mon Sep 17 00:00:00 2001 From: Alejandro Laguna Date: Fri, 9 Oct 2026 12:08:57 +0200 Subject: [PATCH] feat: init dotfiles --- fish/config.fish | 21 +++++++++++++++++++++ fish/fish_variables | 7 +++++++ fish/functions/fish_prompt.fish | 29 +++++++++++++++++++++++++++++ tmux/tmux.conf | 19 +++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 fish/config.fish create mode 100644 fish/fish_variables create mode 100644 fish/functions/fish_prompt.fish create mode 100644 tmux/tmux.conf diff --git a/fish/config.fish b/fish/config.fish new file mode 100644 index 0000000000000000000000000000000000000000..34179898f6ed320549bc46125590d00608054b5b --- /dev/null +++ b/fish/config.fish @@ -0,0 +1,21 @@ +if status is-interactive + # Commands to run in interactive sessions can go here +end + +# Auto-start GNOME Keyring for Fish +if not pgrep -x "gnome-keyring-d" > /dev/null + gnome-keyring-daemon --start --components=secrets + set -x GNOME_KEYRING_CONTROL /run/user/1000/keyring +end + +alias yta 'yt-dlp -x --audio-format mp3' + +function mountusb + sudo mkdir -p /run/media/alex/M-O + sudo mount /dev/sda1 /run/media/alex/M-O + cd /run/media/alex/M-O +end + +# vcpkg configuration +set -gx VCPKG_ROOT /opt/vcpkg +fish_add_path /opt/vcpkg diff --git a/fish/fish_variables b/fish/fish_variables new file mode 100644 index 0000000000000000000000000000000000000000..cd7edb25773ebee5a1dba9c681b59aa10fe26e22 --- /dev/null +++ b/fish/fish_variables @@ -0,0 +1,7 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR --export MOZ_ENABLE_WAYLAND:0 +SETUVAR --export VCPKG_ROOT:/opt/vcpkg +SETUVAR fish_color_autosuggestion:brblue +SETUVAR fish_greeting:\x1d +SETUVAR fish_user_paths:/opt/vcpkg diff --git a/fish/functions/fish_prompt.fish b/fish/functions/fish_prompt.fish new file mode 100644 index 0000000000000000000000000000000000000000..35572fb4a1f781714529a13c9ca6fc2aedd920f3 --- /dev/null +++ b/fish/functions/fish_prompt.fish @@ -0,0 +1,29 @@ +function fish_prompt --description 'Write out the prompt' + set -l last_pipestatus $pipestatus + set -lx __fish_last_status $status # Export for __fish_print_pipestatus. + set -l normal (set_color --reset) + + # Color the prompt differently when we're root + set -l color_cwd $fish_color_cwd + set -l suffix '>' + if functions -q fish_is_root_user; and fish_is_root_user + if set -q fish_color_cwd_root + set color_cwd $fish_color_cwd_root + end + set suffix '#' + end + + # Write pipestatus + # If the status was carried over (if no command is issued or if `set` leaves the status untouched), don't bold it. + set -l bold_flag --bold + set -q __fish_prompt_status_generation; or set -g __fish_prompt_status_generation $status_generation + if test $__fish_prompt_status_generation = $status_generation + set bold_flag + end + set __fish_prompt_status_generation $status_generation + set -l status_color (set_color $fish_color_status) + set -l statusb_color (set_color $bold_flag $fish_color_status) + set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus) + + echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$prompt_status $suffix " " +end diff --git a/tmux/tmux.conf b/tmux/tmux.conf new file mode 100644 index 0000000000000000000000000000000000000000..f4c92175f97049ec134f366cf334d70939de0bd3 --- /dev/null +++ b/tmux/tmux.conf @@ -0,0 +1,19 @@ +set -g mouse on +set -g history-limit 100000 +set -g base-index 1 +setw -g pane-base-index 1 +set -g renumber-windows on + +set -g status-position bottom +set -g status-interval 5 + +set -g status-style "bg=default" + +set -g status-left "#S " +set -g status-right "%Y-%m-%d %H:%M" + +setw -g window-status-format " #I:#W " +setw -g window-status-current-format " [#I:#W] " + +set -g pane-border-status off +set -g pane-active-border-style "bold"