needs more cow bell

This commit is contained in:
coolnsx
2024-05-08 11:29:40 +05:30
parent d61cca5ee6
commit b682387f38
10 changed files with 57 additions and 38 deletions

1
.gitignore vendored
View File

@@ -22,3 +22,4 @@ btop
xpra xpra
psysh psysh
zoom* zoom*
.env

View File

@@ -103,7 +103,7 @@
frame_width = 3 frame_width = 3
# Defines color of the frame around the notification window. # Defines color of the frame around the notification window.
frame_color = "#D81860" frame_color = "#6FAAFF"
# Size of gap to display between notifications - requires a compositor. # Size of gap to display between notifications - requires a compositor.
# If value is greater than 0, separator_height will be ignored and a border # If value is greater than 0, separator_height will be ignored and a border

11
env.example Normal file
View File

@@ -0,0 +1,11 @@
NTFY_URL=
NTFY_TOKEN=
DISCORD_URL=
DISCORD_TOKEN=
DISCORD_SERVER_ID=
NC_URL=
NC_USER=
NC_TOKEN=
NC_SHARE_PATH=

View File

@@ -4,8 +4,10 @@ datadir="/tmp/yt-music"
case $1 in case $1 in
songdata) songdata)
if [ -f "$datadir/current" ];then if [ -f "$datadir/current" ];then
# shellcheck source=/tmp/yt-music/current
. "$datadir/current"
out=$(printf '{ "command": ["get_property", "pause"]}\n' | socat - "$datadir/yt-music-mpvsocket" 2>/dev/null) out=$(printf '{ "command": ["get_property", "pause"]}\n' | socat - "$datadir/yt-music-mpvsocket" 2>/dev/null)
printf '{"name":"%s","artist":"%s","cover":"%s","next":"%s","prev":"%s"}' "$(cut -d'>' -f1 < "$datadir/current" | cut -d':' -f2- | sed 's|[^-]*$||g;s|-$||g;s| $||g;s|^ ||g')" "$(cut -d'>' -f1 < "$datadir/current" | sed 's_.* - __;s| $||')" "$datadir/default.jpg" "$(sed -n "/$(cut -d'>' -f2 < "$datadir/current" )/{n;p}" $datadir/next | cut -f1)" "$(sed -n "$(cat $datadir/counter)p" $datadir/next | cut -f1)" printf '{"name":"%s","artist":"%s","cover":"%s","next":"%s","prev":"%s"}' "$SONG" "$ARTIST" "$datadir/default.jpg" "$(sed -n "/$ID/{n;p}" $datadir/next | cut -f1)" "$(sed -n "$(cat $datadir/counter)p" $datadir/next 2>/dev/null | cut -f1)"
else else
printf '{"name":"OFFLINE","artist":"offline","cover":"%s/.config/eww/music.png"}' "$HOME" printf '{"name":"OFFLINE","artist":"offline","cover":"%s/.config/eww/music.png"}' "$HOME"
fi fi
@@ -41,6 +43,6 @@ case $1 in
pgrep -f mpvsocket >/dev/null 2>&1 && counter=$(cat "$datadir/counter") && [ "$counter" -gt 0 ] && "$HOME/repos_scripts/yt-music" play "$(sed -n "${counter}p" "$datadir/next")" && printf "%s" "$((counter-1))" > "$datadir/counter" & pgrep -f mpvsocket >/dev/null 2>&1 && counter=$(cat "$datadir/counter") && [ "$counter" -gt 0 ] && "$HOME/repos_scripts/yt-music" play "$(sed -n "${counter}p" "$datadir/next")" && printf "%s" "$((counter-1))" > "$datadir/counter" &
;; ;;
seek) seek)
echo "{\"command\" :[\"seek\" ,\"$2\",\"relative-percent\"]}" | socat - "$datadir/yt-music-mpvsocket" echo '{"command" :["seek" ,"'"$2"'","relative-percent"]}' | socat - "$datadir/yt-music-mpvsocket"
;; ;;
esac esac

View File

@@ -29,7 +29,9 @@ case $1 in
[ -z "$del" ] || (sed -i "${del}d" "$file" && notify-send -e -i "bookmark-missing" "Bookmark deleted" -u critical) [ -z "$del" ] || (sed -i "${del}d" "$file" && notify-send -e -i "bookmark-missing" "Bookmark deleted" -u critical)
;; ;;
copy) copy)
sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | menu "COPY-bookmark :" | tr '\`' '\n' | wl-copy && notify-send -e "Copied to clipboard" -i "com.github.davidmhewitt.clipped" data=$(sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | menu "COPY-bookmark :" | tr '\`' '\n')
[ -z "$data" ] && notify-send -e -u critical "No Bookmark selected" && exit 1
printf '%s' "$data" | wl-copy && notify-send -e "Copied to clipboard" -i "com.github.davidmhewitt.clipped"
;; ;;
*) *)
result="$(sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | menu "Put-bookmark :" | tr '\`' '\n')" result="$(sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | menu "Put-bookmark :" | tr '\`' '\n')"

View File

@@ -1,6 +1,6 @@
# See https://wiki.hyprland.org/Configuring/Monitors/ # See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,highrr,auto,1.5,bitdepth,10 monitor=,highrr,auto,1.5,bitdepth,10
monitor=HDMI-A-1,3840x2160,auto,2,bitdepth,10 #monitor=HDMI-A-1,3840x2160,auto,2,bitdepth,10
$hypr_dir="$HOME/.config/hypr" $hypr_dir="$HOME/.config/hypr"
$accent=6FAAFF $accent=6FAAFF
@@ -209,7 +209,6 @@ windowrulev2=workspace 4,class:^(virt-manager)$
windowrulev2 = bordercolor rgba(64f2a4FF), xwayland: 1 windowrulev2 = bordercolor rgba(64f2a4FF), xwayland: 1
#workspace rules #workspace rules
#workspace = 1, on-created-empty:-chrome-stable
workspace = 1, on-created-empty:$browser workspace = 1, on-created-empty:$browser
workspace = 2, on-created-empty:foot workspace = 2, on-created-empty:foot
workspace = special, on-created-empty:[float] foot workspace = special, on-created-empty:[float] foot

View File

@@ -5,6 +5,7 @@ top -ibn5 -d1 | while read -r line;do
new_mem=$(printf "%s" "$line" | sed -nE 's_MiB Mem :[[:space:]]*(.*) total,.*,[[:space:]]*(.*) used,.*_\2 MB / \1 MB_p') new_mem=$(printf "%s" "$line" | sed -nE 's_MiB Mem :[[:space:]]*(.*) total,.*,[[:space:]]*(.*) used,.*_\2 MB / \1 MB_p')
cpu=${new_cpu:-$cpu} cpu=${new_cpu:-$cpu}
mem=${new_mem:-$mem} mem=${new_mem:-$mem}
[ -f "/tmp/yt-music/current" ] && . /tmp/yt-music/current
if [ -n "$new_mem" ];then if [ -n "$new_mem" ];then
temp=$(cat /sys/class/thermal/thermal_zone0/temp) temp=$(cat /sys/class/thermal/thermal_zone0/temp)
@@ -14,6 +15,6 @@ top -ibn5 -d1 | while read -r line;do
charge=$(cat /sys/class/power_supply/BAT0/capacity) charge=$(cat /sys/class/power_supply/BAT0/capacity)
[ "$bat_stats" = "Discharging" ] && { [ "$charge" -lt 20 ] && bat_icon=🪫 || bat_icon=🔋 ;} || bat_icon=🔌 [ "$bat_stats" = "Discharging" ] && { [ "$charge" -lt 20 ] && bat_icon=🪫 || bat_icon=🔋 ;} || bat_icon=🔌
[ "$vol_stats" = "muted" ] && vol_icon=🔇 || vol_icon=🔊 [ "$vol_stats" = "muted" ] && vol_icon=🔇 || vol_icon=🔊
notify-send -e -i "lol" "<----------(STATS)---------->" "🧠 CPU usage : $cpu\n🌡 Cpu Temp : $temp °C\n🔳 RAM : $mem\n$bat_icon Battery : $charge (${bat_stats})\n☀ Brightness : $("$(dirname "$0")"/brightness s)%\n$vol_icon Volume : $vol_stats\n🎵 $(cut -d ">" -f1 /tmp/yt-music/current 2>/dev/null | cut -d":" -f2)" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1500 & notify-send -e -i "lol" "<----------(STATS)---------->" "🧠 CPU usage : $cpu\n🌡 Cpu Temp : $temp °C\n🔳 RAM : $mem\n$bat_icon Battery : $charge (${bat_stats})\n☀ Brightness : $("$(dirname "$0")"/brightness s)%\n$vol_icon Volume : $vol_stats\n🎵 $SONG - $ARTIST" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1500 &
fi fi
done done

View File

@@ -25,7 +25,7 @@ underline_shortcut=1
wheel_scroll_lines=3 wheel_scroll_lines=3
[SettingsWindow] [SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x3v\0\0\x4U\0\0\0\0\0\0\0\0\0\0\a\x7f\0\0\x4\x37\0\0\0\0\x2\0\0\0\a\a\0\0\0\0\0\0\0\0\0\0\x3v\0\0\x4U) geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x3\xb3\0\0\x4\xa1\0\0\0\0\0\0\0\0\0\0\x3\xbf\0\0\x4\xaf\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\x3\xb3\0\0\x4\xa1)
[Troubleshooting] [Troubleshooting]
force_raster_widgets=1 force_raster_widgets=1

View File

@@ -25,7 +25,7 @@ underline_shortcut=1
wheel_scroll_lines=3 wheel_scroll_lines=3
[SettingsWindow] [SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\aq\0\0\x4)\0\0\0\0\0\0\0\0\0\0\aq\0\0\x4)\0\0\0\0\0\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\aq\0\0\x4)) geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x3\xb3\0\0\x4\xa1\0\0\0\0\0\0\0\0\0\0\x3\xbf\0\0\x4\xaf\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\x3\xb3\0\0\x4\xa1)
[Troubleshooting] [Troubleshooting]
force_raster_widgets=1 force_raster_widgets=1

View File

@@ -39,6 +39,7 @@ megamind() {
printf '\n' printf '\n'
unset len unset len
} }
gtb() { gtb() {
[ -z "$*" ] && br=$(git branch -a | fzf --border=rounded --layout=reverse --height=10 | tr -d ' ') || br=$* [ -z "$*" ] && br=$(git branch -a | fzf --border=rounded --layout=reverse --height=10 | tr -d ' ') || br=$*
[ -z "$br" ] || git checkout $br [ -z "$br" ] || git checkout $br
@@ -148,7 +149,7 @@ rmpkg() {
paru -Qq | fzf --preview 'paru -Si {} | bat --language=yaml --color=always -pp' --preview-window right:65%:wrap -m | paru -Rcns - paru -Qq | fzf --preview 'paru -Si {} | bat --language=yaml --color=always -pp' --preview-window right:65%:wrap -m | paru -Rcns -
} }
# Lines configured by zsh-newuser-install # Alias and exports
export MANPAGER="sh -c 'col -bx | bat -l man -p'" export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export TZ="Asia/Kolkata" export TZ="Asia/Kolkata"
alias cat="bat -pp --color=always" alias cat="bat -pp --color=always"
@@ -167,6 +168,7 @@ alias nchh="nvim ~/.config/hypr/hyprland.conf"
alias shfmt="shfmt -ci -d -w" alias shfmt="shfmt -ci -d -w"
alias reboot_firmware="systemctl reboot --firmware-setup" alias reboot_firmware="systemctl reboot --firmware-setup"
#config
HISTFILE=~/.histfile HISTFILE=~/.histfile
HISTSIZE=500 HISTSIZE=500
SAVEHIST=500 SAVEHIST=500
@@ -180,6 +182,7 @@ autoload -Uz compinit
compinit compinit
zstyle ':completion:*' menu select zstyle ':completion:*' menu select
eval "$(starship init zsh)" eval "$(starship init zsh)"
#plugins #plugins
[ -f "/usr/share/nvm/init-nvm.sh" ] && source /usr/share/nvm/init-nvm.sh [ -f "/usr/share/nvm/init-nvm.sh" ] && source /usr/share/nvm/init-nvm.sh
[ -f "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ] && source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh [ -f "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ] && source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh