File: main.lua

package info (click to toggle)
xournalpp 1.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 30,036 kB
  • sloc: cpp: 64,137; xml: 939; sh: 752; ansic: 362; python: 338; php: 74; makefile: 15
file content (10 lines) | stat: -rw-r--r-- 279 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
function initUi()
  app.registerUi({["menu"] = "Toggle Highlight Position", ["callback"] = "laser", ["accelerator"] = "<Alt>x"});
end

local toggleState = false;

function laser()
  toggleState = not toggleState
  app.changeActionState("position-highlighting", toggleState);
end