From ed7c36b3d0ff181a9b72c74a111d45b714a4a2c4 Mon Sep 17 00:00:00 2001 From: hexlocation pc Date: Sat, 20 Jul 2024 20:02:33 +0200 Subject: [PATCH] fix multiple monitors + desk/lapt --- .config/ags/config.js | 3 ++- .config/dots/install.sh | 5 ++++- .config/hypr/hyprland.conf | 10 +++++----- .config/hypr/hyprpaper.conf | 2 ++ .config/hypr/monitor.sh | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.config/ags/config.js b/.config/ags/config.js index ad7b172..a6b6565 100644 --- a/.config/ags/config.js +++ b/.config/ags/config.js @@ -181,6 +181,7 @@ let commonMargin = 10 const bar = (monitors = 2) => { let bars = []; for (let i = 0; i < monitors; i++) { + print(i); bars.push(Widget.Window({ exclusivity : 'exclusive', name : `bar-window-${i}`, @@ -202,7 +203,7 @@ const bar = (monitors = 2) => { // main Gtk App App.config({ style : '/home/hex/.config/ags/style.css', - windows : [ search, ...bar(1) ], + windows : [ search, ...bar(2) ], }) // close search window by default diff --git a/.config/dots/install.sh b/.config/dots/install.sh index 0e1faf2..226827f 100755 --- a/.config/dots/install.sh +++ b/.config/dots/install.sh @@ -66,6 +66,7 @@ set_machine_type () { notify "are you on a laptop or a desktop? (laptop/desktop) " read MACHINE_TYPE + export MACHINE_TYPE=$MACHINE_TYPE if [[ "$MACHINE_TYPE" != "laptop" && "$MACHINE_TYPE" != "desktop" ]]; then err "invalid machine type." @@ -78,7 +79,9 @@ main() { notify "hello there!" check_deps set_machine_type - install_backlight_rule + if [[ $MACHINE_TYPE -eq "laptop" ]]; then + install_backlight_rule + fi notify "everything has been installed successfully, enjoy!" } diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 00c25b5..7ac3587 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -1,14 +1,10 @@ # Based on the default config -# Start AGS daemon -exec="ags -q" -exec="ags" - # Start hyprpaper exec-once=hyprpaper # Start Pipewire daemon -exec-once=gentoo-pipewire-launcher +exec=gentoo-pipewire-launcher restart # Terminal Daemon exec-once=foot --server @@ -185,3 +181,7 @@ bind = CTRL, ALT_L, submap, passthrough submap = passthrough bind = CTRL, ALT_L, submap, reset submap = reset + +# Start AGS daemon +exec-once="ags" + diff --git a/.config/hypr/hyprpaper.conf b/.config/hypr/hyprpaper.conf index 17d4c28..9352a41 100644 --- a/.config/hypr/hyprpaper.conf +++ b/.config/hypr/hyprpaper.conf @@ -1,2 +1,4 @@ preload = /home/hex/wallpaper.jpg wallpaper = eDP-1,/home/hex/wallpaper.jpg +wallpaper = DVI-D-1,/home/hex/wallpaper.jpg +wallpaper = HDMI-A-3,/home/hex/wallpaper.jpg diff --git a/.config/hypr/monitor.sh b/.config/hypr/monitor.sh index 646ba73..0559df5 100755 --- a/.config/hypr/monitor.sh +++ b/.config/hypr/monitor.sh @@ -9,5 +9,5 @@ if [ -e "$LAPTOP" ]; then fi # Desktop configuration -hyprctl keyword monitor DVI-D-0,1920x1080@60,0x0,1 +hyprctl keyword monitor DVI-D-1,1920x1080@60,0x0,1 hyprctl keyword monitor HDMI-A-3,1680x1050@59.88300,1920x0,1