mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 12:12:13 +02:00
initial commit
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
# Abbreviations for "docker compose"
|
||||
abbr --add dkcpb "docker compose build"
|
||||
abbr --add dkcpcf "docker compose config"
|
||||
abbr --add dkcpcp "docker compose cp"
|
||||
abbr --add dkcpce "docker compose create"
|
||||
abbr --add dkcpdn "docker compose down"
|
||||
abbr --add dkcpevt "docker compose events"
|
||||
abbr --add dkcpex "docker compose exec"
|
||||
abbr --add dkcpimg "docker compose images"
|
||||
abbr --add dkcpkl "docker compose kill"
|
||||
abbr --add dkcplg "docker compose logs"
|
||||
abbr --add dkcpls "docker compose ls"
|
||||
abbr --add dkcppa "docker compose pause"
|
||||
abbr --add dkcppr "docker compose port"
|
||||
abbr --add dkcppl "docker compose pull"
|
||||
abbr --add dkcpps "docker compose ps"
|
||||
abbr --add dkcprs "docker compose restart"
|
||||
abbr --add dkcprn "docker compose run"
|
||||
abbr --add dkcpsc "docker compose scale"
|
||||
abbr --add dkcpst "docker compose start"
|
||||
abbr --add dkcpsp "docker compose stop"
|
||||
abbr --add dkcptp "docker compose top"
|
||||
abbr --add dkcpups "docker compose unpause"
|
||||
abbr --add dkcpup "docker compose up"
|
||||
abbr --add dkcpv "docker compose version"
|
||||
abbr --add dkcpwt "docker compose wait"
|
||||
abbr --add dkcpwa "docker compose watch"
|
||||
|
||||
# Abbrevations for "docker container"
|
||||
abbr --add dkctnat "docker container attach"
|
||||
abbr --add dkctncm "docker container commit"
|
||||
abbr --add dkctncp "docker container cp"
|
||||
abbr --add dkctnca "docker container create"
|
||||
abbr --add dkctnd "docker container diff"
|
||||
abbr --add dkctnep "docker container export"
|
||||
abbr --add dkctnex "docker container exec"
|
||||
abbr --add dkctnip "docker container inspect"
|
||||
abbr --add dkctnk "docker container kill"
|
||||
abbr --add dkctnl "docker container logs"
|
||||
abbr --add dkctnls "docker container ls"
|
||||
abbr --add dkctnp "docker container pause"
|
||||
abbr --add dkctnpn "docker container prune"
|
||||
abbr --add dkctnp "docker container port"
|
||||
abbr --add dkctnps "docker container port"
|
||||
abbr --add dkctnrm "docker container rm"
|
||||
abbr --add dkctnr "docker container run"
|
||||
abbr --add dkctnrn "docker container rename"
|
||||
abbr --add dkctnrt "docker container restart"
|
||||
abbr --add dkctns "docker container stop"
|
||||
abbr --add dkctnst "docker container start"
|
||||
abbr --add dkctnsts "docker container stats"
|
||||
abbr --add dkctnt "docker container top"
|
||||
abbr --add dkctnud "docker container update"
|
||||
abbr --add dkctnup "docker container unpause"
|
||||
abbr --add dkctnw "docker container wait"
|
||||
|
||||
# Abbreviations for "docker"
|
||||
abbr --add dkev "docker events"
|
||||
abbr --add dkhtr "docker history"
|
||||
abbr --add dkip "docker import"
|
||||
abbr --add dkl "docker load"
|
||||
abbr --add dks "docker stats"
|
||||
abbr --add dkt "docker tag"
|
||||
|
||||
# Abbrevations for "docker system"
|
||||
abbr --add dkstdf "docker system df"
|
||||
abbr --add dkstevt "docker system events"
|
||||
abbr --add dkstif "docker system info"
|
||||
abbr --add dkstpn "docker system prune"
|
||||
|
||||
# Abbrevations for "docker swarm"
|
||||
abbr --add dksint "docker swarm init"
|
||||
abbr --add dkslv "docker swarm leave"
|
||||
|
||||
# Abbreviations for "docker context"
|
||||
abbr --add dkctca "docker context create"
|
||||
abbr --add dkctep "docker context export"
|
||||
abbr --add dkctip "docker context import"
|
||||
abbr --add dkctis "docker context inspect"
|
||||
abbr --add dkctls "docker context ls"
|
||||
abbr --add dkctrm "docker context rm"
|
||||
abbr --add dkcts "docker context show"
|
||||
abbr --add dkctud "docker context update"
|
||||
abbr --add dkctu "docker context use"
|
||||
|
||||
# Abbreviations for "docker network"
|
||||
abbr --add dknwce "docker network create"
|
||||
abbr --add dknwcn "docker network connect"
|
||||
abbr --add dknwdcn "docker network disconnect"
|
||||
abbr --add dknwis "docker network inspect"
|
||||
abbr --add dknwls "docker network ls"
|
||||
abbr --add dknwp "docker network prune"
|
||||
abbr --add dknwrm "docker network rm"
|
||||
|
||||
# Abbreviations for "docker plugin"
|
||||
abbr --add dkpgce "docker plugin create"
|
||||
abbr --add dkpgdsb "docker plugin disable"
|
||||
abbr --add dkpgenb "docker plugin enable"
|
||||
abbr --add dkpgis "docker plugin inspect"
|
||||
abbr --add dkpgit "docker plugin install"
|
||||
abbr --add dkpgls "docker plugin ls"
|
||||
abbr --add dkpgp "docker plugin push"
|
||||
abbr --add dkpgrm "docker plugin rm"
|
||||
abbr --add dkpgs "docker plugin set"
|
||||
abbr --add dkpgug "docker plugin upgrade"
|
||||
|
||||
# Abbreviations for "docker volume"
|
||||
abbr --add dkvlce "docker volume create"
|
||||
abbr --add dkvlis "docker volume inspect"
|
||||
abbr --add dkvlls "docker volume ls"
|
||||
abbr --add dkvlp "docker volume prune"
|
||||
abbr --add dkvlrm "docker volume rm"
|
||||
@@ -0,0 +1,7 @@
|
||||
# Path to Oh My Fish install.
|
||||
set -q XDG_DATA_HOME
|
||||
and set -gx OMF_PATH "$XDG_DATA_HOME/omf"
|
||||
or set -gx OMF_PATH "$HOME/.local/share/omf"
|
||||
|
||||
# Load Oh My Fish configuration.
|
||||
source $OMF_PATH/init.fish
|
||||
@@ -0,0 +1,64 @@
|
||||
if status is-interactive
|
||||
# Enable vi-mode
|
||||
fish_vi_key_bindings
|
||||
|
||||
# Set the editor to use vim
|
||||
set --export --global EDITOR nvim
|
||||
|
||||
# Add ruby in the global path for Neovim
|
||||
fish_add_path ~/.local/share/gem/ruby/3.0.0/bin
|
||||
|
||||
# Add Node.js binaries in the global path
|
||||
fish_add_path ~/.local/lib/node_modules/.bin
|
||||
|
||||
# Add local binary in the global path
|
||||
fish_add_path ~/.local/bin
|
||||
|
||||
# Add Go binary path to global path
|
||||
fish_add_path ~/go/bin
|
||||
|
||||
# configuration for Oh My Fish BobTheFish theme
|
||||
set -g theme_display_git yes
|
||||
set -g theme_display_git_dirty yes
|
||||
set -g theme_display_git_untracked yes
|
||||
set -g theme_display_git_ahead_verbose yes
|
||||
set -g theme_display_git_dirty_verbose yes
|
||||
set -g theme_display_git_stashed_verbose yes
|
||||
set -g theme_display_git_default_branch yes
|
||||
set -g theme_git_default_branches development master main
|
||||
set -g theme_git_worktree_support yes
|
||||
set -g theme_use_abbreviated_branch_name yes
|
||||
set -g theme_display_vagrant no
|
||||
set -g theme_display_docker_machine yes
|
||||
set -g theme_display_k8s_context yes
|
||||
set -g theme_display_hg yes
|
||||
set -g theme_display_virtualenv no
|
||||
set -g theme_display_nix no
|
||||
set -g theme_display_ruby no
|
||||
set -g theme_display_node yes
|
||||
set -g theme_display_user ssh
|
||||
set -g theme_display_hostname ssh
|
||||
set -g theme_display_vi yes
|
||||
set -g theme_display_date yes
|
||||
set -g theme_display_cmd_duration yes
|
||||
set -g theme_title_display_process yes
|
||||
set -g theme_title_display_path no
|
||||
set -g theme_title_display_user yes
|
||||
set -g theme_title_use_abbreviated_path no
|
||||
set -g theme_date_format "+%a %H:%M"
|
||||
set -g theme_date_timezone Europe/Paris
|
||||
set -g theme_avoid_ambiguous_glyphs yes
|
||||
set -g theme_powerline_fonts yes
|
||||
set -g theme_nerd_fonts yes
|
||||
set -g theme_show_exit_status yes
|
||||
set -g theme_display_jobs_verbose yes
|
||||
set -g default_user aminnairi
|
||||
set -g theme_color_scheme dark
|
||||
set -g fish_prompt_pwd_dir_length 0
|
||||
set -g theme_project_dir_length 1
|
||||
set -g theme_newline_cursor yes
|
||||
set -g theme_newline_prompt '$ '
|
||||
|
||||
# Run fastfetch on each fish startup
|
||||
fastfetch
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
function cat
|
||||
bat --style full --italic-text always --force-colorization --theme gruvbox-dark $argv
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
function ls
|
||||
eza --icons --long --classify --git --header --created --accessed --modified $argv
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
function pass
|
||||
passbolt get resource --id (passbolt list resource | fzf | cut -d " " -f 1) | grep Password | cut -d " " -f 2 | xclip -selection clipboard
|
||||
end
|
||||
@@ -0,0 +1,30 @@
|
||||
function privateinternetaccess
|
||||
# Store the folder's path leading to the *.ovpn files
|
||||
set openvpn_files_path "/etc/privateinternetaccess"
|
||||
|
||||
# If there are no openvpn configuration files available
|
||||
if not count $openvpn_files_path/* > /dev/null
|
||||
# Bail out and exit with an error
|
||||
echo "Error: no OpenVPN files found in $openvpn_files_path"
|
||||
return 1
|
||||
end
|
||||
|
||||
# Set the OpenVPN file name choosen by the user
|
||||
set selected_file (/usr/bin/ls $openvpn_files_path | fzf)
|
||||
|
||||
# Set the full path to the OpenVPN configuration file
|
||||
set selected_file_path $openvpn_files_path/$selected_file
|
||||
|
||||
# Prevent this script from running if the path is incorrect
|
||||
if not test -f $selected_file_path
|
||||
# Bail out and exit with an error
|
||||
echo "Error: Configuration file not found at $selected_file_path"
|
||||
return 2
|
||||
end
|
||||
|
||||
# Open a new OpenVPN tunnel without caching the credentials by providing the path to a configuration
|
||||
sudo openvpn --auth-nocache --config $selected_file_path
|
||||
|
||||
# Notification
|
||||
notify-send "OpenVPN" "Disconnected from OpenVPN"
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
function rm
|
||||
# Use GIO in order to move the file to trash instead of deleting it permanently
|
||||
/usr/bin/gio trash $argv
|
||||
end
|
||||
@@ -0,0 +1,12 @@
|
||||
function tmux
|
||||
if test (count $argv) -eq 0
|
||||
# Install Tmux plugins
|
||||
~/.tmux/plugins/tpm/bin/install_plugins
|
||||
|
||||
# Update Tmux plugins
|
||||
~/.tmux/plugins/tpm/bin/update_plugins all
|
||||
end
|
||||
|
||||
# Execute TMUX
|
||||
/usr/bin/tmux -u $argv
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
function vicd
|
||||
cd (vifm --choose-dir - $argv)
|
||||
end
|
||||
Reference in New Issue
Block a user