diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 374c13e..9cc1ce4 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -22,14 +22,17 @@ WORKDIR /InfiniteGlass RUN sed -e '/PyGObject/d' glass-action/setup.py -i -RUN make all -RUN make devinstall +RUN rm -rf /InfiniteGlass/env +RUN make ENVDIR=/env all +RUN make ENVDIR=/env devinstall RUN useradd glass RUN mkdir -p /home/glass RUN mkdir -p /home/glass/.config/session-state RUN mkdir -p /home/glass/.config/dconf RUN chown -R glass:users /home/glass +RUN mkdir -p /run/user/$(id -u glass) +RUN chown glass /run/user/$(id -u glass) RUN chmod -R ugo+rw /InfiniteGlass RUN sed -e "s+\(sudo:.*\)+\1glass+g" /etc/group -i RUN sed -e "s+ALL$+NOPASSWD: ALL+g" /etc/sudoers -i diff --git a/dependencies.txt b/dependencies.txt index c5e98c9..d3c1568 100644 --- a/dependencies.txt +++ b/dependencies.txt @@ -75,3 +75,5 @@ xfonts-base iproute2 x11-xserver-utils xscreensaver +trayer +network-manager-gnome dbus-x11 diff --git a/glass-config-init/glass_config_init/components.yml b/glass-config-init/glass_config_init/components.yml index 6f31661..e99f5aa 100644 --- a/glass-config-init/glass_config_init/components.yml +++ b/glass-config-init/glass_config_init/components.yml @@ -26,3 +26,15 @@ components: panelterm: command: ["xterm", "-title", "panelterm", "-xrm", "XTerm.vt100.allowTitleOps: false"] environment: { "IG_APP_ID": "panelterm" } + trayer: + command: ["trayer", + "--transparent", "true", + "--alpha", "0", + "--padding", "10", + "--iconspacing", "10", + "--SetDockType", "false", + "--width", "400", + "--widthtype", "pixel"] + environment: { "IG_APP_ID": "trayer" } + nm-applet: + command: ["nm-applet", "--sm-disable"] diff --git a/glass-config-init/glass_config_init/ghosts.yml b/glass-config-init/glass_config_init/ghosts.yml index aef0100..6294c92 100644 --- a/glass-config-init/glass_config_init/ghosts.yml +++ b/glass-config-init/glass_config_init/ghosts.yml @@ -81,10 +81,23 @@ ghosts: - !string XTerm - !string "" WM_NAME: !string panelterm - IG_COORDS: [0.0, "eq://apply($.root.get_geometry).height/apply($.root.get_geometry).width", 1.0, 0.0576171875] + IG_COORDS: [0.0, "eq://$.root.aspect_ratio", 1.0, 0.0576171875] IG_SIZE: ["eq://apply($.root.get_geometry).width", "eq://int(apply($.root.get_geometry).width*0.0576171875)"] IG_LAYER: IG_LAYER_OVERLAY + - IG_APP_ID: !string trayer + WM_CLASS: + - !string panel + - !string trayer + - !string "" + WM_NAME: !string panel + IG_SIZE: ["eq://int(apply($.root.get_geometry).width * 0.05)", "eq://int(apply($.root.get_geometry).height * 0.05)"] + IG_COORDS: [ + 0.01, + "eq://0.13 * $.root.aspect_ratio", + 0.05, + "eq://0.05 * $.root.aspect_ratio"] + IG_LAYER: IG_LAYER_OVERLAY # Match new windows when they first appear against these patterns and # run the corresponding actions on them. diff --git a/glass-config-init/glass_config_init/widgets.yml b/glass-config-init/glass_config_init/widgets.yml index b4f9e97..ab47e28 100644 --- a/glass-config-init/glass_config_init/widgets.yml +++ b/glass-config-init/glass_config_init/widgets.yml @@ -2,49 +2,49 @@ widgets: Zoom in: properties: IG_COLOR_TRANSFORM: 1 - IG_COORDS: [0.01, "eq://0.2 * apply($.root.get_geometry).height/apply($.root.get_geometry).width", 0.05, 0.05] + IG_COORDS: [0.01, "eq://0.25 * $.root.aspect_ratio", 0.05, 0.05] IG_CONTENT: !IG_SVG resource://glass_widgets/icons/circle-plus.fl.svg action: zoom_to_fewer_windows Zoom out: properties: IG_COLOR_TRANSFORM: 1 - IG_COORDS: [0.01, "eq://0.3 * apply($.root.get_geometry).height/apply($.root.get_geometry).width", 0.05, 0.05] + IG_COORDS: [0.01, "eq://0.35 * $.root.aspect_ratio", 0.05, 0.05] IG_CONTENT: !IG_SVG resource://glass_widgets/icons/circle-minus.fl.svg action: zoom_to_more_windows Zoom home: properties: IG_COLOR_TRANSFORM: 1 - IG_COORDS: [0.01, "eq://0.4 * apply($.root.get_geometry).height/apply($.root.get_geometry).width", 0.05, 0.05] + IG_COORDS: [0.01, "eq://0.45 * $.root.aspect_ratio", 0.05, 0.05] IG_CONTENT: !IG_SVG resource://glass_widgets/icons/home.fl.svg action: zoom_home Group: properties: IG_COLOR_TRANSFORM: 1 - IG_COORDS: [0.01, "eq://0.5 * apply($.root.get_geometry).height/apply($.root.get_geometry).width", 0.05, 0.05] + IG_COORDS: [0.01, "eq://0.55 * $.root.aspect_ratio", 0.05, 0.05] IG_CONTENT: !IG_SVG resource://glass_widgets/icons/group.fl.svg action: send_island_create Tile: properties: IG_COLOR_TRANSFORM: 1 - IG_COORDS: [0.01, "eq://0.6 * apply($.root.get_geometry).height/apply($.root.get_geometry).width", 0.05, 0.05] + IG_COORDS: [0.01, "eq://0.65 * $.root.aspect_ratio", 0.05, 0.05] IG_CONTENT: !IG_SVG resource://glass_widgets/icons/th-list.fl.svg action: tile_visible_to_1_1 Exit: properties: IG_COLOR_TRANSFORM: 1 - IG_COORDS: [0.01, "eq://0.7 * apply($.root.get_geometry).height/apply($.root.get_geometry).width", 0.05, 0.05] + IG_COORDS: [0.01, "eq://0.75 * $.root.aspect_ratio", 0.05, 0.05] IG_CONTENT: !IG_SVG resource://glass_widgets/icons/eject.fl.svg action: send_exit Debug: properties: IG_COLOR_TRANSFORM: 1 - IG_COORDS: [0.01, "eq://0.8 * apply($.root.get_geometry).height/apply($.root.get_geometry).width", 0.05, 0.05] + IG_COORDS: [0.01, "eq://0.85 * $.root.aspect_ratio", 0.05, 0.05] IG_CONTENT: !IG_SVG resource://glass_widgets/icons/bug.fl.svg action: send_debug diff --git a/scripts/docker-runner.sh b/scripts/docker-runner.sh index e7fb1fd..3f97d09 100755 --- a/scripts/docker-runner.sh +++ b/scripts/docker-runner.sh @@ -6,4 +6,8 @@ echo "######################################################" export | grep GLASS echo "######################################################" -su -c "bash -c 'cd /InfiniteGlass; scripts/xstartup.sh'" glass +export XDG_RUNTIME_DIR=/run/user/$(id -u) +dbus-daemon --session --fork --print-address > /tmp/dbus_address +export DBUS_SESSION_BUS_ADDRESS=$(cat /tmp/dbus_address) + +su -c "bash -c 'cd /InfiniteGlass; ENVDIR=/env scripts/xstartup.sh'" glass diff --git a/scripts/glass-renderer-wrapper.sh b/scripts/glass-renderer-wrapper.sh index 98673b3..db5198c 100755 --- a/scripts/glass-renderer-wrapper.sh +++ b/scripts/glass-renderer-wrapper.sh @@ -2,13 +2,13 @@ if [ "$GLASS_DEBUGGER" = "valgrind" ]; then echo "Debugging using Valgrind..." - exec valgrind --vgdb=yes ./build/glass-renderer + exec valgrind --vgdb=yes $(which glass-renderer) else if [ "$GLASS_DEBUGGER" = "gdb" ]; then echo "Debugging using GDB..." - exec gdb ./env/bin/glass-renderer 0<&3 1>&4 2>&5 + exec gdb $(which glass-renderer) 0<&3 1>&4 2>&5 else echo "Starting renderer without debugger" - exec ./env/bin/glass-renderer + exec $(which glass-renderer) fi fi diff --git a/scripts/run-in-docker.sh b/scripts/run-in-docker.sh index e60f1aa..a6543c1 100755 --- a/scripts/run-in-docker.sh +++ b/scripts/run-in-docker.sh @@ -34,9 +34,12 @@ docker run \ --ipc=host \ --user id -u root \ --cap-add=ALL \ + -v $(pwd):/InfiniteGlass \ -v ~/.config/glass:/home/glass/.config/glass \ -v /tmp/.X11-unix:/tmp/.X11-unix:rw \ -v /tmp/.ICE-unix:/tmp/.ICE-unix:rw \ + -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket \ + -v $(pwd):/host \ -v "$XAUTH:$XAUTH" \ -e "XAUTHORITY=$XAUTH" \ -e DISPLAY \ diff --git a/scripts/xinitrc b/scripts/xinitrc index f508911..f117d62 100644 --- a/scripts/xinitrc +++ b/scripts/xinitrc @@ -1,13 +1,15 @@ #! /bin/bash +set +x + export GLASS_SHADER_PATH=build export MALLOC_CHECK_=2 if [ "$GLASS_DMALLOC" ]; then eval "$(dmalloc -l ./logfile -i 100 high)" fi - -. ./env/bin/activate + +. "$ENVDIR/bin/activate" ulimit -c unlimited