Alt + F7
Super + F7
Ctrl + Alt + C
Ctrl + Alt + Up/Left/Right/Down
sudo apt install compizconfig-settings-manager
# 确保已安装 Chrome GNOME Shell sudo apt install chrome-gnome-shell # 浏览器访问:https://extensions.gnome.org # 搜索并安装 "gTile"
Super + Enter
#!/bin/bash # save as ~/center_window.sh # 获取当前活动窗口ID window_id=$(xdotool getactivewindow) # 获取屏幕尺寸 screen_width=$(xdpyinfo | awk '/dimensions:/ {print $2}' | cut -d'x' -f1) screen_height=$(xdpyinfo | awk '/dimensions:/ {print $2}' | cut -d'x' -f2) # 获取窗口尺寸 window_geometry=$(xdotool getwindowgeometry --shell $window_id) eval $window_geometry # 计算居中位置 pos_x=$(( (screen_width - WIDTH) / 2 )) pos_y=$(( (screen_height - HEIGHT) / 2 )) # 移动窗口 xdotool windowmove $window_id $pos_x $pos_y
chmod +x ~/center_window.sh # 安装依赖 sudo apt install xdotool x11-utils
sudo apt install wmctrl wmctrl -r :ACTIVE: -e 0,$(( ($(xrandr | grep current | awk '{print $8}') - 800) / 2 )),$(( ($(xrandr | grep current | awk '{print $10}' | sed 's/,//') - 600) / 2 )),800,600
对于大多数用户,推荐以下组合:
注意:不同桌面环境(GNOME、KDE、XFCE)的具体操作略有差异,上述方法主要针对 GNOME/Unity 环境。KDE 用户可在 System Settings → Window Management → Window Behavior 中找到相关选项。