dotfiles/hyprland/scripts/launch_waybar.sh

28 lines
775 B
Bash
Raw Normal View History

2023-08-18 19:38:09 +02:00
#!/bin/bash
getDisplay () {
local DESK
2023-11-27 23:31:36 +01:00
# DOCK
2023-08-18 19:38:09 +02:00
DESK="$(~/.config/hypr/scripts/displaybyname.sh Samsung Electric Company S34J55x H4LT100404)"
[[ -n "$DESK" ]] && echo $DESK && return
2023-11-27 23:31:36 +01:00
# FSI
DESK="$(~/.config/hypr/scripts/displaybyname.sh LG Electronics 24EB23 609NTFAF4483)"
[[ -n "$DESK" ]] && echo $DESK && return
# Technofabrik
DESK="$(~/.config/hypr/scripts/displaybyname.sh Dell Inc. DELL U2713HM GK0KD27S476L)"
[[ -n "$DESK" ]] && echo $DESK && return
# Fallback
2023-08-18 19:38:09 +02:00
echo "eDP-1"
}
if [[ -z "$PRIMARY_DISPLAY" ]]; then
PRIMARY_DISPLAY="$(getDisplay)"
fi
export PRIMARY_DISPLAY
envsubst < ~/.config/waybar/config > /tmp/waybar
pkill waybar
2023-11-27 23:31:36 +01:00
waybar -c /tmp/waybar $@ &!