mirror of
https://github.com/CoolnsX/hyprdots.git
synced 2025-12-20 07:15:23 +05:30
This is supposed to crash
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
all: unset;
|
||||
}
|
||||
|
||||
|
||||
/** Generic window ***********************************/
|
||||
.genwin {
|
||||
//background-color: rgba(39, 40, 34, 0.7);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
:y "50px"
|
||||
:width "25%"
|
||||
:height "200px"
|
||||
:anchor "top right")
|
||||
:anchor "bottom right")
|
||||
:stacking "bg"
|
||||
:reserve (struts :distance "40px" :side "top")
|
||||
:windowtype "dock"
|
||||
@@ -18,7 +18,7 @@
|
||||
:y "50px"
|
||||
:width "25%"
|
||||
:height "200px"
|
||||
:anchor "top right")
|
||||
:anchor "bottom right")
|
||||
:stacking "bg"
|
||||
:reserve (struts :distance "40px" :side "top")
|
||||
:windowtype "dock"
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
import socket
|
||||
import time,re
|
||||
from pypresence import Presence
|
||||
|
||||
def update():
|
||||
# Get the duration information
|
||||
time.sleep(2)
|
||||
|
||||
# Update Discord Rich Presence with the end timestamp
|
||||
with open("/tmp/yt-music/current", 'r') as file:
|
||||
li = re.split(' >|: | - ', file.readline().strip('\n'))
|
||||
file.close()
|
||||
|
||||
print(li)
|
||||
# Update Discord Rich Presence with the information from the file
|
||||
RPC.update(
|
||||
large_image=f"https://i.ytimg.com/vi/{li[-1]}/mqdefault.jpg",
|
||||
details=f"{li[1]}",
|
||||
large_text = "Checkmate Premium Users",
|
||||
state=li[2],
|
||||
start=int(time.time()),
|
||||
)
|
||||
|
||||
socket_path = "/tmp/yt-music/yt-music-mpvsocket"
|
||||
|
||||
# Initialize Discord Rich Presence
|
||||
RPC = Presence("1165951947245879316")
|
||||
RPC.connect()
|
||||
|
||||
# Create a UNIX socket
|
||||
mpv_socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||
mpv_socket.connect(socket_path)
|
||||
update()
|
||||
while True:
|
||||
event = mpv_socket.recv(1024).decode('utf-8')
|
||||
# Adjust the buffer size as needed
|
||||
if not event:
|
||||
break
|
||||
#check if event contains "end-file" or "eof"
|
||||
if "end-file" in event or "eof" in event:
|
||||
print(event)
|
||||
update()
|
||||
|
||||
mpv_socket.close()
|
||||
RPC.close()
|
||||
2
fzf-tab
2
fzf-tab
Submodule fzf-tab updated: 5a81e13792...c2b4aa5ad2
@@ -169,7 +169,7 @@ windowrulev2=fullscreen,class:^(org.freedesktop.Xwayland)$
|
||||
exec-once=dbus-update-activation-environment --systemd --all
|
||||
exec-once=ssh-agent
|
||||
exec-once=cd $HOME/github/arrpc && node src > /tmp/arrpc-log
|
||||
exec-once=swaybg -i $HOME/.config/wall/9.png
|
||||
exec-once=swaybg -i $HOME/.config/wall/12.jpg
|
||||
exec-once=xrdb -merge $HOME/.config/.Xresource
|
||||
exec-once=$hypr_dir/workspace 'focus'
|
||||
exec-once=sleep 5 && $hypr_dir/workspace
|
||||
|
||||
Reference in New Issue
Block a user