summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--init.el61
-rw-r--r--lib/eos/jao-wayland.el3
2 files changed, 32 insertions, 32 deletions
diff --git a/init.el b/init.el
index 70a7224..76993c7 100644
--- a/init.el
+++ b/init.el
@@ -1035,37 +1035,36 @@
(define-key ctl-x-4-map (kbd "t") 'transpose-windows)
;;;; switch window
-(when (or window-system jao-wayland-enabled)
- (use-package switch-window
- :ensure t
- :custom ((switch-window-minibuffer-shortcut ?z)
- (switch-window-background t)
- (switch-window-shortcut-style 'qwerty)
- (switch-window-shortcut-appearance 'text)
- (switch-window-timeout 7)
- (switch-window-threshold 2))
- :config
- (defun jao-switch-window--then (prompt cmd)
- (let ((f `(lambda ()
- (let ((default-directory ,default-directory))
- (call-interactively ',cmd)))))
- (switch-window--then prompt f f)))
-
- (defun jao-switch-window-then-dired ()
- (interactive)
- (jao-switch-window--then "Find directory" 'dired))
-
- (defun jao-switch-window-then-find-file ()
- (interactive)
- (jao-switch-window--then "Find file" 'find-file))
-
- (defun jao-switch-window-then-consult-buffer ()
- (interactive)
- (jao-switch-window--then "Switch to buffer" 'consult-buffer))
-
- :bind (("C-x 4 d" . jao-switch-window-then-dired)
- ("C-x 4 f" . jao-switch-window-then-find-file)
- ("C-x 4 b" . jao-switch-window-then-consult-buffer))))
+(use-package switch-window
+ :ensure t
+ :custom ((switch-window-minibuffer-shortcut ?z)
+ (switch-window-background t)
+ (switch-window-shortcut-style 'qwerty)
+ (switch-window-shortcut-appearance 'text)
+ (switch-window-timeout 7)
+ (switch-window-threshold 2))
+ :config
+ (defun jao-switch-window--then (prompt cmd)
+ (let ((f `(lambda ()
+ (let ((default-directory ,default-directory))
+ (call-interactively ',cmd)))))
+ (switch-window--then prompt f f)))
+
+ (defun jao-switch-window-then-dired ()
+ (interactive)
+ (jao-switch-window--then "Find directory" 'dired))
+
+ (defun jao-switch-window-then-find-file ()
+ (interactive)
+ (jao-switch-window--then "Find file" 'find-file))
+
+ (defun jao-switch-window-then-consult-buffer ()
+ (interactive)
+ (jao-switch-window--then "Switch to buffer" 'consult-buffer))
+
+ :bind (("C-x 4 d" . jao-switch-window-then-dired)
+ ("C-x 4 f" . jao-switch-window-then-find-file)
+ ("C-x 4 b" . jao-switch-window-then-consult-buffer)))
;;;; winner mode
(winner-mode 1)
diff --git a/lib/eos/jao-wayland.el b/lib/eos/jao-wayland.el
index 104bd23..c500d19 100644
--- a/lib/eos/jao-wayland.el
+++ b/lib/eos/jao-wayland.el
@@ -91,7 +91,8 @@
(when page (sit-for 0.2) (jao-wayland-type (format "%dg" page)))))
(defun jao-river-set-wallpaper (f)
- (jao-shell-exec (concat "swaybg -m fill -i " f " &")))
+ (jao-shell-kill-p "swaybg")
+ (jao-shell-exec* "riverctl" "spawn" (concat "swaybg -m fill -i " f)))
(defun jao-river-restart-i3bar ()
(interactive)