dotfiles/shells/fish/config.fish

136 lines
3.2 KiB
Fish
Raw Normal View History

2016-04-21 22:38:34 +02:00
set -x ARCHFLAGS -arch_x86_64
2017-09-20 19:53:49 +02:00
set -e GPG_TTY
set -Ux GPG_TTY (tty)
2016-04-21 22:38:34 +02:00
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'
2017-01-23 08:30:30 +01:00
alias re='/sbin/reboot'
alias off='/sbin/poweroff'
2016-04-21 22:38:34 +02:00
alias vol='alsamixer'
alias q=' exit'
alias Q=' exit'
alias x=' exit'
alias cd..='cd ..'
2017-05-20 20:23:14 +02:00
alias sbcl='rlwrap sbcl'
2017-07-31 17:56:27 +02:00
alias o='xdg-open'
alias nemo='nemo --no-desktop'
2018-03-09 12:19:47 +01:00
2016-12-14 09:45:28 +01:00
alias mmk2410='~/.mmk2410'
2018-03-09 12:19:47 +01:00
# 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"
2017-08-10 09:36:44 +02:00
# if [ -z $SSH_CLIENT ]
# ~/.mmk2410
# end
2016-11-23 09:21:54 +01:00
if [ -z $EDITOR ]
2018-03-09 12:19:35 +01:00
set -Ux EDITOR es
2016-11-23 09:21:54 +01:00
end
if [ -z $VISUAL ]
2018-03-09 12:19:35 +01:00
set -Ux VISUAL es
2016-07-16 21:31:43 +02:00
end
2016-04-21 22:38:34 +02:00
2017-01-23 08:30:30 +01:00
if [ -z $GIT_EDITOR ]
2018-03-09 12:19:35 +01:00
set -Ux GIT_EDITOR es
2017-01-23 08:30:30 +01:00
end
2016-12-14 09:45:28 +01:00
if [ -z $GOPATH ]
2018-03-09 12:19:35 +01:00
set -Ux GOPATH ~/.go
2016-12-14 09:45:28 +01:00
end
2017-08-10 09:37:04 +02:00
if test -z $DEBFULLNAME
2018-03-09 12:19:35 +01:00
set -Ux DEBFULLNAME "Marcel Kapfer"
end
if test -z $DEBEMAIL
2018-03-09 12:19:35 +01:00
set -Ux DEBEMAIL "opensource@mmk2410.org"
end
if test -z $XDG_CURRENT_DESKTOP
set -Ux XDG_CURRENT_DESKTOP GNOME
end
2018-03-09 12:18:20 +01:00
if test -z $QT_STYLE_OVERRIDE
2018-05-13 16:15:21 +02:00
set -Ux QT_STYLE_OVERRIDE kvantum
2018-03-09 12:18:20 +01:00
end
2017-08-10 09:37:04 +02:00
# 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
2017-09-19 16:05:30 +02:00
2017-09-20 19:53:49 +02:00
# gpg-agent as SSH agent
2018-05-13 16:14:53 +02:00
# 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
2017-09-20 19:53:49 +02:00
2018-02-23 10:04:38 +01:00
# Source the Nix profile, if it exists.
set -l NIX_PROFILE $HOME/.nix-profile/etc/profile.d/nix.fish
if test -e $NIX_PROFILE
2018-03-09 12:19:35 +01:00
source $NIX_PROFILE
2018-02-23 10:04:38 +01:00
end
# Run zsh when using emacs
# Current problem with fish seems to be the theme
if test $TERM = "eterm-color"
exec zsh
end
2017-09-19 16:05:30 +02:00
# Automatically start X at login
# source: https://wiki.archlinux.org/index.php/Fish#Start_X_at_login
2017-09-20 19:53:49 +02:00
# This must be at the bottom of this file
2017-09-19 16:05:30 +02:00
if status --is-login
2018-03-09 12:19:35 +01:00
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
2018-05-13 16:15:06 +02:00
pulseaudio -D # start pulseaudio before X is started
2018-03-09 12:19:35 +01:00
exec startx -- -keeptty
end
2017-09-19 16:05:30 +02:00
end