mirror of
https://github.com/DeeJanuz/frametop.git
synced 2026-10-06 13:00:10 +02:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0b93b79d3 | ||
|
|
13a530d829 | ||
|
|
f260a6a9e4 | ||
|
|
2e09cf9efe | ||
|
|
f18918f781 |
No files matched your search
@@ -3,7 +3,7 @@ Type=Application
|
|||||||
Name=Reset Screen Layout
|
Name=Reset Screen Layout
|
||||||
GenericName=Put the VR desktop's screens back in their layout
|
GenericName=Put the VR desktop's screens back in their layout
|
||||||
Comment=Float the screens and arrange them in the layout from Frametop Display Settings
|
Comment=Float the screens and arrange them in the layout from Frametop Display Settings
|
||||||
Exec=@REPO@/layout/ft-layout apply
|
Exec=@REPO@/layout/ft-layout-reset
|
||||||
Icon=view-restore
|
Icon=view-restore
|
||||||
Categories=Settings;
|
Categories=Settings;
|
||||||
Keywords=display;screen;layout;arrange;reset;steamvr;frametop;
|
Keywords=display;screen;layout;arrange;reset;steamvr;frametop;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Type=Application
|
|||||||
Name=Hide/Show Screens
|
Name=Hide/Show Screens
|
||||||
GenericName=Hide or show the VR desktop's screens
|
GenericName=Hide or show the VR desktop's screens
|
||||||
Comment=Hide the screens (and SteamVR's laser) for a VR game; press again to bring them back
|
Comment=Hide the screens (and SteamVR's laser) for a VR game; press again to bring them back
|
||||||
Exec=@REPO@/layout/ft-layout toggle
|
Exec=@REPO@/layout/ft-hide-show
|
||||||
Icon=view-visible
|
Icon=view-visible
|
||||||
Categories=Settings;
|
Categories=Settings;
|
||||||
Keywords=display;screen;hide;show;steamvr;frametop;
|
Keywords=display;screen;hide;show;steamvr;frametop;
|
||||||
|
|||||||
+11
-7
@@ -154,10 +154,10 @@ REL_X, REL_Y, REL_WHEEL, REL_MAX = 0x00, 0x01, 0x08, 0x0F
|
|||||||
SCROLLS = {0x06, REL_WHEEL, 0x0B, 0x0C} # REL_HWHEEL, REL_WHEEL and their _HI_RES
|
SCROLLS = {0x06, REL_WHEEL, 0x0B, 0x0C} # REL_HWHEEL, REL_WHEEL and their _HI_RES
|
||||||
BTN_LEFT, BTN_RIGHT, BTN_MIDDLE, BTN_SIDE, BTN_EXTRA = 0x110, 0x111, 0x112, 0x113, 0x114
|
BTN_LEFT, BTN_RIGHT, BTN_MIDDLE, BTN_SIDE, BTN_EXTRA = 0x110, 0x111, 0x112, 0x113, 0x114
|
||||||
KEY_LEFTMETA, KEY_RIGHTMETA = 125, 126
|
KEY_LEFTMETA, KEY_RIGHTMETA = 125, 126
|
||||||
KEY_VOLUMEDOWN, KEY_VOLUMEUP = 114, 115
|
KEY_MUTE, KEY_VOLUMEDOWN, KEY_VOLUMEUP = 113, 114, 115
|
||||||
# Volume keys are remapped to KEY_MACRO29 and KEY_MACRO30: above 255, so X11 can't
|
# Volume keys are remapped to KEY_MACRO28, KEY_MACRO29 and KEY_MACRO30: above 255, so X11
|
||||||
# carry them, and bound to nothing in the default keymap.
|
# can't carry them, and bound to nothing in the default keymap.
|
||||||
VOLUME_STANDIN = {KEY_VOLUMEUP: 0x2AC, KEY_VOLUMEDOWN: 0x2AD}
|
VOLUME_STANDIN = {KEY_MUTE: 0x2AB, KEY_VOLUMEUP: 0x2AC, KEY_VOLUMEDOWN: 0x2AD}
|
||||||
VOLUME_ORIGINAL = {v: k for k, v in VOLUME_STANDIN.items()}
|
VOLUME_ORIGINAL = {v: k for k, v in VOLUME_STANDIN.items()}
|
||||||
VOLUME_CODES = set(VOLUME_STANDIN) | set(VOLUME_ORIGINAL)
|
VOLUME_CODES = set(VOLUME_STANDIN) | set(VOLUME_ORIGINAL)
|
||||||
BUS_USB, BUS_BLUETOOTH, BUS_VIRTUAL = 0x03, 0x05, 0x06
|
BUS_USB, BUS_BLUETOOTH, BUS_VIRTUAL = 0x03, 0x05, 0x06
|
||||||
@@ -429,9 +429,13 @@ class Volume:
|
|||||||
|
|
||||||
def key(self, fd, code, value, now):
|
def key(self, fd, code, value, now):
|
||||||
if value == 1:
|
if value == 1:
|
||||||
self.held = (fd, code)
|
if VOLUME_ORIGINAL.get(code, code) == KEY_MUTE:
|
||||||
self.step(code)
|
subprocess.Popen(["wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle"],
|
||||||
self.next_at = now + self.DELAY
|
stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||||
|
else:
|
||||||
|
self.held = (fd, code)
|
||||||
|
self.step(code)
|
||||||
|
self.next_at = now + self.DELAY
|
||||||
elif value == 0 and self.held == (fd, code):
|
elif value == 0 and self.held == (fd, code):
|
||||||
self.release()
|
self.release()
|
||||||
|
|
||||||
|
|||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Hide/Show Screens' own program (see ft-layout-reset).
|
||||||
|
exec "$(dirname "$(readlink -f "$0")")/ft-layout" toggle "$@"
|
||||||
Executable
+4
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Reset Screen Layout's own program. Steam lists menu entries by program, so entries that
|
||||||
|
# shared ft-layout (with different arguments) launched as one.
|
||||||
|
exec "$(dirname "$(readlink -f "$0")")/ft-layout" apply "$@"
|
||||||
Reference in new issue
Block a user