
Lubuntu 中是否有熱鍵組合可以在不同工作區之間移動應用程式?我正在尋找類似於 Ctlr-Alt-Shift (Ubuntu) 的組合鍵。我嘗試修改該~/.config/openbox/lubuntu-rc.xml
文件,但無法獲得切換應用程式的正確命令。有什麼解決辦法嗎?
答案1
設定快捷方式
命令
要將應用程式(-window)從命令移至另一個工作區,您需要wmctrl
安裝。將最前面的應用程式(- 的視窗)移到特定工作區(在 Lubuntu 上)所需的命令是:
wmctrl -r :ACTIVE: -t 1
其中1
指的是目標工作空間。第一個工作區是0
,因此上面的指令會將活動視窗移到第二個工作區。
盧本圖的快捷方式
在 Lubuntu 中,要設定自訂快捷方式,(實際上)您必須手動編輯該檔案~/.config/openbox/lubuntu-rc.xml
。
獲得正確語法的最簡單方法是移動到keyboard
文件的部分,然後簡單地複製現有的快捷方式部分,如下例所示:
<!-- move window to workspace 2 on Ctrl + Alt + Y-->
<keybind key="C-A-Y">
<action name="Execute">
<command>wmctrl -r :ACTIVE: -t 1</command>
</action>
</keybind>
作為測試,我添加了該部分,並且運行良好(已登出/登入後);它將活動視窗移到快捷方式++Control上對應的工作區。AltY
您應該記住什麼:
wmctrl
需要安裝指令:sudo apt-get install wmctrl
需要登出/登入才能開始工作
- 第一個工作區具有索引
0
,因此範例中的命令實際上會將活動視窗移至第二個工作區。
有關新增自訂快速鍵和使用的語法的更詳細說明,請參閱這裡,在下面的部分中;建立新的鍵盤快速鍵也這裡,您可以在快捷方式部分找到如何「提及」按鍵:
Key combination
KEY-COMBINATION is the key combination which you want to bind to the actions. The format for the KEY-COMBINATION is: Modifier-Modifier-Key. Any number of modifiers (0 or more) can be used together, and they are each separated by a "-". Multiple KEY-COMBINATION can be specified in one keybind by separating them with spaces. This is useful if you use multiple keybinds for a thing that is quite complicated to specify.
Modifiers
Modifier keys
S Shift key
C Control key
A Alt key
W Super key (Usually bound to the Windows key on keyboards which have one)
M Meta key
H Hyper key (If it is bound to something)
You can also use Mod1 through Mod5 as the modifiers to directly select a modifier mask (e.g. Mod1 to select Mod1Mask), but this is for advanced users who have customized their modifier mapping with xmodmap.
更“複雜”的選擇
你可以建立一個腳本來查看目前工作區是什麼,並將活動窗口移動到下一個/上一個窗口,而不必為每個(目標)工作區設定組合鍵。
但這將是另一個問題:)
答案2
在 Lubuntu Lxqt 0.14.1 上:
Ctrl+ Shift+ Alt+Arrow (left or right)