使用鍵盤快速鍵調整視窗大小

使用鍵盤快速鍵調整視窗大小

I have seen some people resizing their windows very efficiently with shortcuts.. For example window is on full screen then you press some key and it becomes the left side of the screen then another window you press a button and it takes the right side of the螢幕.

我不確定這是透過任何應用程式實現的還是內建的,有誰知道如何實現這一點?

答案1

在 Ubuntu 中,預設設定了一些鍵盤快捷鍵:

  • 最大化視窗: Super+Up
  • 恢復視窗: Super+Down
  • 平鋪到螢幕的左半部分: Super+Left
  • 平鋪到螢幕的右半部分: Super+Right

此外,還設定了使用鍵盤移動和調整大小的按鍵:

  • 開始移動: Alt+ F7.按此鍵後,arrow按鍵將移動窗口,Shift+Arrow鍵將快速將窗口移向螢幕一側或另一個窗口的邊緣。Enter完成後按或其他鍵
  • 開始調整大小: Alt+F8將啟動調整大小。arrow鍵將調整視窗大小,Shift+Arrow鍵將調整邊緣或另一個視窗的大小。

使用隱藏的配置設置,可以定義更多用於視窗操作的自訂快捷方式。以下配置命令將為以下內容設定快捷鍵:

• 將視窗置中或快速移動到螢幕一側

gsettings set org.gnome.desktop.wm.keybindings move-to-center "['<Control><Super>c']"
gsettings set org.gnome.desktop.wm.keybindings move-to-side-e "['<Control><Super>Right']"
gsettings set org.gnome.desktop.wm.keybindings move-to-side-n "['<Control><Super>Up']"
gsettings set org.gnome.desktop.wm.keybindings move-to-side-s "['<Control><Super>Down']"
gsettings set org.gnome.desktop.wm.keybindings move-to-side-w "['<Control><Super>Left']"

這些是我定義的鍵綁定。您可以透過先編輯命令來選擇使用不同的鍵綁定。

• 將視窗定位在螢幕的一角

gsettings set org.gnome.desktop.wm.keybindings move-to-corner-ne "['<Control><Super>2']"
gsettings set org.gnome.desktop.wm.keybindings move-to-corner-nw "['<Control><Super>1']"
gsettings set org.gnome.desktop.wm.keybindings move-to-corner-se "['<Control><Super>4']"
gsettings set org.gnome.desktop.wm.keybindings move-to-corner-sw "['<Control><Super>3']"

• 水平和垂直最大化

gsettings set org.gnome.desktop.wm.keybindings maximize-horizontally "['<Control><Super>equal']"
gsettings set org.gnome.desktop.wm.keybindings maximize-vertically "['<Control><Super>backslash']"

也可以使用該實用程式來設定這些設定dconf-editor

相關內容