From 589e87cb4ca80b8c6c63ef20518d76917560c8f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Sun, 26 May 2024 20:18:34 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=91=EF=B8=8F=20remove(hypr):=20unused?= =?UTF-8?q?=20scripts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/hypr/scripts/custom_app_launch | 74 -------------------------- .config/hypr/scripts/focused_monitor | 3 -- .config/hypr/scripts/monitors | 8 --- .config/hypr/scripts/rgb_borders | 42 --------------- 4 files changed, 127 deletions(-) delete mode 100755 .config/hypr/scripts/custom_app_launch delete mode 100755 .config/hypr/scripts/focused_monitor delete mode 100755 .config/hypr/scripts/monitors delete mode 100755 .config/hypr/scripts/rgb_borders diff --git a/.config/hypr/scripts/custom_app_launch b/.config/hypr/scripts/custom_app_launch deleted file mode 100755 index 47cfb3d0..00000000 --- a/.config/hypr/scripts/custom_app_launch +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/bash - -app=$1 - -if [ "$app" = "" ]; then - exit 1 -fi - -FOCUSED_MONITOR=$(~/.config/hypr/scripts/focused_monitor) -source ~/.config/hypr/scripts/monitors - -case $app in -"nemo") - if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then - hyprctl dispatch exec [workspace 3] nemo & - elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then - hyprctl dispatch exec [workspace 12] nemo & - else - nemo & - fi - ;; -"obsidian") - if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then - hyprctl dispatch exec [workspace 9] obsidian & - elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then - hyprctl dispatch exec [workspace 18] obsidian & - elif [ "$FOCUSED_MONITOR" = "$MONITOR3" ]; then - hyprctl dispatch exec [workspace 27] obsidian & - else - obsidian & - fi - ;; -"office") - if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then - hyprctl dispatch exec [workspace 9] libreoffice & - elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then - hyprctl dispatch exec [workspace 18] libreoffice & - elif [ "$FOCUSED_MONITOR" = "$MONITOR3" ]; then - hyprctl dispatch exec [workspace 27] libreoffice & - else - libreoffice & - fi - ;; -"nvim") - if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then - hyprctl dispatch exec [workspace 2] kitty nvim & - elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then - hyprctl dispatch exec [workspace 11] kitty nvim & - else - kitty nvim & - fi - ;; -"codium") - if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then - hyprctl dispatch workspace 2 && codium & - elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then - hyprctl dispatch workspace 11 && codium & - else - codium - fi - ;; -"browser") - if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then - hyprctl dispatch workspace 1 && floorp & # Had to to this because it didnt work the other way - elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then - hyprctl dispatch workspace 10 && floorp & - elif [ "$FOCUSED_MONITOR" = "$MONITOR3" ]; then - hyprctl dispatch workspace 23 && floorp & - else - librewolf & - fi - ;; -*) ;; -esac diff --git a/.config/hypr/scripts/focused_monitor b/.config/hypr/scripts/focused_monitor deleted file mode 100755 index eea9decb..00000000 --- a/.config/hypr/scripts/focused_monitor +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/bash - -hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .name' diff --git a/.config/hypr/scripts/monitors b/.config/hypr/scripts/monitors deleted file mode 100755 index aa81947a..00000000 --- a/.config/hypr/scripts/monitors +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/bash - -# MONITORS=$(hyprctl monitors -j | jq -r '.[] | .name') -# echo "$MONITORS" - -export MONITOR1="DP-1" -export MONITOR2="DP-3" -export MONITOR3="HDMI-A-1" diff --git a/.config/hypr/scripts/rgb_borders b/.config/hypr/scripts/rgb_borders deleted file mode 100755 index 900eb4f2..00000000 --- a/.config/hypr/scripts/rgb_borders +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/python - -import subprocess -import time -from colour import Color - -gradient = [ - "#c6a0f6", - "#b7bdf8", - "#8aadf4", -] - - -def color_range(*args): - l = [] - for i, color in enumerate(args): - if i == len(args) - 1: - break - l.extend(color.range_to(args[i + 1], 25)) - return l - - -def rgb_to_hex(r, g, b): - return "%02x%02x%02x" % (r, g, b) - - -def set_color(r, g, b): - print(rgb_to_hex(r, g, b)) - subprocess.run( - f"hyprctl keyword general:col.active_border 0xff{rgb_to_hex(r,g,b)}".split() - ) - - -colors = color_range(*[Color(i) for i in gradient]) - -while 1: - for col in colors: - set_color(int(col.red * 255), int(col.green * 255), int(col.blue * 255)) - time.sleep(0.05) - for col in colors[::-1]: - set_color(int(col.red * 255), int(col.green * 255), int(col.blue * 255)) - time.sleep(0.05)