Devilspie 2
Devilspie 2
软件
软件描述
窗口匹配工具,允许用户在创建 X11 窗口时对其执行脚本化操作:将窗口定位到特定工作区。
官方网站
访问软件的官方网站了解更多信息
www.nongnu.org
什么是 Devilspie 2?
If you don't give devilspie2 any folder with --folder, it will read Lua scripts from the folder that it gets from the GLib function g_get_user_config_dir with devilspie2/ added to the end - g_get_user_config_dir returns the config directory as defined in the XDG Base Directory Specification. In most cases would be the ~/.config/devilspie2/ folder, and this folder will be created if it doesn't already exist. This folder is changeable with the --folder option. If devilspie2 doesn't find any Lua files in the folder, it will stop execution. Devilspie2 will load all the Lua files in this folder in alphabetical order. Config A config is read from the folder where we read all scripts, and is customizable by the --folder option. By default this folder is ~/.config/devilspie2/. If there is a file named devilspie2.lua in this folder, it is read and it is searched for a variable (a lua table of strings) named either scripts_window_close, scripts_window_focus or scripts_window_blur - The filenames in the strings in this table will be called when windows are closed, focused or blurred respectively. If these variables isn't present in this file, it will be called as a devilspie2 script file like any other. For example:
scripts_window_close = { "file1.lua", "file2.lua" } This would make the files file1.lua and file2.lua interpreted when windows are closing instead of when windows are opening. Scripting You can choose to have all script functionality in one file, or you can split it up into several, Devilspie2 runs on all Lua files in your requested devilspie2 folder, by default ~/.config/devilspie2 - that is all files with a .lua extension. The scripting language used is Lua; www.lua.org/ FAQ: https://www.lua.org/FAQ.html Documentation: https://www.lua.org/docs.html Tutorials: http://lua-users.org/wiki/TutorialDirectory Please note that strings comparisons are case sensitive, comparing "SomeProgram" with "someprogram" will not report equality. Simple script example -- the debug_print command does only print anything to stdout -- if devilspie2 is run using the --debug option debug_print("Window Name: " .. get_window_name()); debug_print("Application name: " .. get_application_name()) -- I want my Xfce4-terminal to the right on the second screen of my two-monitor -- setup. (String comparison are case sensitive, please note this when -- creating rule scripts.) if (get_window_name() == "Terminal") then -- x,y, xsize, ysize set_window_geometry(1600, 300, 900, 700); end -- Make Firefox always start maximized. if (get_application_name() == "Firefox") then maximize(); end Contact Author: Darren Salt IRC: #devilspie2 on irc.libera.chat
下载与相关链接
安全提示安全提醒
点击下方链接将跳转到第三方网站,请确保来源安全,建议优先从官方网站下载。