diff options
-rw-r--r-- | .stumpwm.d/commands.lisp | 13 | ||||
-rw-r--r-- | .stumpwm.d/keybindings.lisp | 5 |
2 files changed, 13 insertions, 5 deletions
diff --git a/.stumpwm.d/commands.lisp b/.stumpwm.d/commands.lisp index 516938c..da88a18 100644 --- a/.stumpwm.d/commands.lisp +++ b/.stumpwm.d/commands.lisp @@ -35,18 +35,25 @@ "Stop current slynk server for sly." (sb-thread:make-thread (lambda () (slynk:stop-server 4005)))) -(defcommand nyxt-buffer-load (search) +(defcommand nyxt-buffer-search (search) ((:string "Search for: ")) (let ((url "https://search.thanosapollo.com/?q=")) (run-shell-command (concatenate 'string "nyxt -r -e '(buffer-load" "\"" url search "\"" ")'" )))) -(defcommand nyxt-new-buffer-load (search) - ((:string "Search for: ")) +(stumpwm:defcommand nyxt-buffer-url (search) + ((:string "Set URL: ")) + (let ((url "https://search.thanosapollo.com/?q=")) + (stumpwm:run-shell-command + (concatenate 'string "nyxt -r -e '(buffer-load" "\"" search "\"" ")'" )))) + +(defcommand nyxt-new-buffer-search (search) + ((:string "New Buffer Search for: ")) (let ((url "https://search.thanosapollo.com/?q=")) (run-shell-command (concatenate 'string "nyxt -r -e '(set-url-new-buffer :url" "\"" url search "\"" ")'" )))) + (defcommand firefox () () "Run or raise Firefox." (sb-thread:make-thread (lambda () (run-or-raise "firefox" '(:class "firefox") t nil)))) diff --git a/.stumpwm.d/keybindings.lisp b/.stumpwm.d/keybindings.lisp index 7586047..f59a004 100644 --- a/.stumpwm.d/keybindings.lisp +++ b/.stumpwm.d/keybindings.lisp @@ -76,8 +76,9 @@ (define-key *root-map* (kbd "M-f") "move-window right") (define-key *root-map* (kbd "M-n") "move-window down") ;; Nyxt -(define-key *root-map* (kbd "s") "nyxt-buffer-load") -(define-key *root-map* (kbd "C-s") "nyxt-new-buffer-load") +(define-key *root-map* (kbd "s") "nyxt-buffer-search") +(define-key *root-map* (kbd "M-s") "nyxt-new-buffer-search") +(define-key *root-map* (kbd "C-s") "nyxt-buffer-url") ;; Productivity (load-module "productivity") (define-key *top-map* (kbd "F7") "productivity-mode-toggle") |