hotalexnet/.cwmrc
2025-10-21 23:48:14 +08:00

133 lines
4.5 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# =========================================
# cwm极简桌面配置
# =========================================
# 设置Xft默认字体
#fontname "MesloLGM Nerd Font Mono:pixelsize=14:bold"
fontname "Sarasa Term SC Nerd:pixelsize=14:bold"
# 开启粘性分组模式
sticky yes
# 外观设置
borderwidth 2
color activeborder '#dcb232'
color inactiveborder '#565656'
color urgencyborder '#cc241d'
# 间隔设置(上下左右)
gap 32 29 2 2
# 窗口移动距离
moveamount 2
# 边缘粘附行为(窗口推动吸附边缘)
snapdist 10
# 设置菜单颜色
color font '#bcbdbc'
color selfont '#eeeec'
color menubg '#1c1c1c'
color menufg '#215d9c'
# 设置菜单启动程序
#command "Xterm终端" xterm
#command "Urxvt终端" urxvt
#command "文件管理器" xfe
#command "Firefox" firefox
#command "Chromium" ungoogled-chromium
#command "Vim编辑器" gvim
#command "Neovim编辑器" nvim-qt
#command "Office办公套件" libreoffice
#command "Media Player播放器" vlc
#command "照片管理器" shotwell
#command "PDF阅读器" atril
# ===================================
# 快捷键配置
# ===================================
# “C”---Ctrl键
# “M”---Meta键Alt键
# “S”---Shift键
# “4”---Super键Win键
# 关闭所有默认快捷键
unbind-key all
# 切换工作区
bind-key 4-1 group-only-1
bind-key 4-2 group-only-2
bind-key 4-3 group-only-3
bind-key 4-4 group-only-4
bind-key 4-5 group-only-5
bind-key 4-6 group-only-6
bind-key 4-7 group-only-7
bind-key 4-8 group-only-8
bind-key 4-9 group-only-9
# 切换分组可见性,不隐藏活动组
bind-key 4M-1 group-toggle-1
bind-key 4M-2 group-toggle-2
bind-key 4M-3 group-toggle-3
bind-key 4M-4 group-toggle-4
bind-key 4M-5 group-toggle-5
bind-key 4M-6 group-toggle-6
bind-key 4M-7 group-toggle-7
bind-key 4M-8 group-toggle-8
bind-key 4M-9 group-toggle-9
# 移动窗口到指定工作区
bind-key 4S-1 window-movetogroup-1
bind-key 4S-2 window-movetogroup-2
bind-key 4S-3 window-movetogroup-3
bind-key 4S-4 window-movetogroup-4
bind-key 4S-5 window-movetogroup-5
bind-key 4S-6 window-movetogroup-6
bind-key 4S-7 window-movetogroup-7
bind-key 4S-8 window-movetogroup-8
bind-key 4S-9 window-movetogroup-9
# 快速打开程序
bind-key 4-Return alacritty # win+enter 打开alacritty
bind-key 4-n nvim-qt # win+n 打开Neovim
bind-key 4-m firefox # win+m 打开firefox
bind-key 4S-Return /home/alex/bin/kitty-chinese.sh # win+shit+enter 打开kitty
# 窗口操作设置快捷键
bind-key 4-equal window-vmaximize # Win+= 窗口垂直最大化
bind-key 4S-equal window-hmaximize # Win+Shift+= 窗口水平最大化
bind-key 4-v window-maximize # Win+v 窗口最大化
bind-key 4-f window-fullscreen # Win+f 窗口全屏
bind-key 4-t window-vtile # Win+t 窗口垂直分列
bind-key 4S-t window-htile # Win+Shift+t 窗口水平分列
bind-key 4-c window-close # Win+c 关闭窗口
bind-key 4-u window-hide # Win+u 隐藏窗口
bind-key 4-j window-cycle # Win+j 窗口焦点正向循环
bind-key 4-k window-rcycle # Win+k 窗口焦点反向循环
bind-key 4S-h window-move-left # Win+Shift+h 向左移动窗口
bind-key 4S-j window-move-down # Win+Shift+j 向下移动窗口
bind-key 4S-k window-move-up # Win+Shift+k 向上移动窗口
bind-key 4S-l window-move-right # Win+Shift+l 向右移动窗口
bind-key 4M-h window-snap-left # Win+Alt+h 快速移动到屏幕左端
bind-key 4M-j window-snap-down # Win+Alt+j 快速移动到屏幕下端
bind-key 4M-k window-snap-up # Win+Alt+k 快速移动到屏幕上端
bind-key 4M-l window-snap-right # Win+Alt+l 快速移动到屏幕右端
# bind-key 4-e menu-exec # Win+e 快速打开交互式命令行
bind-key 4-r "rofi -show drun -theme gruvbox-dark -show-icons" # Win+r 快速打开rofi -show drun
bind-key 4-w "rofi -show window -theme gruvbox-dark -show-icons" # Win+w 快速打开rofi -show window
bind-key 4-e "rofi -show run -theme gruvbox-dark -show-icons" # Win+e 快速打开rofi -show run
bind-key 4-s "rofi -show ssh -theme gruvbox-dark -show-icons" # Win+s 快速打开rofi -show ssh
bind-key C-r restart # Ctrl+r 重启cwm
bind-key C-q quit # Ctrl+q 退出cwm
# 设置鼠标按键
bind-mouse M-1 window-move # 鼠标左击+Alt 移动窗口
bind-mouse M-2 window-lower # 鼠标中击+Alt 切换堆叠窗口
bind-mouse M-3 window-resize # 鼠标右击 改变窗口大小
autogroup 1 "xterm,xterm"
autogroup 2 "Firefox,Chromium"