diff options
Diffstat (limited to '.config')
| -rw-r--r-- | .config/emacs/init.el | 8 | ||||
| m--------- | .config/emacs/lisp/proj | 0 | ||||
| l--------- | .config/emacs/lisp/toggle-window.el | 1 | ||||
| -rw-r--r-- | .config/emacs/lisp/toggle-window/toggle-window.el | 23 | ||||
| -rw-r--r-- | .config/sway/config | 4 |
5 files changed, 36 insertions, 0 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 25f5311..9f80569 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -536,5 +536,13 @@ (setq proj-locations '("~/development/" "~/opt/" "~/classes/psoft/" "~/classes/parallel-programming/" "~/classes/operating-systems/") proj-find-params '("-mindepth 1" "-maxdepth 1" "-path '*/.git'" "-prune -o" "-type d" "-print")) + (global-set-key (kbd "C-x b") `proj-switch-to-buffer) (global-set-key (kbd "C-c b") `switch-to-buffer) + +(global-set-key (kbd "C-x k") `proj-kill-buffer) +(global-set-key (kbd "C-c k") `kill-buffer) + +;; == toggle-window +(require 'toggle-window) +(global-set-key (kbd "C-c w") 'toggle-window) diff --git a/.config/emacs/lisp/proj b/.config/emacs/lisp/proj -Subproject b84a1feb35a528d6bcfa4e807c0b416d23dfeeb +Subproject 2c3e7050a2cf6d51dd274f7a03721d1fdb8fbf3 diff --git a/.config/emacs/lisp/toggle-window.el b/.config/emacs/lisp/toggle-window.el new file mode 120000 index 0000000..1da50be --- /dev/null +++ b/.config/emacs/lisp/toggle-window.el @@ -0,0 +1 @@ +toggle-window/toggle-window.el
\ No newline at end of file diff --git a/.config/emacs/lisp/toggle-window/toggle-window.el b/.config/emacs/lisp/toggle-window/toggle-window.el new file mode 100644 index 0000000..28c7c62 --- /dev/null +++ b/.config/emacs/lisp/toggle-window/toggle-window.el @@ -0,0 +1,23 @@ +(defvar toggle-window-configuration nil + "Stores the window configuration") + +;; should rewrite to not do the save configuration thing + +(defun toggle-window () + (interactive) + (if (count-windows) + (if (one-window-p) + ;; reset configuration if single window + (if toggle-window-configuration + (progn + (set-window-configuration toggle-window-configuration) + (setq toggle-window-configuration nil)) + (message "No previous window layout to restore.")) + ;; if multiple windows save configuration + (setq toggle-window-configuration (current-window-configuration)) + ;; delete current or other window + (if (derived-mode-p 'compilation-mode) + (delete-window) + (delete-other-windows))))) + +(provide 'toggle-window) diff --git a/.config/sway/config b/.config/sway/config index 6d80b11..62830c8 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -71,6 +71,10 @@ default_border pixel # Start screen locker bindsym $mod+Ctrl+l exec lock + # screenshot + bindsym $mod+s exec screenshot + bindsym $mod+Shift+s exec screenshot -save + # Drag floating windows by holding down $mod and left mouse button. floating_modifier $mod normal |
