From 1c05d7800dd69e587597cc34715bfb2b03bd4d5b Mon Sep 17 00:00:00 2001 From: "sascha.koenig" Date: Wed, 26 Nov 2025 13:12:40 +0100 Subject: [PATCH] +pis hoffentlich final --- home/logistik/AZPILOGISTIK01.nix | 2 -- home/logistik/AZPILOGISTIK02.nix | 5 +-- home/logistik/AZPILOGISTIK03.nix | 6 +--- home/logistik/AZPILOGISTIK04.nix | 8 +---- home/logistik/home.nix | 53 ++++++++++++++++++++------------ 5 files changed, 37 insertions(+), 37 deletions(-) diff --git a/home/logistik/AZPILOGISTIK01.nix b/home/logistik/AZPILOGISTIK01.nix index 27974de..694689c 100644 --- a/home/logistik/AZPILOGISTIK01.nix +++ b/home/logistik/AZPILOGISTIK01.nix @@ -19,8 +19,6 @@ exec-once = [ "start-browsers" ]; - monitor = [ - ]; workspace = [ "1, monitor:HDMI-A-1, default:true" "2, monitor:HDMI-A-2" diff --git a/home/logistik/AZPILOGISTIK02.nix b/home/logistik/AZPILOGISTIK02.nix index 4b110e1..545d39a 100644 --- a/home/logistik/AZPILOGISTIK02.nix +++ b/home/logistik/AZPILOGISTIK02.nix @@ -20,10 +20,7 @@ "start-browsers" ]; monitor = [ - ]; - workspace = [ - "1, monitor:eDP-1, default:true" - "2, monitor:eDP-1" + "HDMI-A-1,1920x1080,0x0,1" ]; }; } diff --git a/home/logistik/AZPILOGISTIK03.nix b/home/logistik/AZPILOGISTIK03.nix index 1c1b937..9419329 100644 --- a/home/logistik/AZPILOGISTIK03.nix +++ b/home/logistik/AZPILOGISTIK03.nix @@ -16,13 +16,9 @@ "WLR_NO_HARDWARE_CURSORS,1" ]; exec-once = [ - "chromium $WEBAPP_URL" + "chromium --app=$WEBAPP_URL" ]; monitor = [ ]; - workspace = [ - "1, monitor:eDP-1, default:true" - "2, monitor:eDP-1" - ]; }; } diff --git a/home/logistik/AZPILOGISTIK04.nix b/home/logistik/AZPILOGISTIK04.nix index 1c1b937..4f5c5a3 100644 --- a/home/logistik/AZPILOGISTIK04.nix +++ b/home/logistik/AZPILOGISTIK04.nix @@ -16,13 +16,7 @@ "WLR_NO_HARDWARE_CURSORS,1" ]; exec-once = [ - "chromium $WEBAPP_URL" - ]; - monitor = [ - ]; - workspace = [ - "1, monitor:eDP-1, default:true" - "2, monitor:eDP-1" + "chromium --app=$WEBAPP_URL" ]; }; } diff --git a/home/logistik/home.nix b/home/logistik/home.nix index 4d00cf5..fbc7c9c 100644 --- a/home/logistik/home.nix +++ b/home/logistik/home.nix @@ -27,12 +27,12 @@ home.packages = with pkgs; [ rose-pine-hyprcursor nitch + rustdesk # Create an isolated chromium instance with separate user data directory (pkgs.writeShellScriptBin "chromium-isolated" '' exec ${pkgs.chromium}/bin/chromium \ --user-data-dir="$HOME/.config/chromium-isolated" \ --password-store=basic \ - --kiosk \ --ozone-platform=x11 \ --disable-restore-session-state \ --disable-session-crashed-bubble \ @@ -46,21 +46,33 @@ (pkgs.writeShellScriptBin "start-browsers" '' #!/bin/bash - # Workspace 1 aktivieren und Chromium starten - ${pkgs.hyprland}/bin/hyprctl dispatch workspace 1 - chromium "$WEBAPP_URL" & + # Anzahl der Monitore abfragen + MONITOR_COUNT=$(${pkgs.hyprland}/bin/hyprctl -j monitors | ${pkgs.jq}/bin/jq 'length') - # Warten, bis Chromium-Fenster zu sehen ist - while true; do - if ${pkgs.hyprland}/bin/hyprctl -j clients | ${pkgs.jq}/bin/jq -e '.[] | select(.class == "Chromium-browser")' >/dev/null; then - break - fi - sleep 0.2 - done + if [ "$MONITOR_COUNT" -gt 1 ]; then + # Multi-Monitor-Setup: Workspace-Wechsel durchführen - # Danach Workspace 2 und zweiten Browser starten - ${pkgs.hyprland}/bin/hyprctl dispatch workspace 2 - chromium-isolated "$WEBAPP_URL1" & + # Workspace 1 aktivieren und Chromium starten + ${pkgs.hyprland}/bin/hyprctl dispatch workspace 1 + chromium --app="$WEBAPP_URL" & + + # Warten, bis Chromium-Fenster zu sehen ist + while true; do + if ${pkgs.hyprland}/bin/hyprctl -j clients | ${pkgs.jq}/bin/jq -e '.[] | select(.class | ascii_downcase | contains("chromium"))' >/dev/null; then + break + fi + sleep 0.2 + done + + # Danach Workspace 2 und zweiten Browser starten + ${pkgs.hyprland}/bin/hyprctl dispatch workspace 2 + chromium-isolated --app="$WEBAPP_URL1" & + else + # Single-Monitor-Setup: Beide Browser ohne Workspace-Wechsel starten + chromium --app="$WEBAPP_URL" & + sleep 2 # Kurze Pause zwischen den Starts + chromium-isolated --app="$WEBAPP_URL1" & + fi '') # # Adds the 'hello' command to your environment. It prints a friendly # # "Hello, world!" when run. @@ -100,7 +112,6 @@ enable = true; commandLineArgs = [ "--password-store=basic" - "--kiosk" "--ozone-platform=x11" "--disable-restore-session-state" "--disable-session-crashed-bubble" @@ -133,9 +144,9 @@ inactive_timeout = 1.0; }; general = { - gaps_in = 5; - gaps_out = 5; - border_size = 1; + gaps_in = 0; + gaps_out = 0; + border_size = 0; "col.active_border" = "rgba(9742b5ee) rgba(9742b5ee) 45deg"; "col.inactive_border" = "rgba(44475aaa)"; "col.nogroup_border" = "rgba(282a36dd)"; @@ -148,7 +159,7 @@ shadow = { enabled = false; }; - rounding = 8; + rounding = 0; blur = { enabled = false; }; @@ -186,6 +197,10 @@ "float, title:branchdialog" "bordercolor rgb(ffffff),xwayland:1" "workspace 1,class:(chromium-browser)" + "tile,class:^(chromium)$" + "tile,class:^(Chromium)$" + "tile,class:^(chromium-browser)$" + "tile,class:^(Chromium-browser)$" ]; "$mainMod" = "SUPER";