diff --git a/.zshrc b/.zshrc index 25abc6b..70c3d21 100644 --- a/.zshrc +++ b/.zshrc @@ -160,6 +160,7 @@ __alias__() { # ─< easier dir up >──────────────────────────────────────────────────────────────────────── alias ..="cd .." + # ─< weather >────────────────────────────────────────────────────────────────────────────── alias www="curl wttr.in/Ulm" @@ -178,11 +179,19 @@ __alias__() { # ─< define copy command >──────────────────────────────────────────────────────────────── if command_exists wl-copy; then 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 copy() { - command cat "$1" | xclip -selection clipboard + if cat "$1"; then + command cat "$1" | wl-copy + else + "$1" | xclip -selection clipboard + fi } else echo_warning "No clipboard utility found. Please install wl-copy or xclip." @@ -197,6 +206,10 @@ __alias__() { alias starwars="telnet -a telehack.com" 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 >──────────────────────────────────────────────────────────────────────────────── if command_exists rsync; then alias scp="rsync -avP"