Skip to content

Commit

Permalink
Misc changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Narendra Joshi committed Dec 19, 2024
1 parent 46ec34c commit c8461f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 2 additions & 3 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -3809,9 +3809,8 @@ Argument STATE is maintained by `use-package' as it processes symbols."
(use-package tramp
:defer t
:init
(setq tramp-default-method "ssh"
tramp-persistency-file-name (expand-file-name "var/tramp"
user-emacs-directory))
(setq tramp-default-method "ssh")

:config
;; Make backups for tramp files in their original locations
(add-to-list 'backup-directory-alist
Expand Down
11 changes: 10 additions & 1 deletion lib/defs.el
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,11 @@ search keyword."
(lambda () with-selected-date-time)))
,@body))))

(defvar swap-ctrl-right-win-status nil)
(add-to-list 'mode-line-misc-info
'(:eval swap-ctrl-right-win-status)
t)

(defun swap-ctrl-right-win ()
(interactive)
(let* ((xkb-options-str (shell-command-to-string "gsettings get org.gnome.desktop.input-sources xkb-options"))
Expand All @@ -1189,7 +1194,11 @@ search keyword."
(vconcat xkb-options ["ctrl:swap_rwin_rctl"]))))
(shell-command (format "gsettings set org.gnome.desktop.input-sources xkb-options %s"
(shell-quote-argument (string-replace "\"" "'" (json-encode-array new-xkb-optoins)))))
(message "%s swap Right window with Right control." (if enabled? "Disabled" "Enabled"))))
(message "%s swap Right window with Right control."
(if enabled? "[Laptop]: Disabled" "[External]: Enabled"))
(setq swap-ctrl-right-win-status
(propertize (if enabled? "[L]" "[E]") 'face 'mode-line-dimmed))
(run-with-timer 60 nil (lambda () (setq swap-ctrl-right-win-status nil)))))


(defun pretty-format-temporarily ()
Expand Down

0 comments on commit c8461f6

Please sign in to comment.