add some aliases for systemctl
This commit is contained in:
parent
e28e635a07
commit
ceea442d76
@ -89,6 +89,23 @@
|
|||||||
"latree" = "${pkgs.eza}/bin/eza -lahgTF --git";
|
"latree" = "${pkgs.eza}/bin/eza -lahgTF --git";
|
||||||
"t" = "${pkgs.translate-shell}/bin/trans";
|
"t" = "${pkgs.translate-shell}/bin/trans";
|
||||||
"steam-gamescope" = "gamescope -b --steam -- steam -pipewire-dmabuf";
|
"steam-gamescope" = "gamescope -b --steam -- steam -pipewire-dmabuf";
|
||||||
|
# systemctl
|
||||||
|
"ctl" = "systemctl";
|
||||||
|
"ctlsp" = "systemctl stop";
|
||||||
|
"ctlst" = "systemctl start";
|
||||||
|
"ctlrt" = "systemctl restart";
|
||||||
|
"ctls" = "systemctl status";
|
||||||
|
"ctlu" = "systemctl --user";
|
||||||
|
"ctlusp" = "systemctl --user stop";
|
||||||
|
"ctlust" = "systemctl --user start";
|
||||||
|
"ctlurt" = "systemctl --user restart";
|
||||||
|
"ctlus" = "systemctl --user status";
|
||||||
|
"ctlfailed" = "systemctl --failed --all";
|
||||||
|
"ctlrf" = "systemctl reset-failed";
|
||||||
|
"ctldrd" = "systemctl daemon-reload";
|
||||||
|
"j" = "journalctl";
|
||||||
|
"ju" = "journalctl -xe -u";
|
||||||
|
"juu" = "journalctl -xe --user-unit";
|
||||||
};
|
};
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
setopt HIST_IGNORE_SPACE
|
setopt HIST_IGNORE_SPACE
|
||||||
@ -106,9 +123,6 @@
|
|||||||
echo "opening $file" &&
|
echo "opening $file" &&
|
||||||
xdg-open "$file"
|
xdg-open "$file"
|
||||||
}
|
}
|
||||||
manix-fzf() {
|
|
||||||
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix
|
|
||||||
}
|
|
||||||
# zst 7z archive
|
# zst 7z archive
|
||||||
z7za() {
|
z7za() {
|
||||||
rm /tmp/7z-exclude.lst > /dev/null 2>&1 || true
|
rm /tmp/7z-exclude.lst > /dev/null 2>&1 || true
|
||||||
@ -145,9 +159,27 @@
|
|||||||
${pkgs.gh}/bin/gh api repos/$org/$repo/actions/runs/$run_id --method DELETE >/dev/null &
|
${pkgs.gh}/bin/gh api repos/$org/$repo/actions/runs/$run_id --method DELETE >/dev/null &
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
j() {
|
jl() {
|
||||||
journalctl -o json --output-fields=MESSAGE,PRIORITY,_PID,SYSLOG_IDENTIFIER,_SYSTEMD_UNIT "$@" | lnav
|
journalctl -o json --output-fields=MESSAGE,PRIORITY,_PID,SYSLOG_IDENTIFIER,_SYSTEMD_UNIT "$@" | lnav
|
||||||
}
|
}
|
||||||
|
# Start and then view status of service
|
||||||
|
ctlsts () {
|
||||||
|
systemctl start "$1"
|
||||||
|
systemctl status "$1"
|
||||||
|
}
|
||||||
|
ctlusts () {
|
||||||
|
systemctl --user start "$1"
|
||||||
|
systemctl --user status "$1"
|
||||||
|
}
|
||||||
|
# Restart and then view status of service
|
||||||
|
ctlrts () {
|
||||||
|
systemctl restart "$1"
|
||||||
|
systemctl status "$1"
|
||||||
|
}
|
||||||
|
ctlurts () {
|
||||||
|
systemctl --user restart "$1"
|
||||||
|
systemctl --user status "$1"
|
||||||
|
}
|
||||||
|
|
||||||
XDG_DATA_DIRS=$XDG_DATA_DIRS:$GSETTINGS_SCHEMAS_PATH
|
XDG_DATA_DIRS=$XDG_DATA_DIRS:$GSETTINGS_SCHEMAS_PATH
|
||||||
export XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share
|
export XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share
|
||||||
|
Loading…
x
Reference in New Issue
Block a user