generated from 2i2c-org/hub-user-image-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rub21
committed
Feb 16, 2024
1 parent
2becb59
commit 8c61c28
Showing
4 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: '3' | ||
services: | ||
qgis: | ||
image: qgis | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- "8888:8888" | ||
security_opt: | ||
- seccomp:unconfined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash -l | ||
|
||
function maximize_qgis_window() { | ||
# Set the desired size | ||
desired_width=1680 | ||
desired_height=999 # or 1050 | ||
while true; do | ||
window_id=$(wmctrl -l | grep 'QGIS' | awk '{print $1}') | ||
if [ -n "$window_id" ]; then | ||
window_info=$(wmctrl -lG | grep "$window_id") | ||
width=$(echo "$window_info" | awk '{print $5}') | ||
height=$(echo "$window_info" | awk '{print $6}') | ||
if [ "$width" -lt "$desired_width" ] || [ "$height" -lt "$desired_height" ]; then | ||
echo "QGIS window is smaller than $desired_width x $desired_height. Maximizing..." | ||
wmctrl -i -r "$window_id" -b add,maximized_vert,maximized_horz | ||
else | ||
echo "QGIS window is at least $desired_width x $desired_height" | ||
fi | ||
else | ||
echo "QGIS window not found" | ||
fi | ||
sleep 2 | ||
done | ||
} | ||
|
||
# Start QGIS | ||
qgis & maximize_qgis_window |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters