Reorganized fish shell configuration
This commit is contained in:
parent
e9b168e5b6
commit
eb27c29784
20 changed files with 390 additions and 193 deletions
|
@ -12,7 +12,7 @@ redshift/redshift .config/redshift.conf
|
|||
screen/screenrc .screenrc
|
||||
shells/bashrc .bashrc
|
||||
shells/zshrc .zshrc
|
||||
shells/fish/config.fish .config/fish/
|
||||
shells/fish/conf.d .config/fish/
|
||||
shells/fish/functions .config/fish/
|
||||
stumpwm/stumpwmrc .stumpwmrc
|
||||
x/xinitrc .xinitrc
|
||||
|
|
31
shells/fish/conf.d/abbr.fish
Normal file
31
shells/fish/conf.d/abbr.fish
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Copyright © 2019 Marcel Kapfer <opensource@mmk2410.org>
|
||||
# MIT License
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
# the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
# subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
# Fish Abbrevations
|
||||
# Those are expanded before execution
|
||||
# See: https://fishshell.com/docs/current/commands.html#abbr
|
||||
|
||||
if status --is-interactive
|
||||
abbr --add --global l ls
|
||||
abbr --add --global ping ping -c 3 mmk2410.org
|
||||
abbr --add --global pingtest ping -c 3 mmk2410.org
|
||||
abbr --add --global e eval $EDITOR
|
||||
abbr --add --global g git
|
||||
end
|
36
shells/fish/conf.d/alias.fish
Normal file
36
shells/fish/conf.d/alias.fish
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Copyright © 2019 Marcel Kapfer <opensource@mmk2410.org>
|
||||
# MIT License
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
# the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
# subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
if status --is-interactive
|
||||
alias grep='grep --color=auto'
|
||||
alias df='df -h'
|
||||
alias du='du -c -h'
|
||||
alias mkdir='mkdir -p -v'
|
||||
alias ln='ln -i'
|
||||
alias chown='chown --preserve-root'
|
||||
alias chmod='chmod --preserve-root'
|
||||
alias chgrp='chgrp --preserve-root'
|
||||
alias ps='ps aux k%cpu'
|
||||
alias q=' exit'
|
||||
alias Q=' exit'
|
||||
alias x=' exit'
|
||||
alias o='xdg-open'
|
||||
alias vim="nvim"
|
||||
end
|
37
shells/fish/conf.d/debian.fish
Normal file
37
shells/fish/conf.d/debian.fish
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Copyright © 2019 Marcel Kapfer <opensource@mmk2410.org>
|
||||
# MIT License
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
# the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
# subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
# Debian Packaging
|
||||
|
||||
# quilt
|
||||
alias dquilt="quilt --quiltrc=$HOME/.quiltrc-dpkg"
|
||||
|
||||
# Variables
|
||||
set -x DEBUILD_DPKG_BUILDPACKAGE_OPTS "-i -I -us -uc"
|
||||
set -x DEBUILD_LINTIAN_OPTS "-i -I --show-overrides"
|
||||
set -x DEBSIGN_KEYID "9FE01C39F74551D434116394CADE6F0C09F21B09"
|
||||
|
||||
if test -z $DEBFULLNAME
|
||||
set -Ux DEBFULLNAME "Marcel Kapfer"
|
||||
end
|
||||
|
||||
if test -z $DEBEMAIL
|
||||
set -Ux DEBEMAIL "opensource@mmk2410.org"
|
||||
end
|
25
shells/fish/conf.d/emacs.fish
Normal file
25
shells/fish/conf.d/emacs.fish
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Copyright © 2019 Marcel Kapfer <opensource@mmk2410.org>
|
||||
# MIT License
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
# the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
# subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
# Run zsh when using emacs
|
||||
# Current problem with fish seems to be the theme
|
||||
if test $TERM = "eterm-color"
|
||||
exec zsh
|
||||
end
|
48
shells/fish/conf.d/env.fish
Normal file
48
shells/fish/conf.d/env.fish
Normal file
|
@ -0,0 +1,48 @@
|
|||
# Copyright © 2019 Marcel Kapfer <opensource@mmk2410.org>
|
||||
# MIT License
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
# the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
# subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
set -x ARCHFLAGS -arch_x86_64
|
||||
|
||||
set -e GPG_TTY
|
||||
set -Ux GPG_TTY (tty)
|
||||
|
||||
if test -z $EDITOR
|
||||
set -Ux EDITOR es
|
||||
end
|
||||
|
||||
if test -z $VISUAL
|
||||
set -Ux VISUAL es
|
||||
end
|
||||
|
||||
if test -z $GIT_EDITOR
|
||||
set -Ux GIT_EDITOR es
|
||||
end
|
||||
|
||||
if test -z $GOPATH
|
||||
set -Ux GOPATH ~/.go
|
||||
end
|
||||
|
||||
if test -z $XDG_CURRENT_DESKTOP
|
||||
set -Ux XDG_CURRENT_DESKTOP GNOME
|
||||
end
|
||||
|
||||
if test -z $QT_STYLE_OVERRIDE
|
||||
set -Ux QT_STYLE_OVERRIDE kvantum
|
||||
end
|
25
shells/fish/conf.d/nix.fish
Normal file
25
shells/fish/conf.d/nix.fish
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Copyright © 2019 Marcel Kapfer <opensource@mmk2410.org>
|
||||
# MIT License
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
# the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
# subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
# Source the Nix profile, if it exists.
|
||||
set -l NIX_PROFILE $HOME/.nix-profile/etc/profile.d/nix.fish
|
||||
if test -e $NIX_PROFILE
|
||||
source $NIX_PROFILE
|
||||
end
|
70
shells/fish/conf.d/pure.fish
Normal file
70
shells/fish/conf.d/pure.fish
Normal file
|
@ -0,0 +1,70 @@
|
|||
set --universal pure_version 2.1.1 # used for bug report
|
||||
|
||||
# Base colors
|
||||
_pure_set_default pure_color_primary (set_color blue)
|
||||
_pure_set_default pure_color_info (set_color cyan)
|
||||
_pure_set_default pure_color_mute (set_color brblack)
|
||||
_pure_set_default pure_color_success (set_color magenta)
|
||||
_pure_set_default pure_color_normal (set_color normal)
|
||||
_pure_set_default pure_color_danger (set_color red)
|
||||
_pure_set_default pure_color_light (set_color white)
|
||||
_pure_set_default pure_color_warning (set_color yellow)
|
||||
_pure_set_default pure_color_dark (set_color black)
|
||||
|
||||
# Prompt
|
||||
_pure_set_default pure_symbol_prompt "❯"
|
||||
_pure_set_default pure_symbol_reverse_prompt "❮" # used for VI mode
|
||||
_pure_set_default pure_color_prompt_on_error $pure_color_danger
|
||||
_pure_set_default pure_color_prompt_on_success $pure_color_success
|
||||
|
||||
# Current Working Directory
|
||||
_pure_set_default pure_color_current_directory $pure_color_primary
|
||||
|
||||
# Git
|
||||
_pure_set_default pure_symbol_git_unpulled_commits "⇣"
|
||||
_pure_set_default pure_symbol_git_unpushed_commits "⇡"
|
||||
_pure_set_default pure_symbol_git_dirty "*"
|
||||
_pure_set_default pure_color_git_unpulled_commits $pure_color_info
|
||||
_pure_set_default pure_color_git_unpushed_commits $pure_color_info
|
||||
_pure_set_default pure_color_git_branch $pure_color_mute
|
||||
_pure_set_default pure_color_git_dirty $pure_color_mute
|
||||
|
||||
# SSH info
|
||||
_pure_set_default pure_color_ssh_hostname $pure_color_mute
|
||||
_pure_set_default pure_color_ssh_separator $pure_color_mute
|
||||
_pure_set_default pure_color_ssh_user_normal $pure_color_mute
|
||||
_pure_set_default pure_color_ssh_user_root $pure_color_light
|
||||
|
||||
# Virtualenv for Pyhon
|
||||
_pure_set_default pure_color_virtualenv $pure_color_mute
|
||||
# Deactivate the default virtualenv prompt so that we can add our own
|
||||
set --global --export VIRTUAL_ENV_DISABLE_PROMPT 1
|
||||
|
||||
# Print current working directory at the beginning of prompt
|
||||
# true (default): current directory, git, user@hostname (ssh-only), command duration
|
||||
# false: user@hostname (ssh-only), current directory, git, command duration
|
||||
_pure_set_default pure_begin_prompt_with_current_directory true
|
||||
|
||||
# Show exit code of last command as a separate prompt character (cf. https://github.com/sindresorhus/pure/wiki#show-exit-code-of-last-command-as-a-separate-prompt-character)
|
||||
# false - single prompt character, default
|
||||
# true - separate prompt character
|
||||
_pure_set_default pure_separate_prompt_on_error false
|
||||
|
||||
# Max execution time of a process before its run time is shown when it exits
|
||||
_pure_set_default pure_threshold_command_duration 5
|
||||
_pure_set_default pure_color_command_duration $pure_color_warning
|
||||
|
||||
# Right Prompt variables
|
||||
_pure_set_default pure_right_prompt ""
|
||||
_pure_set_default pure_color_right_prompt $pure_color_normal
|
||||
|
||||
# VI mode indicator
|
||||
# true (default): indicate a non-insert mode by reversing the prompt symbol (❮)
|
||||
# false: indicate vi mode with [I], [N], [V]
|
||||
_pure_set_default pure_reverse_prompt_symbol_in_vimode true
|
||||
|
||||
# Title
|
||||
_pure_set_default pure_symbol_title_bar_separator "—"
|
||||
|
||||
# Whether or not is a fresh session
|
||||
set --global _pure_fresh_session true
|
32
shells/fish/conf.d/x.fish
Normal file
32
shells/fish/conf.d/x.fish
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Copyright © 2019 Marcel Kapfer <opensource@mmk2410.org>
|
||||
# MIT License
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
# the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
# subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
# Automatically start X at login
|
||||
# source: https://wiki.archlinux.org/index.php/Fish#Start_X_at_login
|
||||
# This must be at the bottom of this file
|
||||
if status --is-login
|
||||
if test -z "$DISPLAY" -a $XDG_VTNR = 1
|
||||
# Unlock GPG keyring befor starting X.
|
||||
# This makes some things easier.
|
||||
echo "gpg unlock" | gpg -se -r me@mmk2410.org > /dev/null
|
||||
pulseaudio -D # start pulseaudio before X is started
|
||||
exec startx -- -keeptty
|
||||
end
|
||||
end
|
|
@ -1,135 +0,0 @@
|
|||
set -x ARCHFLAGS -arch_x86_64
|
||||
|
||||
set -e GPG_TTY
|
||||
set -Ux GPG_TTY (tty)
|
||||
|
||||
eval (thefuck --alias | tr '\n' ';')
|
||||
alias l="ls"
|
||||
alias diff='colordiff'
|
||||
alias grep='grep --color=auto'
|
||||
alias more='less'
|
||||
alias df='df -h'
|
||||
alias du='du -c -h'
|
||||
alias mkdir='mkdir -p -v'
|
||||
alias nano='nano -w'
|
||||
alias ping='ping -c 3'
|
||||
alias pingtest='ping -c 3 marcel-kapfer.de'
|
||||
alias dmesg='dmesg -HL'
|
||||
alias da='date "+%A, %B %d, %Y [%T]"'
|
||||
alias du1='du --max-depth=1'
|
||||
alias hist='history | grep' # requires an argument
|
||||
alias openports='ss --all --numeric --processes --ipv4 --ipv6'
|
||||
alias pgg='ps -Af | grep' # requires an argument
|
||||
alias ln='ln -i'
|
||||
alias chown='chown --preserve-root'
|
||||
alias chmod='chmod --preserve-root'
|
||||
alias chgrp='chgrp --preserve-root'
|
||||
alias cls=' echo -ne "\033c"'
|
||||
alias ps='ps aux k%cpu'
|
||||
alias new='touch'
|
||||
alias re='/sbin/reboot'
|
||||
alias off='/sbin/poweroff'
|
||||
alias vol='alsamixer'
|
||||
alias q=' exit'
|
||||
alias Q=' exit'
|
||||
alias x=' exit'
|
||||
alias cd..='cd ..'
|
||||
alias sbcl='rlwrap sbcl'
|
||||
alias o='xdg-open'
|
||||
alias nemo='nemo --no-desktop'
|
||||
|
||||
alias mmk2410='~/.mmk2410'
|
||||
|
||||
# Debian Packaging
|
||||
|
||||
# quilt
|
||||
alias dquilt="quilt --quiltrc=$HOME/.quiltrc-dpkg"
|
||||
|
||||
# Variables
|
||||
set -x DEBUILD_DPKG_BUILDPACKAGE_OPTS "-i -I -us -uc"
|
||||
set -x DEBUILD_LINTIAN_OPTS "-i -I --show-overrides"
|
||||
set -x DEBSIGN_KEYID "9FE01C39F74551D434116394CADE6F0C09F21B09"
|
||||
|
||||
# if [ -z $SSH_CLIENT ]
|
||||
# ~/.mmk2410
|
||||
# end
|
||||
|
||||
if [ -z $EDITOR ]
|
||||
set -Ux EDITOR es
|
||||
end
|
||||
|
||||
if [ -z $VISUAL ]
|
||||
set -Ux VISUAL es
|
||||
end
|
||||
|
||||
if [ -z $GIT_EDITOR ]
|
||||
set -Ux GIT_EDITOR es
|
||||
end
|
||||
|
||||
if [ -z $GOPATH ]
|
||||
set -Ux GOPATH ~/.go
|
||||
end
|
||||
|
||||
if test -z $DEBFULLNAME
|
||||
set -Ux DEBFULLNAME "Marcel Kapfer"
|
||||
end
|
||||
|
||||
if test -z $DEBEMAIL
|
||||
set -Ux DEBEMAIL "opensource@mmk2410.org"
|
||||
end
|
||||
|
||||
if test -z $XDG_CURRENT_DESKTOP
|
||||
set -Ux XDG_CURRENT_DESKTOP GNOME
|
||||
end
|
||||
|
||||
if test -z $QT_STYLE_OVERRIDE
|
||||
set -Ux QT_STYLE_OVERRIDE kvantum
|
||||
end
|
||||
|
||||
# Attach the autoscreen screen session if StumpWM is running
|
||||
# and it's not already in use.
|
||||
# if test \( -n $DESKTOP_SESSION \) -a \( $DESKTOP_SESSION = "stumpwm" \)
|
||||
# if screen -list | grep -q "No Sockets"
|
||||
# screen -dmS autoscreen
|
||||
# exec screen -r
|
||||
# else if screen -list | grep -Eq "\.autoscreen.*Detached"
|
||||
# exec screen -r
|
||||
# end
|
||||
# end
|
||||
|
||||
# gpg-agent as SSH agent
|
||||
# set -e SSH_AGENT_PID
|
||||
# set -e SSH_AUTH_SOCK
|
||||
# if test -z $gnupg_SSH_AUTH_SOCK_by
|
||||
# set gnupg_SSH_AUTH_SOCK_by 0
|
||||
# end
|
||||
# if test $gnupg_SSH_AUTH_SOCK_by -ne %self
|
||||
# set UID (id -u)
|
||||
# set -Ux SSH_AUTH_SOCK "/run/user/$UID/gnupg/S.gpg-agent.ssh"
|
||||
# end
|
||||
# gpg-connect-agent updatestartuptty /bye > /dev/null
|
||||
|
||||
# Source the Nix profile, if it exists.
|
||||
set -l NIX_PROFILE $HOME/.nix-profile/etc/profile.d/nix.fish
|
||||
if test -e $NIX_PROFILE
|
||||
source $NIX_PROFILE
|
||||
end
|
||||
|
||||
# Run zsh when using emacs
|
||||
# Current problem with fish seems to be the theme
|
||||
if test $TERM = "eterm-color"
|
||||
exec zsh
|
||||
end
|
||||
|
||||
# Automatically start X at login
|
||||
# source: https://wiki.archlinux.org/index.php/Fish#Start_X_at_login
|
||||
# This must be at the bottom of this file
|
||||
if status --is-login
|
||||
if test -z "$DISPLAY" -a $XDG_VTNR = 1
|
||||
# Unlock GPG keyring befor starting X.
|
||||
# This makes some things easier.
|
||||
echo "gpg unlock" | gpg -se -r me@mmk2410.org > /dev/null
|
||||
pulseaudio -D # start pulseaudio before X is started
|
||||
exec startx -- -keeptty
|
||||
end
|
||||
end
|
10
shells/fish/functions/.gitignore
vendored
10
shells/fish/functions/.gitignore
vendored
|
@ -22,3 +22,13 @@ set_color_custom.fish
|
|||
vcs.name.fish
|
||||
vcs.present.fish
|
||||
fisher.fish
|
||||
fin.fish
|
||||
fish_greeting.fish
|
||||
fish_mode_prompt.fish
|
||||
host_info.fish
|
||||
last_job_id.fish
|
||||
pwd_info.fish
|
||||
pwd_is_home.fish
|
||||
_*
|
||||
fish_prompt.fish
|
||||
fish_title.fish
|
||||
|
|
|
@ -1,4 +1,24 @@
|
|||
function cdl
|
||||
# Copyright © 2019 Marcel Kapfer <opensource@mmk2410.org>
|
||||
# MIT License
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
# the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
# subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
function cdl --wraps cd --description "Switch directory and show content"
|
||||
cd $argv
|
||||
l
|
||||
end
|
||||
|
|
27
shells/fish/functions/diff.fish
Normal file
27
shells/fish/functions/diff.fish
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Copyright © 2019 Marcel Kapfer <opensource@mmk2410.org>
|
||||
# MIT License
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
# the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
# subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
function diff --wraps diff --description "Use colordiff instead of diff, if available"
|
||||
if type -q colordiff
|
||||
colordiff $argv
|
||||
else
|
||||
diff $argv
|
||||
end
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
/home/marcel/.config/fisherman/eco/functions/fish_prompt.fish
|
|
@ -1,12 +0,0 @@
|
|||
# Defined in /tmp/fish.au862c/fish_title.fish @ line 2
|
||||
function fish_title
|
||||
if test -z $EMACS
|
||||
if test $_ = 'fish'
|
||||
echo (prompt_pwd)
|
||||
else
|
||||
echo $_
|
||||
end
|
||||
else
|
||||
true
|
||||
end
|
||||
end
|
|
@ -1,27 +0,0 @@
|
|||
function g
|
||||
git $argv
|
||||
end
|
||||
|
||||
function gst
|
||||
git status $argv
|
||||
end
|
||||
|
||||
function gcom
|
||||
git commit $argv
|
||||
end
|
||||
|
||||
function gad
|
||||
git add $argv
|
||||
end
|
||||
|
||||
function gup
|
||||
git push $argv
|
||||
end
|
||||
|
||||
function gdo
|
||||
git pull $argv
|
||||
end
|
||||
|
||||
function gdif
|
||||
git diff $argv
|
||||
end
|
|
@ -1,5 +0,0 @@
|
|||
function haha
|
||||
for x in (seq 10)
|
||||
echo hahahahahahahahahahahahahahahahahaha
|
||||
end
|
||||
end
|
27
shells/fish/functions/sbcl.fish
Normal file
27
shells/fish/functions/sbcl.fish
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Copyright © 2019 Marcel Kapfer <opensource@mmk2410.org>
|
||||
# MIT License
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
# the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
# subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
function sbcl --wraps sbcl --description "Wrap SBCL with rlwrap (readline support)"
|
||||
if type -q rlwrap
|
||||
rlwrap sbcl $argv
|
||||
else
|
||||
sbcl $argv
|
||||
end
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
function upgrade --description "Upgrade the system"
|
||||
sudo apt update
|
||||
and sudo apt upgrade
|
||||
and sudo apt full-upgrade
|
||||
and sudo apt autoremove
|
||||
sudo tlmgr update --self --all
|
||||
sudo npm update -g
|
||||
end
|
|
@ -1,3 +0,0 @@
|
|||
function vim
|
||||
nvim $argv
|
||||
end
|
Loading…
Reference in a new issue