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

View File

@ -37,5 +37,8 @@ fi
if [ -d ~/dotfiles-versions/$version/swappy ]; then if [ -d ~/dotfiles-versions/$version/swappy ]; then
_installSymLink swappy ~/.config/swappy ~/dotfiles/swappy/ ~/.config _installSymLink swappy ~/.config/swappy ~/dotfiles/swappy/ ~/.config
fi fi
if [ -d ~/dotfiles-versions/$version/swappy ]; then
_installSymLink eww ~/.config/eww ~/dotfiles/eww/ ~/.config
fi
echo ":: Symbolic links created." echo ":: Symbolic links created."
echo echo

View File

@ -8,7 +8,7 @@ monitorrestored=0
_showRestoreOptions() { _showRestoreOptions() {
echo "The following configurations can be transferred into the new installation." echo "The following configurations can be transferred into the new installation."
echo "(SPACE = select/unselect a profile. RETURN = confirm. ESC/No selection = Skip Restore)" echo "(SPACE = select/unselect a profile. RETURN = confirm. CTRL-C/No selection = Skip Restore)"
echo "" echo ""
restorelist="" restorelist=""
if [ -f ~/dotfiles/.bashrc ]; then if [ -f ~/dotfiles/.bashrc ]; then

View File

@ -1,8 +1,10 @@
if [ "$restored" == "1" ]; then if [ "$restored" == "1" ]; then
if [ -f ~/dotfiles/.settings/settings.json ] ;then
echo -e "${GREEN}" echo -e "${GREEN}"
figlet "Restore Settings" figlet "Restore Settings"
echo -e "${NONE}" echo -e "${NONE}"
python .install/restore.py python .install/restore.py
fi
else else
if [ -f ~/dotfiles/.settings/settings.json ] ;then if [ -f ~/dotfiles/.settings/settings.json ] ;then
rm ~/dotfiles/.settings/settings.json rm ~/dotfiles/.settings/settings.json

View File

@ -1,4 +1 @@
#!/bin/bash auto
# screen=0
screen=$(hyprctl activewindow -j | jq '.monitor')
echo $screen

View File

@ -1 +1 @@
2.9RC2 2.9RC3

View File

@ -1,4 +1,4 @@
# ML4W Dotfiles 2.9 RC2 # ML4W Dotfiles 2.9
An advanced configuration of Hyprland and Qtile for Arch Linux based distributions. This package includes an installation script to install and setup the required components. An advanced configuration of Hyprland and Qtile for Arch Linux based distributions. This package includes an installation script to install and setup the required components.

0
eww/eww.yuck Normal file
View File

View File

@ -8,7 +8,13 @@ if [[ ! `pidof eww` ]]; then
sleep 0.5 sleep 0.5
fi fi
sc=$($HOME/dotfiles/.settings/eww-monitor.sh) if [ -f $HOME/dotfiles/.settings/eww-monitor.sh ] && [ $(cat $HOME/dotfiles/.settings/eww-monitor.sh) != "auto" ] ;then
echo ":: Using monitor id from $HOME/dotfiles/.settings/eww-monitor.sh"
sc=$(cat $HOME/dotfiles/.settings/eww-monitor.sh)
else
echo ":: Autodetect current focused monitor."
sc=$(python $HOME/dotfiles/hypr/scripts/active-monitor.py)
fi
if [[ ! -f "$FILE" ]]; then if [[ ! -f "$FILE" ]]; then
touch "$FILE" touch "$FILE"
echo ":: Opening on Monitor $sc" echo ":: Opening on Monitor $sc"

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"])

View File

@ -1,4 +1,6 @@
#!/bin/bash #!/bin/bash
EWW=`which eww` EWW=`which eww`
killall eww if [[ ! `pidof eww` ]]; then
${EWW} daemon ${EWW} daemon
sleep 0.5
fi

2
hypr/scripts/monitors.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
hyprctl -j monitors

View File

@ -58,8 +58,8 @@
// ML4W Welcome App // ML4W Welcome App
"custom/ml4w-welcome": { "custom/ml4w-welcome": {
"on-click": "sleep 0.5 && ~/dotfiles/eww/ml4w-sidebar/launch.sh", "on-click": "sleep 0.3 && ~/dotfiles/eww/ml4w-sidebar/launch.sh",
"on-click-right": "sleep 0.5 && ~/dotfiles/apps/ML4W_Welcome-x86_64.AppImage", "on-click-right": "sleep 0.3 && ~/dotfiles/apps/ML4W_Welcome-x86_64.AppImage",
"format": " ", "format": " ",
"tooltip": false "tooltip": false
}, },