This commit is contained in:
Stephan Raabe
2024-05-01 12:18:47 +02:00
parent bbfa43dde9
commit 81fdf76484
12 changed files with 46 additions and 16 deletions
+18
View File
@@ -0,0 +1,18 @@
import sys
import subprocess
import os
import json
import pathlib
import shutil
# Get script path
pathname = os.path.dirname(sys.argv[0])
homeFolder = os.path.expanduser('~') # Path to home folder
dotfiles = homeFolder + "/dotfiles/"
result = subprocess.run(["bash", dotfiles + "hypr/scripts/monitors.sh"], capture_output=True, text=True)
monitors_json = result.stdout.strip()
monitors_arr = json.loads(monitors_json)
for row in monitors_arr:
if row["focused"]:
print(row["id"])
+4 -2
View File
@@ -1,4 +1,6 @@
#!/bin/bash
EWW=`which eww`
killall eww
${EWW} daemon
if [[ ! `pidof eww` ]]; then
${EWW} daemon
sleep 0.5
fi
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
hyprctl -j monitors