;; Toggle window type between default and unframed
(defun toggle-window-frame (cur-win)
"Toggle window type between default and unframed"
(interactive)
(if (= (window-type cur-win) 'unframed)
(set-window-type cur-win 'default)
(set-window-type cur-win 'unframed)))
(bind-keys window-keymap
"Super-f" `(toggle-window-frame (input-focus)))
•Win+Ctrl+1~9:将窗口添加到指定组,这就像是在玩星际编队。
;; Window group related functions
(bind-keys window-keymap
"Super-C-1" `(progn
(let ((cur-win (input-focus)))
(add-window-to-group cur-win 1)
(display-close-message (concat "Window " (window-name (input-focus)) " added to group " (number->string 1)) alert-msg-time alert-msg-attrib))))
(bind-keys window-keymap
"Super-C-2" `(progn
(let ((cur-win (input-focus)))
(add-window-to-group cur-win 1)
(display-close-message (concat "Window " (window-name (input-focus)) " added to group " (number->string 2)) alert-msg-time alert-msg-attrib))))
(bind-keys window-keymap
"Super-C-3" `(progn
(let ((cur-win (input-focus)))
(add-window-to-group cur-win 1)
(display-close-message (concat "Window " (window-name (input-focus)) " added to group " (number->string 3)) alert-msg-time alert-msg-attrib))))
(bind-keys window-keymap
"Super-C-4" `(progn
(let ((cur-win (input-focus)))
(add-window-to-group cur-win 1)
(display-close-message (concat "Window " (window-name (input-focus)) " added to group " (number->string 4)) alert-msg-time alert-msg-attrib))))
(bind-keys window-keymap
"Super-C-5" `(progn
(let ((cur-win (input-focus)))
(add-window-to-group cur-win 1)
(display-close-message (concat "Window " (window-name (input-focus)) " added to group " (number->string 5)) alert-msg-time alert-msg-attrib))))
(bind-keys window-keymap
"Super-C-6" `(progn
(let ((cur-win (input-focus)))
(add-window-to-group cur-win 1)
(display-close-message (concat "Window " (window-name (input-focus)) " added to group " (number->string 6)) alert-msg-time alert-msg-attrib))))
(bind-keys window-keymap
"Super-C-7" `(progn
(let ((cur-win (input-focus)))
(add-window-to-group cur-win 1)
(display-close-message (concat "Window " (window-name (input-focus)) " added to group " (number->string 7)) alert-msg-time alert-msg-attrib))))
(bind-keys window-keymap
"Super-C-8" `(progn
(let ((cur-win (input-focus)))
(add-window-to-group cur-win 1)
(display-close-message (concat "Window " (window-name (input-focus)) " added to group " (number->string 8)) alert-msg-time alert-msg-attrib))))
(bind-keys window-keymap
"Super-C-9" `(progn
(let ((cur-win (input-focus)))
(add-window-to-group cur-win 1)
(display-close-message (concat "Window " (window-name (input-focus)) " added to group " (number->string 9)) alert-msg-time alert-msg-attrib))))
•Win+i:最小化窗口
(defun iconify-current-group (cur-win)
"Iconify current window group"
(interactive "%f")
(iconify-group cur-win))
Win+m:在最大化与窗口当前大小间切换
Win+Shift+v:将窗口在垂直方向上放大
Win+Shift+h:将窗口在水平方向上放大
Win+k:杀掉当前窗口
Win+t:在窗口提升一层与下降一层间切换
Win+d:显示桌面
Win+s:在窗口正常状态与收起状态间切换。所谓的收起即将窗口内容隐藏,只剩下标题栏
Ctrl+Alt+left, right, up, down:在四个桌面间切换
Win+left, right, up, down:让当前窗口向不同方向移动直至碰到屏幕边界或另一个窗口的边界
Win+w:显示所有桌面菜单
Win+SPC:显示当前窗口菜单
Win+r:显示Sawfish桌面右键菜单
Win+a:显示系统应用菜单
Win+TAB:在窗口间循环
Win+Ctrl+TAB:在窗口间反向循环
Win+l:显示窗口列表菜单
Win+`:执行Sawfish函数
Ctrl+Alt+r:重启Sawfish
Ctrl+Alt+q:退出Sawfish
7. 显示笔记本电池信息:调用了acpi命令,快捷键为Win+b,代码如下: