summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorstuebinm2024-01-13 22:11:28 +0100
committerstuebinm2024-01-13 22:11:28 +0100
commitcd61de24db03e34fac9fcbc11c8257af9099a376 (patch)
treebe616e311f5f4a80bcfc99392394c4f92b7e09af /home
parentb2fc20fe8080e4c083b08354afdce287a91de0b7 (diff)
home: shell function to add emojis to akkoma
Diffstat (limited to 'home')
-rw-r--r--home/home.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/home/home.nix b/home/home.nix
index 15d8e50..a924ab9 100644
--- a/home/home.nix
+++ b/home/home.nix
@@ -148,6 +148,22 @@
out;
" | jq '.elements[].tags.ref | select(. != null)' | sort
'';
+ functions.stealemoji.body = ''
+ if [ (expr (count $argv) % 2) != 0 ]
+ echo wrong count of arguments
+ exit 1
+ end
+ set n (expr (count $argv) / 2)
+ echo stealing $n emoji
+ mkdir -p /tmp/stealemoji
+ for i in (seq $n)
+ echo stealing $i
+ curl -s $argv[$i] > /tmp/$argv[(expr $i + 1)].png
+ end
+ cd /tmp
+ scp $argv[(seq 2 2 (expr $n + 1))].png flora:/var/lib/containers/pleroma/var/lib/akkoma/static/emoji/unsorted/
+ ssh flora machinectl shell pleroma /bin/sh -c \"pleroma_ctl emoji reload\"
+ '';
};
programs.kitty = {