Title: How to write modi scripts ...
rofi can call a script as a modi.
To do this your script must do the following:
- The last argument of the script is reserved for
rofi. It must be allowed to be omitted. - When the mode is first activated,
Title: How to write modi scripts ...
rofi can call a script as a modi.
To do this your script must do the following:
rofi.
It must be allowed to be omitted.| copy NodeBuilder Fib; | |
| { | |
| copy Int x; | |
| -> x; | |
| ( | |
| (x, 1) -> eq, | |
| { | |
| 1 ->; | |
| }, | |
| { |
| #!/bin/zsh | |
| lunar | | |
| sed -n "s/[^0-9]/ /g;4p;6p" | | |
| xargs | | |
| awk '{printf "%c%c%02i.%02i%c\n", $5 + 64, $6 + 64, $2, $3, $12 + 96}' | |
| # Format: < Format string > < Year > <M> <D> < Hour > |
| #!/usr/local/bin/sbcl --script | |
| (load "~/quicklisp/setup.lisp") | |
| (ql:quickload '(:yason :drakma) :silent t) | |
| (let ((drakma:*text-content-types* `(("application" . "json") | |
| ("text" . "json") | |
| ,@drakma:*text-content-types*)) | |
| (yason:*parse-object-as* :alist)) | |
| (with-open-file (s (make-pathname :name "cache" | |
| :type "conf" |
| #!/usr/bin/python3 | |
| import configparser | |
| import os | |
| try: | |
| configFile = os.path.dirname(os.path.realpath(__file__)) + '/warnings.conf' | |
| except NameError: | |
| configFile = os.path.dirname(os.path.realpath( | |
| "~/.config/i3blocks/blocks/wwarn")) + '/warnings.conf' |
| #!/bin/zsh | |
| here=$(dirname ${(%):-%N}) | |
| case $BLOCK_BUTTON in | |
| 1) | |
| sed -i -n '2p;2p' $here/cache.conf;; | |
| 4) | |
| i3-msg 'workspace prev_on_output' | |
| exit 1 | |
| ;; |
| ./Book 23/01a-Dr-Introduction.jpg | |
| ./Book 23/02a-Dr-Inventory and syllable structure.jpg | |
| ./Book 23/03a-Dr-Vowel insertion.jpg | |
| ./Book 23/04a-Dr-Phonoruns.jpg | |
| ./Book 23/05a-Dr-Orthography.jpg | |
| ./Book 23/06a-Dr-Phonotactics.jpg | |
| ./Book 23/10a-Dr-Noun morphology.jpg | |
| ./Book 23/11a-Dr-Toponymy.jpg | |
| ./Book 23/12a-Dr-Digits.jpg | |
| ./Book 23/13a-Dr-CAT SMAJ and CAT STAR.jpg |
| #!/usr/bin/python3 | |
| import os | |
| import sys | |
| import ephem | |
| import datetime | |
| import pytz | |
| import colorlover as colours | |
| import yaml | |
| import math |
| ;; Add these faces to custom. I don't know how to set them otherwise. | |
| (custom-set-faces | |
| ;; custom-set-faces was added by Custom. | |
| ;; If you edit it by hand, you could mess it up, so be careful. | |
| ;; Your init file should contain only one such instance. | |
| ;; If there is more than one, they won't work right. | |
| '(window-divider ((t (:foreground "#161A1F")))) | |
| '(window-divider-first-pixel ((t (:foreground "#161A1F")))) | |
| '(window-divider-last-pixel ((t (:foreground "gray20"))))) |
| #!/bin/bash | |
| # prints now playing from Clementine | |
| # Clicking on the button changes the output. | |
| display=/tmp/clnp | |
| case $BLOCK_BUTTON in | |
| 1) # Left click cycles the display | |
| case "$(< $display)" in | |
| "title") echo "album" > $display;; | |
| "album") echo "artist" > $display;; |