1
Fork 0
mirror of https://github.com/Steffo99/config-fish.git synced 2024-12-22 23:04:22 +00:00

Update to the current version

This commit is contained in:
Steffo 2021-07-14 22:54:12 +02:00
parent ba994288b9
commit dcbb5b8f1f
Signed by: steffo
GPG key ID: 6965406171929D01
19 changed files with 90 additions and 101 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/fish_variables

View file

@ -1,3 +1,18 @@
# Color scheme
set -U "fish_color_normal" "normal"
set -U "fish_color_command" "bryellow"
set -U "fish_color_keyword" "yellow"
set -U "fish_color_quote" "brgreen"
set -U "fish_color_redirection" "cyan"
set -U "fish_color_end" "brmagenta"
set -U "fish_color_error" "red"
set -U "fish_color_param" "brwhite"
set -U "fish_color_comment" "brblack"
set -U "fish_color_selection" "white"
set -U "fish_color_operator" "cyan"
set -U "fish_color_escape" "green"
set -U "fish_color_autosuggestion" "brblack"
set -U "fish_color_cancel" "white" "--background=brred"
# Created by `userpath` on 2020-10-08 17:06:33 # Greeting
set PATH $PATH /mnt/tera/ext4/data/local/bin set -U "fish_greeting" ""

View file

@ -1,37 +0,0 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR BROWSER:firefox\x2ddeveloper\x2dedition
SETUVAR --path PATH:/usr/local/sbin\x1e/usr/local/bin\x1e/usr/bin\x1e/usr/lib/jvm/default/bin\x1e/usr/bin/site_perl\x1e/usr/bin/vendor_perl\x1e/usr/bin/core_perl\x1e/home/steffo/\x2ebin/
SETUVAR __fish_initialized:3100
SETUVAR _fisher_jorgebucaran_2F_fisher_files:/home/steffo/\x2econfig/fish/functions/fisher\x2efish\x1e/home/steffo/\x2econfig/fish/completions/fisher\x2efish
SETUVAR _fisher_plugins:jorgebucaran/fisher
SETUVAR fish_color_autosuggestion:3a3a3a
SETUVAR fish_color_cancel:normal
SETUVAR fish_color_command:ffff00
SETUVAR fish_color_comment:808080
SETUVAR fish_color_cwd:008000
SETUVAR fish_color_cwd_root:800000
SETUVAR fish_color_end:ff5f00
SETUVAR fish_color_error:ff0000
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:normal
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_match:normal
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_param:ffffd7
SETUVAR fish_color_quote:00d700
SETUVAR fish_color_redirection:00ffd7
SETUVAR fish_color_search_match:ffff00
SETUVAR fish_color_selection:c0c0c0
SETUVAR fish_color_status:red
SETUVAR fish_color_user:00ff00
SETUVAR fish_color_valid_path:normal
SETUVAR fish_greeting:\x1d
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_user_paths:/home/steffo/\x2ebin/

View file

@ -1,4 +0,0 @@
# Defined in - @ line 1
function 3dscia --wraps='3dsconv --boot9=/mnt/tera/ext4/games/emulation/3ds/firmware/CEM10206672_boot9_00.bin' --description 'alias 3dscia 3dsconv --boot9=/mnt/tera/ext4/games/emulation/3ds/firmware/CEM10206672_boot9_00.bin'
3dsconv --boot9=/mnt/tera/ext4/games/emulation/3ds/firmware/CEM10206672_boot9_00.bin $argv;
end

View file

@ -1,4 +0,0 @@
# Defined in - @ line 1
function ampache-localplay-vlc --wraps='vlc -I qt --extraintf http --http-port 40000' --description 'alias ampache-localplay-vlc=vlc -I qt --extraintf http --http-port 40000'
vlc -I qt --extraintf http --http-port 40000 $argv;
end

View file

@ -1,4 +1,3 @@
# Defined in - @ line 1
function cls --wraps=clear --description 'alias cls clear' function cls --wraps=clear --description 'alias cls clear'
clear $argv; clear $argv;
end end

View file

@ -1,34 +1,80 @@
function fish_prompt function fish_prompt
# Save variables before they are gone
set "STATUS" $status set "STATUS" $status
set 'UID' (id -u) set "UID" (id -u)
# User name
if test "$UID" -eq 0 if test "$UID" -eq 0
# Root
set_color brred set_color brred
else if test "$UID" -lt 1000 else if test "$UID" -lt 1000
# System account
set_color brpurple set_color brpurple
else if test "$UID" -ge 60000 else if test "$UID" -ge 60000
# Temporary account
set_color brcyan set_color brcyan
else else
set_color green # Regular user
set_color brgreen
end end
echo -n "$USER" echo -n "$USER"
set_color normal
echo -n "@"(prompt_hostname)":"
set_color brblue # Jobs
set "JOBSCOUNT" (jobs | count)
if test $JOBSCOUNT -ge 1
set_color brmagenta
echo -n "&$JOBSCOUNT"
end
# @
set_color normal
echo -n "@"
# Hostname
if test -z $SSH_CLIENT
set_color green
else
set_color cyan
end
echo -n (prompt_hostname)
# :
set_color normal
echo -n ":"
# Current working directory
if not test -x .
set_color brblack
else if not test -r .
set_color white
else if not test -w .
set_color yellow
else
set_color brblue
end
echo -n (prompt_pwd) echo -n (prompt_pwd)
# Exit status
if test $STATUS -ne 0 if test $STATUS -ne 0
set_color brred set_color brred
echo -n "$STATUS " echo -n "[$STATUS]"
end
set_color normal
# Dollar
set_color --bold white
if test "$UID" -eq 0
echo -n "# "
else else
set_color normal echo -n "\$ "
if test "$UID" -eq 0
echo -n "# "
else
echo -n "\$ "
end
end end
set_color normal set_color normal
end end

View file

@ -1,6 +1,6 @@
function fisher --argument-names cmd --description "A plugin manager for Fish" function fisher --argument-names cmd --description "A plugin manager for Fish"
set --query fisher_path || set --local fisher_path $__fish_config_dir set --query fisher_path || set --local fisher_path $__fish_config_dir
set --local fisher_version 4.2.0 set --local fisher_version 4.3.0
set --local fish_plugins $__fish_config_dir/fish_plugins set --local fish_plugins $__fish_config_dir/fish_plugins
switch "$cmd" switch "$cmd"
@ -86,7 +86,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
echo Fetching (set_color --underline)\$url(set_color normal) echo Fetching (set_color --underline)\$url(set_color normal)
if curl --silent \$url | tar --extract --gzip --directory \$temp --file - 2>/dev/null if curl --silent \$url | tar -xzC \$temp -f - 2>/dev/null
command cp -Rf \$temp/*/* $source command cp -Rf \$temp/*/* $source
else else
echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2 echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
@ -95,10 +95,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
command rm -rf \$temp command rm -rf \$temp
end end
set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files || exit set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files
echo \"fisher: Plugin not supported: \\\"$plugin\\\"\" >&2
echo (set_color --bold red)\"Support for .fish files outside a functions directory is deprecated\" (set_color --underline)https://github.com/jorgebucaran/fisher/issues/651(set_color normal) >&2
" & " &
set --append pid_list (jobs --last --pid) set --append pid_list (jobs --last --pid)

View file

@ -1,4 +1,3 @@
# Defined in - @ line 1
function idea --wraps='idea -e -w' --description 'alias idea idea -e -w' function idea --wraps='idea -e -w' --description 'alias idea idea -e -w'
command idea -e -w $argv; command idea -e -w $argv;
end end

View file

@ -1,4 +1,4 @@
# Defined in - @ line 1 # Defined in - @ line 1
function ll --wraps='ls -al' --description 'alias ll=ls -al' function ll --wraps='ls -al' --description 'alias ll=ls -al'
ls -al $argv; ls -al $argv;
end end

View file

@ -1,4 +0,0 @@
function osu-latency-fix
pactl unload-module 7
pactl load-module module-alsa-card device_id=1 name=usb-0d8c_USB_Sound_Device-00-Device card_name=alsa_card.usb-0d8c_USB_Sound_Device-00-Device namereg_fail=false tsched=no fixed_latency_range=yes ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1" fragments=1 fragment_size=15
end

View file

@ -1,3 +0,0 @@
function proton
~/.steam/steam/steamapps/common/Proton\ 5.0/dist/bin/wine64 $argv
end

View file

@ -1,3 +0,0 @@
function resolvify
ffmpeg -i "$argv[1]" -vcodec dnxhd -b:v 36M -acodec pcm_s16le -f mov "$argv[1].dnxhd.mov"
end

View file

@ -1,4 +0,0 @@
# Defined in - @ line 1
function restart-royalnet --wraps='ssh combo.steffo.eu sudo systemctl restart bot-royalnet' --description 'alias restart-royalnet ssh combo.steffo.eu sudo systemctl restart bot-royalnet'
ssh combo.steffo.eu sudo systemctl restart bot-royalnet $argv;
end

View file

@ -1,6 +0,0 @@
function stripbase
for file in *
set truename (string split -m1 " " "$file")[2]
mv "$file" "$truename"
end
end

View file

@ -1,5 +1,9 @@
function svim --wraps='sudo -u (stat -c "%U" $1) vim $1' --description 'alias svim sudo -u (stat -c "%U" $1) vim $1' function svim --wraps='sudo -u (stat -c "%U" $1) vim $1' --description 'alias svim sudo -u (stat -c "%U" $1) vim $1'
set -l owner (stat -c "%U" $argv[1]) set -l owner (stat -c "%U" $argv[1])
echo "File owner: $owner" set_color white
echo -n "File owner: "
set_color --bold brwhite
echo $owner
set_color normal
sudo -u $owner vim $argv sudo -u $owner vim $argv
end end

View file

@ -1,5 +1,5 @@
function winfix function winfix
sudo umount /dev/sda2 sudo umount /dev/sdc2
sudo ntfsfix -d /dev/sda2 sudo ntfsfix -d /dev/sdc2
sudo mount -a sudo mount -a
end end

View file

@ -1,3 +0,0 @@
function yay-update-all --wraps='yay --needed --overwrite "*" --answerclean None --answerdiff None --answeredit None --answerupgrade None --sudoloop --noconfirm' --wraps='yay --overwrite "*" --answerclean None --answerdiff None --answeredit None --answerupgrade None --sudoloop --noconfirm' --description 'alias yay yay --needed --overwrite "*" --answerclean None --answerdiff None --answeredit None --answerupgrade None --sudoloop --noconfirm'
command yay -Syu --needed --overwrite "*" --answerclean None --answerdiff None --answeredit None --answerupgrade None --sudoloop --noconfirm $argv
end

View file

@ -1,4 +0,0 @@
# Defined in - @ line 1
function ytdl-unimore --wraps='youtube-dl --cookies ~/.cookies.Unimore.txt' --description 'alias ytdl-unimore youtube-dl --cookies ~/.cookies.Unimore.txt'
youtube-dl --cookies ~/.cookies.Unimore.txt $argv;
end