updated things

This commit is contained in:
Chris Nutter committed 2020-09-24 21:18:11 -07:00
1 parent 622a9a90aa
commit df66b828b2
34 files changed
+303 -122

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
#! /usr/bin/env bash
kitty -e ncmpcpp
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
if [ $UID != 0 ] ; then
echo "Must be root!"
exit 1
fi
patch_dir=/home/$(logname)/.cache/wal
if [ ! "$1" = "" ] ; then
patch_dir=$1
fi
echo "Patch dir is $patch_dir"
vivaldi_path=$(dirname $(find /opt -name "vivaldi-bin"))
if [ "$vivaldi_path" = "" ] ; then
echo "Cannot find vivaldi path"
exit 2
fi
echo "Patching vivaldi located at $vivaldi_path"
# backup browser.html
cp "$vivaldi_path/resources/vivaldi/browser.html" "$vivaldi_path/resources/vivaldi/browser.html-$(date +%Y-%m-%dT%H-%M-%S)"
# add custom.js
if [ -f "$patch_dir/vivaldi.js" ] ; then
echo "Using js file: $path_dir/vivaldi.js"
# copy js
cp -f "$patch_dir/vivaldi.js" "$vivaldi_path/resources/vivaldi/style/custom.js"
# patch browser.html
js_patched=$(grep '<script src="style/custom.js"><\/script>' $vivaldi_path/resources/vivaldi/browser.html)
if [ "$js_patched" = "" ] ; then
echo "Browser.html have been patched"
sed -i -e 's/<\/body>/<script src="style\/custom.js"><\/script> <\/body>/' "$vivaldi_path/resources/vivaldi/browser.html"
fi
fi
+7
View File
@@ -0,0 +1,7 @@
#! /bin/bash
ls | sort -R | tail -$N | while read file; do
neofetch --ascii ~/.scripts/ascii/file
done
+3
View File
@@ -0,0 +1,3 @@
#! /bin/bash
cp ~/.cache/wal-discord/style.css ~/.config/discordcanary/0.0.103/modules/discord_desktop_core/ && cd ~/.config/discordcanary/0.0.103/modules/discord_desktop_core/ && mv style.css discord-custom.css
+12
View File
@@ -0,0 +1,12 @@
#! /usr/bin/env zsh
[[ ! "$1" ]] && echo './yt-rss-grab.sh [url]' && exit
ID=$(wget $1 -O - -q | grep -o -P '(channelId" content=.{0,25})' | cut -c 21-100)
#----------------------#
echo "https://www.youtube.com/feeds/videos.xml?channel_id=$ID"
exit
#----------------------#