add fez/screenshot and fez/swap-keyboard

This commit is contained in:
opfez 2021-08-11 17:38:44 +02:00
parent 0661bb9825
commit 87e774c516
1 changed files with 15 additions and 0 deletions

View File

@ -181,6 +181,21 @@
(message (concat "Mouse "
(if x-mouse-on "enabled." "disabled."))))
(defun fez/screenshot ()
"Prompts the user for a filename and saves a screenshot at that path."
(interactive)
(let ((path (read-string "Filename: ")))
(shell-command (concat "import -window root "
path))))
(setq current-layout "nous")
(defun fez/swap-keyboard ()
"Swap between my selected keyboard layouts."
(interactive)
(cond ((string= current-layout "nous") (setq current-layout "ru"))
(t (setq current-layout "nous")))
(shell-command (concat "setxkbmap " current-layout)))
;; Eshell convinience commands.
(defalias 'open 'find-file-other-window)
(defalias 'clean 'eshell/clear-scrollback)