X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;f=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fsystemd%2Fsystemd.plugin.zsh;fp=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fsystemd%2Fsystemd.plugin.zsh;h=0000000000000000000000000000000000000000;hb=1a8e170bbe5c6641a26ab1ce2e6ce6c5c1faa4cd;hp=7afd2be58ebdc2b6a8bdbc934d8c0dd470ef0d7b;hpb=475ba35502579302593f4735c853c49ef1845dcb;p=dotfiles.git diff --git a/stow/oh-my-zsh/.oh-my-zsh/plugins/systemd/systemd.plugin.zsh b/stow/oh-my-zsh/.oh-my-zsh/plugins/systemd/systemd.plugin.zsh deleted file mode 100644 index 7afd2be..0000000 --- a/stow/oh-my-zsh/.oh-my-zsh/plugins/systemd/systemd.plugin.zsh +++ /dev/null @@ -1,116 +0,0 @@ -# systemctl aliases -user_commands=( - cat - get-default - help - is-active - is-enabled - is-failed - is-system-running - list-dependencies - list-jobs - list-sockets - list-timers - list-unit-files - list-units - show - show-environment - status -) - -sudo_commands=( - add-requires - add-wants - cancel - daemon-reexec - daemon-reload - default - disable - edit - emergency - enable - halt - import-environment - isolate - kexec - kill - link - list-machines - load - mask - preset - preset-all - reenable - reload - reload-or-restart - reset-failed - rescue - restart - revert - set-default - set-environment - set-property - start - stop - switch-root - try-reload-or-restart - try-restart - unmask - unset-environment -) - -power_commands=( - hibernate - hybrid-sleep - poweroff - reboot - suspend -) - -for c in $user_commands; do - alias "sc-$c"="systemctl $c" - alias "scu-$c"="systemctl --user $c" -done - -for c in $sudo_commands; do - alias "sc-$c"="sudo systemctl $c" - alias "scu-$c"="systemctl --user $c" -done - -for c in $power_commands; do - alias "sc-$c"="systemctl $c" -done - -unset c user_commands sudo_commands power_commands - - -# --now commands -alias sc-enable-now="sc-enable --now" -alias sc-disable-now="sc-disable --now" -alias sc-mask-now="sc-mask --now" - -alias scu-enable-now="scu-enable --now" -alias scu-disable-now="scu-disable --now" -alias scu-mask-now="scu-mask --now" - - -function systemd_prompt_info { - local unit - for unit in "$@"; do - echo -n "$ZSH_THEME_SYSTEMD_PROMPT_PREFIX" - - if [[ -n "$ZSH_THEME_SYSTEMD_PROMPT_CAPS" ]]; then - echo -n "${(U)unit:gs/%/%%}:" - else - echo -n "${unit:gs/%/%%}:" - fi - - if systemctl is-active "$unit" &>/dev/null; then - echo -n "$ZSH_THEME_SYSTEMD_PROMPT_ACTIVE" - else - echo -n "$ZSH_THEME_SYSTEMD_PROMPT_NOTACTIVE" - fi - - echo -n "$ZSH_THEME_SYSTEMD_PROMPT_SUFFIX" - done -}