mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
adde battery and archlinux plugin
This commit is contained in:
parent
2e9492969b
commit
45e7a2fce4
3 changed files with 152 additions and 0 deletions
57
plugins/archlinux/archlinux.plugin.zsh
Normal file
57
plugins/archlinux/archlinux.plugin.zsh
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
##some functions
|
||||
###############
|
||||
##--Daemons--##
|
||||
###############
|
||||
# starts, stops, restarts and check status of daemons
|
||||
|
||||
dstart() {
|
||||
for arg in $@
|
||||
do
|
||||
sudo /etc/rc.d/$arg start
|
||||
done
|
||||
}
|
||||
dstop() {
|
||||
for arg in $@
|
||||
do
|
||||
sudo /etc/rc.d/$arg stop
|
||||
done
|
||||
}
|
||||
drestart() {
|
||||
for arg in $@
|
||||
do
|
||||
sudo /etc/rc.d/$arg restart
|
||||
done
|
||||
}
|
||||
dstatus() {
|
||||
for arg in $@
|
||||
do
|
||||
sudo /etc/rc.d/$arg status
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
###Alias
|
||||
## checks if pacman-color is installed
|
||||
## pcman var is needed because for some reason using pacman-color with sudo in an alias doesnt work
|
||||
if which pacman-color &>/dev/null; then
|
||||
pcman='pacman-color'
|
||||
else
|
||||
pcman='pacman'
|
||||
fi
|
||||
|
||||
alias pacman='$pcman'
|
||||
alias pacupd='_ $pcman -Syu' ##syncs and updates
|
||||
alias pacser='$pcman -Ss' ##search repos for pkgs
|
||||
alias pacins='_ $pcman -S' ##install pkgs
|
||||
alias pacinf='$pcman -Qi' ##info of installed pkgs
|
||||
alias paciss='$pcman -Qs' ##search installed pkgs
|
||||
alias pacrm='_ $pcman -R' ##uninstalls pkgs
|
||||
alias pacrmd='_ $pcman -Rs' ##remove a package and deps which are not required by any other installed package
|
||||
alias pacrma='_ $pcman -Rsn' ##remove a package and deps and .pacsave files
|
||||
alias pacclc='_ S $pcman -Scc' ## cleans pkgs cache and repos db
|
||||
##makepkg alias
|
||||
alias mksource='makepkg --source -f'
|
||||
alias mkp='makepkg -sf ;alert'
|
||||
alias mkpi='makepkg -sfi '
|
||||
alias mkall='makepkg -sf && makepkg --source -f '
|
||||
alias mkalli='makepkg -sfi && makepkg --source -f '
|
||||
Loading…
Add table
Add a link
Reference in a new issue