Archived
updated things
This commit is contained in:
1 parent
622a9a90aa
commit
df66b828b2
34 files changed
+303
-122
No files matched your search
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
kitty -e ncmpcpp
|
||||
Executable
+41
@@ -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
|
||||
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#! /bin/bash
|
||||
|
||||
ls | sort -R | tail -$N | while read file; do
|
||||
|
||||
neofetch --ascii ~/.scripts/ascii/file
|
||||
|
||||
done
|
||||
Executable
+3
@@ -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
|
||||
Executable
+12
@@ -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
|
||||
|
||||
#----------------------#
|
||||
Reference in new issue
Block a user