-
Notifications
You must be signed in to change notification settings - Fork 1
/
apps.lisp
46 lines (41 loc) · 2.01 KB
/
apps.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
(in-package :stumpwm-user)
(defcommand doom () ()
(uiop:launch-program (list "chocolate-doom" "-iwad" (home "/Documents/doom/GAME/DOOMU.WAD"))))
(defcommand doom2 () ()
(uiop:launch-program (list "chocolate-doom" "-iwad" (home "/Documents/doom2/DOOM2.WAD"))))
(defcommand doom-plutonia () ()
(uiop:launch-program (list "chocolate-doom" "-iwad" (home "/Documents/doom-plutonia/PLUTONIA.WAD"))))
(defcommand quake () ()
(uiop:launch-program (list "ioquake3.x86_64" "-height" "1200" "-width" "1600" "-condebug" "-mode" "4")))
(defcommand surf (&optional args/url) ((:string "URL "))
"Meta-command used in other commands to open URLs and search data."
(uiop:launch-program (cons "surf" (uiop:ensure-list args/url))))
(defcommand surf-proxy () ()
"Tor-proxied version of surf."
(uiop:launch-program "http_proxy=\"socks5://localhost:9050\" surf"))
(defcommand rlwrap (&optional impl) ((:string "Lisp implementation "))
"Run a chosen Common Lisp in ST with Readline (rlwrap)."
(uiop:launch-program (list "st" "rlwrap" "-c" "-b" "(){}[],^%$#@\"\";''|\\" "-q" "\"" impl)))
(defcommand ardshin () ()
(surf "https://ibanking.ardshinbank.am:4443/nibanking/login"))
(defcommand disroot () ()
(surf '("-S" "https://webmail.disroot.org")))
(defcommand proton () ()
(surf '("-S" "https://proton.me")))
(defcommand youtube () ()
(surf '("-S" "https://api.invidious.io/")))
(defcommand dict (&optional word) ((:string "Word to search: "))
(surf (format nil "http://wordnetweb.princeton.edu/perl/webwn?s=~a" word)))
(defcommand news () ()
(surf "https://news.ycombinator.com"))
(defcommand query (query) ((:string "Search query: "))
"Search the text via Surf."
(unless (member query '("" "NIL" nil) :test #'equalp)
(uiop:launch-program (format nil "surf \" ~a\"" query))))
(defcommand copy-surf-link () ()
"A hack until I figure out how to copy links directly from Surf."
(trivial-clipboard:text
(second
(uiop:split-string
(alexandria:lastcar
(uiop:read-file-lines #p"~/.local/share/surf/history.txt"))))))