Add Hyprland stuff
This commit is contained in:
@ -3,9 +3,16 @@
|
||||
getDisplay () {
|
||||
local DESK
|
||||
|
||||
# DOCK
|
||||
DESK="$(~/.config/hypr/scripts/displaybyname.sh Samsung Electric Company S34J55x H4LT100404)"
|
||||
|
||||
[[ -n "$DESK" ]] && echo $DESK && return
|
||||
# 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
|
||||
echo "eDP-1"
|
||||
}
|
||||
|
||||
@ -17,4 +24,4 @@ export PRIMARY_DISPLAY
|
||||
envsubst < ~/.config/waybar/config > /tmp/waybar
|
||||
|
||||
pkill waybar
|
||||
waybar -c /tmp/waybar &!
|
||||
waybar -c /tmp/waybar $@ &!
|
||||
|
33
hyprland/scripts/workspaces.sh
Executable file
33
hyprland/scripts/workspaces.sh
Executable file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
mapfile -t MONITORS < <(hyprctl monitors -j | yq -r '. | sort_by(.x) | .[].name')
|
||||
mapfile -t WORKSPACES < <(hyprctl workspaces -j | yq -r '.[].name')
|
||||
|
||||
function docked() {
|
||||
|
||||
if [ ! ${#MONITORS[@]} -eq 3 ]; then
|
||||
echo "Not the right amount of displays"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Assume Docked at home."
|
||||
for i in "${!WORKSPACES[@]}"; do
|
||||
# Move the workspace to the correct monitor
|
||||
w=${WORKSPACES[$i]}
|
||||
case $w in
|
||||
4|8|9)
|
||||
hyprctl dispatch moveworkspacetomonitor "${w} ${MONITORS[0]}"
|
||||
;;
|
||||
5|6)
|
||||
hyprctl dispatch moveworkspacetomonitor "${w} ${MONITORS[2]}"
|
||||
;;
|
||||
*)
|
||||
hyprctl dispatch moveworkspacetomonitor "${w} ${MONITORS[1]}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
if [ "$1" = "docked" ]; then
|
||||
docked
|
||||
fi
|
Reference in New Issue
Block a user