This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
doc=' | |
spell: check spelling of a word | |
usage: spell <word> [number] | |
"number": number of close matches that are shown if the word is spelled incorrectly | |
' | |
[ -z "$1" ] \ | |
&& echo "$doc" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# usage: "automate <text file>", where a text file contains a list of commands | |
# commands: | |
# move <x> <y> - moves the mouse an xy position | |
# click - click the mouse | |
# right_click - right-click the mouse | |
# key <key> - press a key on the keyboard | |
# pause <seconds> - wait some time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Script to easily find xy values for moving the mouse | |
# This is a helper script for the "automate" script | |
# Usage: xy <list of titles> | |
# E.g. you are on youtube and want to move the mouse to a video thumbnail | |
# (maybe clicking it), then to the youtube logo | |
# You would do: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
doc=' | |
cl: clock utility | |
this is just a wrapper around the commands by "terdon": https://superuser.com/a/611582 | |
countdown: cl c <seconds> ["command to be run after finishing it"] | |
stopwatch: cl s | |
c stands for countdown and s stands for stopwatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# a case statement works way better than the terrible xdg-open | |
# usage: msk_open <file> | |
# Get the raw filetype | |
type=$(file -i "$1") | |
# Parse file -i | |
type=${type#*: } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
unread=$XDG_CONFIG_HOME/msk/rss/rss_unread | |
marked=$XDG_CONFIG_HOME/msk/rss/rss_marked | |
touch "$marked" | |
case "$1" in | |
get|mark|mark_get) [ "$2" ] || . err ;; | |
esac | |
missed() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
[ -z "$1" -o -z "$2" ] && . err | |
music_dir=$1 | |
tracks=$2 | |
# Otherwise wc could error on a non-existent | |
[ -f "$tracks" ] || touch "$tracks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- old | |
+++ new | |
@@ -35,7 +35,7 @@ | |
0) echo 'No more tracks in queue. Please refresh the database, or set $MSK_MUSIC_REFRESH.' && exit 1 ;; | |
# No tracks, but user wants automatic refreshing | |
- 1) find "$MUSIC_DIR" -type f | shuf > "$XDG_DATA_HOME/msk_music/tracks" ;; | |
+ 1) find "$MUSIC_DIR" -type f -name "*.mp4" | shuf > "$XDG_DATA_HOME/msk_music/tracks" ;; | |
esac | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# msk_pass: uses bpass in dmenu | |
# use in sxhkd | |
picked=$(ls $BP_HOME | dmenu) | |
[ $picked ] && exit | |
master=$(:| dmenu) | |
[ $master ] && exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
doc=' | |
msk_display: display a short text in an image using imagemagick | |
useful for e.g. showing Japanese characters in a proper font | |
usage: msk_display "<text>" | |
sxiv is not called with &, so you might want to run msk_display ... & | |
' |
OlderNewer