fix: conditional logic for hyprland minotors
This commit is contained in:
@ -8,3 +8,6 @@ source=~/.config/hypr/hyprland/general.conf
|
||||
source=~/.config/hypr/hyprland/rules.conf
|
||||
source=~/.config/hypr/hyprland/colors.conf
|
||||
source=~/.config/hypr/hyprland/keybinds.conf
|
||||
|
||||
# Monitors
|
||||
source=~/.config/hypr/hyprland/monitors.conf
|
||||
|
@ -1,11 +1,3 @@
|
||||
# MONITOR CONFIG
|
||||
# FOR LAPTOP
|
||||
# monitor=,preferred,auto,1
|
||||
# monitor=,addreserved, 0, 0, 0, 0 # Custom reserved area
|
||||
|
||||
# HDMI port: mirror display. To see device name, use `hyprctl monitors`
|
||||
monitor=HDMI-A-1,2560x1440@144,1920x0,1,mirror,eDP-1
|
||||
|
||||
input {
|
||||
# Keyboard: Add a layout and uncomment kb_options for Win+Space switching shortcut
|
||||
kb_layout = us
|
||||
|
4
hypr/hyprland/monitors.conf
Normal file
4
hypr/hyprland/monitors.conf
Normal file
@ -0,0 +1,4 @@
|
||||
# HDMI port: mirror display. To see device name, use `hyprctl monitors`
|
||||
|
||||
#DESKTOP: monitor=HDMI-A-1,2560x1440@144,1920x0,1,mirror,eDP-1
|
||||
#LAPTOP: monitor=,preferred,auto,1
|
@ -4,6 +4,17 @@ git pull
|
||||
|
||||
folders=("hypr" "ags" "tmux" "lazygit" "kitty" "fish" "nvim")
|
||||
|
||||
# Replace the monitors part of hyprland config
|
||||
|
||||
current_host=""
|
||||
if [[ $(hostname) == "johnc-desktop" ]]; then
|
||||
current_host="DESKTOP"
|
||||
else
|
||||
current_host="LAPTOP"
|
||||
fi
|
||||
|
||||
sed -i "s/#$current_host: //" ./hypr/hyprland/monitors.conf
|
||||
|
||||
for folder in ${folders[@]}; do
|
||||
echo Moving $folder
|
||||
rsync -a ./$folder/ ~/.config/$folder
|
||||
@ -11,3 +22,7 @@ done
|
||||
|
||||
# Starship
|
||||
cp starship.toml ~/.config/starship.toml
|
||||
|
||||
# Cleanup
|
||||
|
||||
sed -i "s/^monitor/#$current_host: monitor/" ./hypr/hyprland/monitors.conf
|
||||
|
Reference in New Issue
Block a user