2.9 KiB
Customizing bug.n
bug.n can be customized by setting configuration variables and hotkeys (the key bindings for the bug.n functions).
To change either of them, first create a configuration file (Config.ini
) by
using the hotkey #^s
, i. e. WinCtrlS. The
file is either saved in the directory you specified with the parameter to the
executable or script when running bug.n, or in the Windows user directory
(e. g. C:\Users\joten\AppData\Roaming\bug.n
).
You may then edit the file with a text editor, i. a. using the hotkey #^e
(WinCtrlE), and add a new line for each
configuration variable with its value; the general format is
<variable>=<value>
not using quotation marks surrounding the values.
If you want to set a boolean value, use 1
for "True" and 0
for "False";
e. g. Config_showBar=0
. You will have to reload bug.n for the changes to take
effect.
To set a hotkey, use the variable name Config_hotkey
and the hotkey notation
from AutoHotkey as value:
Config_hotkey=<key name>::<command or function name>
.
You may overwrite default or add new hotkeys.
- To deacivate a hotkey from the default configuration, add a new line in the
format
Config_hotkey=<key name>::
(without a function name). - To assign an external program to a new hotkey, add a line in the general
format, using the
Run
command of AutoHotkey as described in http://ahkscript.org/docs/commands/Run.htm (Run, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]
). - You may also use the
Send
command of AutoHotkey as described in http://ahkscript.org/docs/commands/Send.htm
The available configuration variables are listed in the document "Default configuration"; the hotkeys with their associated functions are listed in the document "Default hotkeys".
Config_borderWidth
, Config_borderPadding
and Config_selBorderColor
are
especially usefull, if you are not allowed to set the design in the system
settings.
You may find a sample configuration file at https://github.com/joten/bug.n.config.
Re-using Win+L
The hotkey #l
(WinL) is set by Microsoft Windows to
lock the workstation. If you want to use it as a hotkey in bug.n, you can bind
another hotkey, e. g. #^+l
(WinCtrlShiftL), to the lock
function by using the bug.n-function Manager_lockWorkStation()
, which i. a.
sets the registry key
Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableLockWorkstation
and locks the workstation. This than allows to set #l
as a hotkey in
Config.ini
.
If WinL still locks the workstation, use the new keybinding for locking the workstation at least once and therewith set the needed registry key.
WARNING: This will permanently set a registry key.