summaryrefslogtreecommitdiff
path: root/.stumpwm.d/commands.lisp
diff options
context:
space:
mode:
Diffstat (limited to '.stumpwm.d/commands.lisp')
-rw-r--r--.stumpwm.d/commands.lisp34
1 files changed, 30 insertions, 4 deletions
diff --git a/.stumpwm.d/commands.lisp b/.stumpwm.d/commands.lisp
index 888f223..516938c 100644
--- a/.stumpwm.d/commands.lisp
+++ b/.stumpwm.d/commands.lisp
@@ -4,7 +4,7 @@
"Set wallpaper using feh"
(let ((wallpaper-dir "~/wallpapers/"))
(format t "Setting wallpaper: ~a~%" wallpaper-name)
- (stumpwm:run-shell-command (format nil "feh --bg-scale ~a~a" wallpaper-dir wallpaper-name))))
+ (run-shell-command (format nil "feh --bg-scale ~a~a" wallpaper-dir wallpaper-name))))
(defun thanos/set-wallpapers ()
@@ -14,13 +14,39 @@
;; Web jump (works for DuckDuckGo)
(defmacro make-web-jump (name prefix)
- `(defcommand ,(intern name) (search) ((:rest ,(concatenate 'string "Ask the " name ": ")))
+ `(defcommand ,(intern name) (search) ((:rest ,(concatenate 'string "Search with " name ": ")))
(nsubstitute #\+ #\Space search)
(run-shell-command (concatenate 'string ,prefix search))))
-(make-web-jump "Duck" "firefox https://duckduckgo.com/?q=")
+;; (defcommand nyxt () (search) ((:rest ,(concatenate 'string "Search with " name ": ")))
+;; (nsubstitute #\+ #\Space search)
+;; (run-shell-command (concatenate 'string "nyxt -r -e" "" search)))
+
+(make-web-jump "searxng" "nyxt https://search.thanosapollo.com/?q=")
(make-web-jump "Invidious" "firefox https://yewtu.be/search?q=")
+(ql:quickload :slynk)
+
+(defcommand sly-start-server () ()
+ "Start a slynk server for sly."
+ (sb-thread:make-thread (lambda () (slynk:create-server :dont-close t))))
+
+(defcommand sly-stop-server () ()
+ "Stop current slynk server for sly."
+ (sb-thread:make-thread (lambda () (slynk:stop-server 4005))))
+
+(defcommand nyxt-buffer-load (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: "))
+ (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))))
@@ -49,7 +75,7 @@
"kitty")))))
(when *initializing*
- (mapc #'stumpwm:run-shell-command
+ (mapc #'run-shell-command
'("picom"
"transmission-daemon"
"xsetroot -cursor_name left_ptr"))