feat: maybe fixed copy, and addet for loop for cpu identification with hyprpanel
This commit is contained in:
parent
c653009ae3
commit
0e699d4fda
1 changed files with 15 additions and 2 deletions
17
.zshrc
17
.zshrc
|
@ -160,6 +160,7 @@ __alias__() {
|
||||||
|
|
||||||
# ─< easier dir up >────────────────────────────────────────────────────────────────────────
|
# ─< easier dir up >────────────────────────────────────────────────────────────────────────
|
||||||
alias ..="cd .."
|
alias ..="cd .."
|
||||||
|
|
||||||
# ─< weather >──────────────────────────────────────────────────────────────────────────────
|
# ─< weather >──────────────────────────────────────────────────────────────────────────────
|
||||||
alias www="curl wttr.in/Ulm"
|
alias www="curl wttr.in/Ulm"
|
||||||
|
|
||||||
|
@ -178,11 +179,19 @@ __alias__() {
|
||||||
# ─< define copy command >────────────────────────────────────────────────────────────────
|
# ─< define copy command >────────────────────────────────────────────────────────────────
|
||||||
if command_exists wl-copy; then
|
if command_exists wl-copy; then
|
||||||
copy() {
|
copy() {
|
||||||
command cat "$1" | wl-copy
|
if cat "$1"; then
|
||||||
|
command cat "$1" | wl-copy
|
||||||
|
else
|
||||||
|
"$1" | wl-copy
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
elif command_exists xclip; then
|
elif command_exists xclip; then
|
||||||
copy() {
|
copy() {
|
||||||
command cat "$1" | xclip -selection clipboard
|
if cat "$1"; then
|
||||||
|
command cat "$1" | wl-copy
|
||||||
|
else
|
||||||
|
"$1" | xclip -selection clipboard
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
echo_warning "No clipboard utility found. Please install wl-copy or xclip."
|
echo_warning "No clipboard utility found. Please install wl-copy or xclip."
|
||||||
|
@ -197,6 +206,10 @@ __alias__() {
|
||||||
alias starwars="telnet -a telehack.com"
|
alias starwars="telnet -a telehack.com"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if command_exists hyprpanel; then
|
||||||
|
alias get_cpu="for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done"
|
||||||
|
fi
|
||||||
|
|
||||||
# ─< rsync >────────────────────────────────────────────────────────────────────────────────
|
# ─< rsync >────────────────────────────────────────────────────────────────────────────────
|
||||||
if command_exists rsync; then
|
if command_exists rsync; then
|
||||||
alias scp="rsync -avP"
|
alias scp="rsync -avP"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue