All your codebase are belong to us.

This commit is contained in:
coolnsx
2023-05-01 13:50:56 +05:30
parent 9fb07b739f
commit f9dc5f8759
5 changed files with 54 additions and 0 deletions

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "fzf-tab"]
path = fzf-tab
url = https://github.com/Aloxaf/fzf-tab

13
eww/music-presence.py Normal file
View File

@@ -0,0 +1,13 @@
from pypresence import Presence
import re, json
from time import time
RPC = Presence("1086258743823564903")
RPC.connect()
with open("/tmp/yt-music/current",'r') as file:
li = re.split(' >|: | - ',file.readline().strip('\n'))
file.close()
RPC.update(large_image=f"https://i.ytimg.com/vi/{li[-1]}/mqdefault.jpg",details=f"{li[1]}",state=li[2],small_image="/home/tanveer/Downloads/kisspng-mpv-logo-computer-software-5b0b2bfe514221.6053513215274588143328.png",start=time.time())

1
fzf-tab Submodule

Submodule fzf-tab added at 5a81e13792

36
hypr/bkmark Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/sh
#script for bookmarking selected items and later using it..
data="$(wl-paste -p | tr '\n' '\`' | sed 's/$/ /g')"
file="$HOME/.cache/bookmarks"
oshi_file="$HOME/.cache/oshi-urls"
case $1 in
add)
if [ -z "$data" ];then
notify-send "Please select anything to bookmark"
elif grep -q "${data}" "$file";then
notify-send -i "bookmark-missing" "Already bookmarked"
else
printf "%s" "$data" >> "$file"
notify-send -i "user-bookmarks" "Bookmarked" "$data"
fi
;;
rm)
data="$(sed '/^$/d' "$file" | nl -n'ln')"
[ -z "$data" ] && notify-send "Bookmark is empty" && exit 0
del=$(printf "%s" "$data" | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 30 -p "delete-bookmark :" | cut -f1)
[ -z "$del" ] || (sed -i "${del}d" "$file" && notify-send -i "bookmark-missing" "Bookmark deleted" -u critical)
;;
copy)
sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 30 -p "Put-bookmark :" | tr '\`' '\n' | wl-copy && notify-send "Copied to clipboard" -i "com.github.davidmhewitt.clipped"
;;
*)
wtype -d 10 "$(sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 30 -p "Put-bookmark :" | tr '\`' '\n')"
;;
esac
sed -i '/^$/d' "$file"
printf "\n" >> "$file"

1
mpv/mpv.conf Normal file
View File

@@ -0,0 +1 @@
#hwdec=auto