add user@host to i3blocks
This commit is contained in:
parent
c5cd1726dd
commit
6ed951778b
@ -55,6 +55,10 @@ signal=2
|
|||||||
command=i3blocks_helper language
|
command=i3blocks_helper language
|
||||||
signal=1
|
signal=1
|
||||||
|
|
||||||
|
[userhost]
|
||||||
|
command=i3blocks_helper userhost
|
||||||
|
signal=1
|
||||||
|
|
||||||
[time]
|
[time]
|
||||||
command=i3blocks_helper time
|
command=i3blocks_helper time
|
||||||
interval=30
|
interval=30
|
||||||
|
|||||||
@ -107,6 +107,10 @@ cmd_language() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cmd_userhost() {
|
||||||
|
printf "%s@%s\n" "${USER}" "${HOST:-${HOSTNAME:-}}"
|
||||||
|
}
|
||||||
|
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
wireless) shift; cmd_wireless "$@" ;;
|
wireless) shift; cmd_wireless "$@" ;;
|
||||||
ethernet) shift; cmd_ethernet "$@" ;;
|
ethernet) shift; cmd_ethernet "$@" ;;
|
||||||
@ -121,6 +125,7 @@ case "${1}" in
|
|||||||
pomodoro) shift; cmd_pomodoro "$@" ;;
|
pomodoro) shift; cmd_pomodoro "$@" ;;
|
||||||
bluetooth_battery) shift; cmd_bluetooth_battery "$@" ;;
|
bluetooth_battery) shift; cmd_bluetooth_battery "$@" ;;
|
||||||
language) shift; cmd_language "$@" ;;
|
language) shift; cmd_language "$@" ;;
|
||||||
|
userhost) shift; cmd_userhost "$@" ;;
|
||||||
|
|
||||||
*) exit "${EXIT_FAILURE}" ;;
|
*) exit "${EXIT_FAILURE}" ;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user