From 43ced383137164180a310eab4d91228d10f59a02 Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Sun, 5 Aug 2018 13:57:19 +0200 Subject: [PATCH] Special configuration for openbox on second display do not focus new windows --- Manual.org | 833 +++++++++++++++++- roles/yavdr-desktop/tasks/main.yml | 8 + .../templates/openbox/rc2.xml.j2 | 812 +++++++++++++++++ .../systemd/user/openbox-second.service.j2 | 2 +- 4 files changed, 1652 insertions(+), 3 deletions(-) create mode 100644 roles/yavdr-desktop/templates/openbox/rc2.xml.j2 diff --git a/Manual.org b/Manual.org index a7c3b98..f0bc063 100644 --- a/Manual.org +++ b/Manual.org @@ -596,7 +596,6 @@ Allow the vdr user to restart ~vdr.service~ and reboot the system {{ vdr.user }} ALL=NOPASSWD: /bin/systemctl --no-block reboot #+END_SRC ** collect facts about the system with custom modules - *** variables #+BEGIN_SRC yaml :tangle roles/collect-facts/defaults/main.yml :mkdirp yes first_run: False @@ -1024,6 +1023,7 @@ install_avahi: true #+END_SRC + ** STARTED yavdr-remote *** default variables #+BEGIN_SRC yaml :tangle roles/yavdr-remote/defaults/main.yml :mkdirp yes :padline no @@ -1337,6 +1337,7 @@ ctl.!default { fallback "sysdefault" } #+END_SRC + ** yavdr-xorg *** About the GUI session The X-Server is started by using the two systemd units ~xlogin@.service~ and ~x@.service~ provided by the package *xlogin*. The former is enabled (and started) for the vdr user - which results (using the default settings for the user *vdr* with the uid *666*) in the activation of ~xlogin@vdr.service~ when reaching the graphical.target. To simplify starting and stopping the X-server and the desktop session a ~yavdr-xorg.service~ is provided by the package ~yavdr-xorg~, which depends on the two units mentioned before. @@ -2529,6 +2530,14 @@ exit 0 owner: '{{ vdr.user }}' group: '{{ vdr.group }}' +- name: expand rc2.xml for openbox on second display + template: + src: 'templates/openbox/rc2.xml.j2' + dest: '{{ vdr.home }}/.config/openbox/rc2.xml' + mode: 0644 + owner: '{{ vdr.user }}' + group: '{{ vdr.group }}' + - name: create yavdr-desktop.target for the user session template: src: 'templates/systemd/user/yavdr-desktop.target.j2' @@ -3491,6 +3500,822 @@ systemctl --user isolate yavdr-desktop.target +#+END_SRC +***** rc2.xml +#+BEGIN_SRC xml :tangle roles/yavdr-desktop/templates/openbox/rc2.xml.j2 :mkdirp yes :padline no + + + + + 10 + 20 + + + no + + no + + yes + + no + + 200 + + no + + + + Smart + +
yes
+ + Active + + Active + +
+ + Onyx + NLIMC + + no + yes + + sans + 8 + + bold + + normal + + + + sans + 8 + + bold + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + bold + + normal + + + + sans + 9 + + bold + + normal + + + + + + 2 + 1 + + + + 875 + + + + yes + Nonpixel + + Center + + + + 10 + + 10 + + + + + + 0 + 0 + 0 + 0 + + + TopLeft + + 0 + 0 + no + Above + + Vertical + + no + 300 + + 300 + + Middle + + + + C-g + + + + left + no + + + + + right + no + + + + + up + no + + + + + down + no + + + + + left + no + + + + + right + no + + + + + up + no + + + + + down + no + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + + + + + + + + + + + + + client-menu + + + + + + scrot -s + + + + + + + + + + + + + + + + + + + + + + + + yes + yes + + + + + + + + + + + right + + + + + left + + + + + up + + + + + down + + + + + 1 + + 500 + + 400 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + + + + + + + + + no + + + + + + + + + + + yes + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + + top + + + + + + + left + + + + + + + right + + + + + + + bottom + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + vertical + + + + + horizontal + + + + + + + + + + + + + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + + + + + + + + + + + + client-list-combined-menu + + + + + root-menu + + + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + + + + + /var/lib/openbox/debian-menu.xml + menu.xml + 200 + + no + + 100 + + 400 + + yes + + yes + + + + + + no + yes + + no + + + no + yes + + no + + + no + yes + + no + + + no + yes + + no + + + no + yes + + no + + +
+ #+END_SRC **** Systemd User Session @@ -3526,7 +4351,7 @@ ConditionFileNotEmpty=%h/.second_display [Service] EnvironmentFile=%h/.second_display -ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc.xml +ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc2.xml ExecStartPost=/usr/bin/xset -dpms s off -display $DISPLAY ExecStartPost=/bin/bash %h/.fehbg @@ -3754,6 +4579,10 @@ It would be nice to be able to detect if it is suitable to install those drivers Vendor-IDs: - eb1a:5[1b2] (alte Generation) - 2659:* (neuere Sticks) +**** planned packages +- yavdr-hardware-sundtek +- python3-sundtek +- yavdr-backend-sundtek *** TODO drivers for TT S2-6400 FF https://github.com/s-moch/linux-saa716x - kann man den relevanten Teil als dkms-Paket bauen? ** autoinstall-ubuntu-drivers diff --git a/roles/yavdr-desktop/tasks/main.yml b/roles/yavdr-desktop/tasks/main.yml index eb1524c..0fe2a18 100644 --- a/roles/yavdr-desktop/tasks/main.yml +++ b/roles/yavdr-desktop/tasks/main.yml @@ -45,6 +45,14 @@ owner: '{{ vdr.user }}' group: '{{ vdr.group }}' +- name: expand rc2.xml for openbox on second display + template: + src: 'templates/openbox/rc2.xml.j2' + dest: '{{ vdr.home }}/.config/openbox/rc2.xml' + mode: 0644 + owner: '{{ vdr.user }}' + group: '{{ vdr.group }}' + - name: create yavdr-desktop.target for the user session template: src: 'templates/systemd/user/yavdr-desktop.target.j2' diff --git a/roles/yavdr-desktop/templates/openbox/rc2.xml.j2 b/roles/yavdr-desktop/templates/openbox/rc2.xml.j2 new file mode 100644 index 0000000..37aa463 --- /dev/null +++ b/roles/yavdr-desktop/templates/openbox/rc2.xml.j2 @@ -0,0 +1,812 @@ + + + + + 10 + 20 + + + no + + no + + yes + + no + + 200 + + no + + + + Smart + +
yes
+ + Active + + Active + +
+ + Onyx + NLIMC + + no + yes + + sans + 8 + + bold + + normal + + + + sans + 8 + + bold + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + bold + + normal + + + + sans + 9 + + bold + + normal + + + + + + 2 + 1 + + + + 875 + + + + yes + Nonpixel + + Center + + + + 10 + + 10 + + + + + + 0 + 0 + 0 + 0 + + + TopLeft + + 0 + 0 + no + Above + + Vertical + + no + 300 + + 300 + + Middle + + + + C-g + + + + left + no + + + + + right + no + + + + + up + no + + + + + down + no + + + + + left + no + + + + + right + no + + + + + up + no + + + + + down + no + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + + + + + + + + + + + + + client-menu + + + + + + scrot -s + + + + + + + + + + + + + + + + + + + + + + + + yes + yes + + + + + + + + + + + right + + + + + left + + + + + up + + + + + down + + + + + 1 + + 500 + + 400 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + + + + + + + + + no + + + + + + + + + + + yes + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + + top + + + + + + + left + + + + + + + right + + + + + + + bottom + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + vertical + + + + + horizontal + + + + + + + + + + + + + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + + + + + + + + + + + + client-list-combined-menu + + + + + root-menu + + + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + + + + + /var/lib/openbox/debian-menu.xml + menu.xml + 200 + + no + + 100 + + 400 + + yes + + yes + + + + + + no + yes + + no + + + no + yes + + no + + + no + yes + + no + + + no + yes + + no + + + no + yes + + no + + +
diff --git a/roles/yavdr-desktop/templates/systemd/user/openbox-second.service.j2 b/roles/yavdr-desktop/templates/systemd/user/openbox-second.service.j2 index c9f653d..d204e45 100644 --- a/roles/yavdr-desktop/templates/systemd/user/openbox-second.service.j2 +++ b/roles/yavdr-desktop/templates/systemd/user/openbox-second.service.j2 @@ -7,7 +7,7 @@ ConditionFileNotEmpty=%h/.second_display [Service] EnvironmentFile=%h/.second_display -ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc.xml +ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc2.xml ExecStartPost=/usr/bin/xset -dpms s off -display $DISPLAY ExecStartPost=/bin/bash %h/.fehbg