+pis hoffentlich final

This commit is contained in:
sascha.koenig 2025-11-26 13:12:40 +01:00
parent e2e81dee82
commit 1c05d7800d
5 changed files with 37 additions and 37 deletions

View File

@ -19,8 +19,6 @@
exec-once = [ exec-once = [
"start-browsers" "start-browsers"
]; ];
monitor = [
];
workspace = [ workspace = [
"1, monitor:HDMI-A-1, default:true" "1, monitor:HDMI-A-1, default:true"
"2, monitor:HDMI-A-2" "2, monitor:HDMI-A-2"

View File

@ -20,10 +20,7 @@
"start-browsers" "start-browsers"
]; ];
monitor = [ monitor = [
]; "HDMI-A-1,1920x1080,0x0,1"
workspace = [
"1, monitor:eDP-1, default:true"
"2, monitor:eDP-1"
]; ];
}; };
} }

View File

@ -16,13 +16,9 @@
"WLR_NO_HARDWARE_CURSORS,1" "WLR_NO_HARDWARE_CURSORS,1"
]; ];
exec-once = [ exec-once = [
"chromium $WEBAPP_URL" "chromium --app=$WEBAPP_URL"
]; ];
monitor = [ monitor = [
]; ];
workspace = [
"1, monitor:eDP-1, default:true"
"2, monitor:eDP-1"
];
}; };
} }

View File

@ -16,13 +16,7 @@
"WLR_NO_HARDWARE_CURSORS,1" "WLR_NO_HARDWARE_CURSORS,1"
]; ];
exec-once = [ exec-once = [
"chromium $WEBAPP_URL" "chromium --app=$WEBAPP_URL"
];
monitor = [
];
workspace = [
"1, monitor:eDP-1, default:true"
"2, monitor:eDP-1"
]; ];
}; };
} }

View File

@ -27,12 +27,12 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
rose-pine-hyprcursor rose-pine-hyprcursor
nitch nitch
rustdesk
# Create an isolated chromium instance with separate user data directory # Create an isolated chromium instance with separate user data directory
(pkgs.writeShellScriptBin "chromium-isolated" '' (pkgs.writeShellScriptBin "chromium-isolated" ''
exec ${pkgs.chromium}/bin/chromium \ exec ${pkgs.chromium}/bin/chromium \
--user-data-dir="$HOME/.config/chromium-isolated" \ --user-data-dir="$HOME/.config/chromium-isolated" \
--password-store=basic \ --password-store=basic \
--kiosk \
--ozone-platform=x11 \ --ozone-platform=x11 \
--disable-restore-session-state \ --disable-restore-session-state \
--disable-session-crashed-bubble \ --disable-session-crashed-bubble \
@ -46,13 +46,19 @@
(pkgs.writeShellScriptBin "start-browsers" '' (pkgs.writeShellScriptBin "start-browsers" ''
#!/bin/bash #!/bin/bash
# Anzahl der Monitore abfragen
MONITOR_COUNT=$(${pkgs.hyprland}/bin/hyprctl -j monitors | ${pkgs.jq}/bin/jq 'length')
if [ "$MONITOR_COUNT" -gt 1 ]; then
# Multi-Monitor-Setup: Workspace-Wechsel durchführen
# Workspace 1 aktivieren und Chromium starten # Workspace 1 aktivieren und Chromium starten
${pkgs.hyprland}/bin/hyprctl dispatch workspace 1 ${pkgs.hyprland}/bin/hyprctl dispatch workspace 1
chromium "$WEBAPP_URL" & chromium --app="$WEBAPP_URL" &
# Warten, bis Chromium-Fenster zu sehen ist # Warten, bis Chromium-Fenster zu sehen ist
while true; do while true; do
if ${pkgs.hyprland}/bin/hyprctl -j clients | ${pkgs.jq}/bin/jq -e '.[] | select(.class == "Chromium-browser")' >/dev/null; then if ${pkgs.hyprland}/bin/hyprctl -j clients | ${pkgs.jq}/bin/jq -e '.[] | select(.class | ascii_downcase | contains("chromium"))' >/dev/null; then
break break
fi fi
sleep 0.2 sleep 0.2
@ -60,7 +66,13 @@
# Danach Workspace 2 und zweiten Browser starten # Danach Workspace 2 und zweiten Browser starten
${pkgs.hyprland}/bin/hyprctl dispatch workspace 2 ${pkgs.hyprland}/bin/hyprctl dispatch workspace 2
chromium-isolated "$WEBAPP_URL1" & 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 # # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run. # # "Hello, world!" when run.
@ -100,7 +112,6 @@
enable = true; enable = true;
commandLineArgs = [ commandLineArgs = [
"--password-store=basic" "--password-store=basic"
"--kiosk"
"--ozone-platform=x11" "--ozone-platform=x11"
"--disable-restore-session-state" "--disable-restore-session-state"
"--disable-session-crashed-bubble" "--disable-session-crashed-bubble"
@ -133,9 +144,9 @@
inactive_timeout = 1.0; inactive_timeout = 1.0;
}; };
general = { general = {
gaps_in = 5; gaps_in = 0;
gaps_out = 5; gaps_out = 0;
border_size = 1; border_size = 0;
"col.active_border" = "rgba(9742b5ee) rgba(9742b5ee) 45deg"; "col.active_border" = "rgba(9742b5ee) rgba(9742b5ee) 45deg";
"col.inactive_border" = "rgba(44475aaa)"; "col.inactive_border" = "rgba(44475aaa)";
"col.nogroup_border" = "rgba(282a36dd)"; "col.nogroup_border" = "rgba(282a36dd)";
@ -148,7 +159,7 @@
shadow = { shadow = {
enabled = false; enabled = false;
}; };
rounding = 8; rounding = 0;
blur = { blur = {
enabled = false; enabled = false;
}; };
@ -186,6 +197,10 @@
"float, title:branchdialog" "float, title:branchdialog"
"bordercolor rgb(ffffff),xwayland:1" "bordercolor rgb(ffffff),xwayland:1"
"workspace 1,class:(chromium-browser)" "workspace 1,class:(chromium-browser)"
"tile,class:^(chromium)$"
"tile,class:^(Chromium)$"
"tile,class:^(chromium-browser)$"
"tile,class:^(Chromium-browser)$"
]; ];
"$mainMod" = "SUPER"; "$mainMod" = "SUPER";