57 lines
1.4 KiB
Fish
Executable File
57 lines
1.4 KiB
Fish
Executable File
# Put system-wide fish configuration entries here
|
|
# or in .fish files in conf.d/
|
|
# Files in conf.d can be overridden by the user
|
|
# by files with the same name in $XDG_CONFIG_HOME/fish/conf.d
|
|
|
|
# This file is run by all fish instances.
|
|
# To include configuration only for login shells, use
|
|
# if status is-login
|
|
# ...
|
|
# end
|
|
# To include configuration only for interactive shells, use
|
|
# if status is-interactive
|
|
# ...
|
|
# end
|
|
|
|
set fish_greeting ''
|
|
|
|
## Aliases ##
|
|
alias l='ls -la'
|
|
alias dotgit='git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'
|
|
|
|
alias syslog="sudo journalctl -f | ccze -A"
|
|
function journal -w 'systemctl status'
|
|
if test (count $argv) -eq 0
|
|
journalctl -f | ccze -A
|
|
else if test (count $argv) -eq 1
|
|
and [ "$argv[1]" != "--all" ]
|
|
journalctl -f -u $argv | ccze -A
|
|
else
|
|
tmux new-session -d 'journal'
|
|
|
|
if [ "$argv[1]" = "--all" ]
|
|
set services (cat /.motd.services)
|
|
else
|
|
set services $argv
|
|
end
|
|
|
|
set firstService $services[1]
|
|
tmux send-keys "journal $firstService" C-m
|
|
for i in (seq 2 (count $services))
|
|
set service $services[$i]
|
|
tmux split-window -v "journal $service"
|
|
end
|
|
tmux select-layout tiled
|
|
tmux attach
|
|
end
|
|
end
|
|
|
|
alias nano=micro
|
|
set -x EDITOR micro
|
|
set -x VISUAL $EDITOR
|
|
|
|
## Motd ##
|
|
if status is-login
|
|
/motd.sh
|
|
end
|