Skip to content

Commit

Permalink
Merge branch 'alt-f12-state-grep-dialog'
Browse files Browse the repository at this point in the history
* Branch commit log:
  x11test/trackrename.json: hit Alt+F12 for project state grep dialog
  ui/startup.js: open project state grep dialog on Alt+F12
  misc/cirun: add comments on howto run and view electron inside docker

Signed-off-by: Tim Janik <[email protected]>
  • Loading branch information
tim-janik committed Jun 21, 2024
2 parents 89987b1 + a111f64 commit b7397d6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
7 changes: 6 additions & 1 deletion misc/cirun
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ fi

# Sense interactive TTY support, prepare $RUN
tty -s && INTERACTIVE=-i || INTERACTIVE=
RUN="docker run $INTERACTIVE -t --rm -v $PWD:/cirun -w /cirun cirun:$CITAG"
RUN="docker run $INTERACTIVE -t --rm -v $PWD:/cirun"
#RUN="$RUN -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v $HOME/.Xauthority:/home/builder/.Xauthority:ro" # X11 connect
#RUN="$RUN --net host" # needed to connect to AnklangSynthEngine *outside* docker
#RUN="$RUN -e DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS -v /run/user/1000/bus:/run/user/1000/bus -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket"
#RUN="$RUN --privileged --cap-add SYS_ADMIN --device /dev/fuse -v /var/run/docker.sock:/var/run/docker.sock" # run as root with fuse, docker
RUN="$RUN -w /cirun cirun:$CITAG"

# Change ownership, needed if the caller of this script has $UID different from the Dockerfile USER
test -z "$CHOWNID" || {
Expand Down
4 changes: 2 additions & 2 deletions ui/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ function window_keydown (event)
// Shift+Ctrl+I for devTools
if (event.keyCode == 73 && event.shiftKey && event.ctrlKey && window.Electron)
window.Electron.call ('toggle_dev_tools');
// F12 fro __DEV__ mode test results
if (event.keyCode == 123 /*F12*/ && !event.shiftKey && !event.ctrlKey && __DEV__)
// Alt+F12 for project state grep dialog
if (event.keyCode == 123 /*F12*/ && event.altKey && !event.shiftKey && !event.ctrlKey)
(async () => {
if (!grep_dialog)
grep_dialog = await import ('/grepdialog.js');
Expand Down
14 changes: 12 additions & 2 deletions x11test/trackrename.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,23 @@
{
"type": "keyDown",
"target": "main",
"key": "F12"
"key": "Alt"
},
{
"type": "keyUp",
"type": "keyDown",
"target": "main",
"key": "F12"
},
{
"type": "keyUp",
"key": "F12",
"target": "main"
},
{
"type": "keyUp",
"key": "Alt",
"target": "main"
},
{
"type": "change",
"value": "(?s)\"tracks\":.*\"name\":\\s*\"(Master2)\"",
Expand Down

0 comments on commit b7397d6

Please sign in to comment.