summaryrefslogtreecommitdiff
path: root/.stumpwm.d
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-09-26 15:30:51 +0300
committerThanos Apollo <[email protected]>2023-09-26 15:30:51 +0300
commit696a16039e28e5844a164d69f60006b9c11a0067 (patch)
tree0c2c50e21687eb7584105f1589f94c8f274dfd41 /.stumpwm.d
parentf779356b6b8010ef38123a95e8ba0f0587a6f7c4 (diff)
[stumpwm] Update nyxt commands
Diffstat (limited to '.stumpwm.d')
-rw-r--r--.stumpwm.d/commands.lisp13
-rw-r--r--.stumpwm.d/keybindings.lisp5
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")