aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr
diff options
context:
space:
mode:
authorJa.KooLit <jimmielovejay@gmail.com>2024-05-09 00:35:23 +0900
committerGitHub <noreply@github.com>2024-05-09 00:35:23 +0900
commit472661662b29ec932f017e44a36a63b0dc61ac38 (patch)
tree2217d9d7a5168d2eb367f0b486c6a3238b769b24 /config/hypr
parent8e9b6f015038ae76ce68035d6aee7ff88a5be06c (diff)
parent25cbdc6a01177a5da063458438cc9ea10271ec9f (diff)
Merge pull request #247 from JaKooLit/development
Development to Main
Diffstat (limited to 'config/hypr')
-rw-r--r--config/hypr/UserConfigs/Startup_Apps.conf1
-rw-r--r--config/hypr/UserConfigs/UserKeybinds.conf3
-rw-r--r--config/hypr/UserConfigs/WindowRules.conf43
-rwxr-xr-xconfig/hypr/UserScripts/Weather.py14
-rwxr-xr-xconfig/hypr/UserScripts/Weather.sh4
-rw-r--r--config/hypr/configs/Keybinds.conf3
-rw-r--r--config/hypr/hyprlock.conf2
-rwxr-xr-xconfig/hypr/scripts/DarkLight.sh12
-rwxr-xr-xconfig/hypr/scripts/Refresh.sh3
-rwxr-xr-xconfig/hypr/scripts/RefreshNoWaybar.sh3
-rwxr-xr-xconfig/hypr/scripts/Wlogout.sh55
-rw-r--r--config/hypr/v2.2.11 (renamed from config/hypr/v2.2.10)0
12 files changed, 95 insertions, 48 deletions
diff --git a/config/hypr/UserConfigs/Startup_Apps.conf b/config/hypr/UserConfigs/Startup_Apps.conf
index 78d06363..2f529d61 100644
--- a/config/hypr/UserConfigs/Startup_Apps.conf
+++ b/config/hypr/UserConfigs/Startup_Apps.conf
@@ -23,6 +23,7 @@ exec-once = $scriptsDir/Polkit.sh
exec-once = waybar &
exec-once = nm-applet --indicator &
exec-once = swaync &
+exec-once = ags &
#exec-once = blueman-applet &
#exec-once = rog-control-center &
diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf
index 7ffd702e..eede1669 100644
--- a/config/hypr/UserConfigs/UserKeybinds.conf
+++ b/config/hypr/UserConfigs/UserKeybinds.conf
@@ -15,6 +15,9 @@ $UserScripts = $HOME/.config/hypr/UserScripts
#bindr = $mainMod, $mainMod_L, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window # Super Key to Launch rofi menu
bind = $mainMod, D, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window
+# ags overview
+bind = $mainMod, A, exec, pkill rofi || true && ags -t 'overview'
+
bind = $mainMod, Return, exec, $term # Launch terminal
bind = $mainMod, T, exec, $files
diff --git a/config/hypr/UserConfigs/WindowRules.conf b/config/hypr/UserConfigs/WindowRules.conf
index 1cf23665..c07094bf 100644
--- a/config/hypr/UserConfigs/WindowRules.conf
+++ b/config/hypr/UserConfigs/WindowRules.conf
@@ -1,6 +1,7 @@
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
+#windowrule
windowrule = float, org.kde.polkit-kde-authentication-agent-1
windowrule = float, nm-connection-editor|blueman-manager
windowrule = float, pavucontrol
@@ -9,24 +10,25 @@ windowrule = float, onedriver|onedriver-launcher
windowrule = float, eog
windowrule = float, zoom
windowrule = float, rofi
-windowrule = float, gnome-system-monitor
+windowrule = float, ^(gnome-system-monitor|org.gnome.SystemMonitor)$
windowrule = float, yad
windowrule = float, ^(wihotspot-gui)$ # wifi hotspot
windowrule = float, ^(evince)$ # document viewer
-windowrule = float, ^(file-roller)$ # archive manager
+windowrule = float, ^(file-roller|org.gnome.FileRoller)$ # archive manager
#windowrule = noblur,gamescope
#windowrule = fullscreen,gamescope
#windowrule = workspace 6 silent,^(gamescope)$
windowrule = center,^(pavucontrol)
+windowrule = float, org.gnome.SystemMonitor
-# windowrule v2
+# windowrule v2 move to workspace
windowrulev2 = workspace 1, class:^([Tt]hunderbird)$
windowrulev2 = workspace 2, class:^([Ff]irefox)$
windowrulev2 = workspace 2, class:^(org.mozilla.firefox)$
windowrulev2 = workspace 2, class:^([Ff]irefox-esr)$
-windowrulev2 = workspace 2, class:^(Microsoft-edge-beta)$
-windowrulev2 = workspace 3, class:^([Tt]hunar)$
+windowrulev2 = workspace 2, class:^([Mm]icrosoft-edge(-stable|-beta|-dev|-unstable)?)$
+#windowrulev2 = workspace 3, class:^([Tt]hunar)$
windowrulev2 = workspace 4, class:^(com.obsproject.Studio)$
windowrulev2 = workspace 5 silent, class:^([Ss]team)$,title:^([Ss]team)$
windowrulev2 = workspace 5 silent, class:^(lutris)$
@@ -40,24 +42,16 @@ windowrulev2 = float, class:([Tt]hunar), title:(File Operation Progress)
windowrulev2 = float, class:([Tt]hunar), title:(Confirm to replace files)
windowrulev2 = float, class:(xdg-desktop-portal-gtk)
windowrulev2 = float, class:(org.gnome.Calculator), title:(Calculator)
-windowrulev2 = float, class:(codium), title:(Add Folder to Workspace)
-windowrulev2 = float, class:(codium-url-handler), title:(Add Folder to Workspace)
-windowrulev2 = float, class:(VSCodium), title:(Add Folder to Workspace)
+windowrulev2 = float, class:(codium|codium-url-handler|VSCodium), title:(Add Folder to Workspace)
-#opacity (transparent) #enable as desired
+# windowrule v2 - opacity #enable as desired
windowrulev2 = opacity 0.9 0.6, class:^([Rr]ofi)$
-windowrulev2 = opacity 0.9 0.7, class:^(Brave-browser)$
-windowrulev2 = opacity 0.9 0.7, class:^(Brave-browser-dev)$
+windowrulev2 = opacity 0.9 0.7, class:^(Brave-browser(-beta|-dev)?)$
windowrulev2 = opacity 0.9 0.7, class:^([Ff]irefox)$
windowrulev2 = opacity 0.9 0.7, class:^(org.mozilla.firefox)$
windowrulev2 = opacity 0.9 0.7, class:^([Ff]irefox-esr)$
-windowrulev2 = opacity 0.9 0.7, class:^([Mm]icrosoft-edge-stable)$
-windowrulev2 = opacity 0.9 0.7, class:^([Mm]icrosoft-edge-beta)$
-windowrulev2 = opacity 0.9 0.7, class:^([Mm]icrosoft-edge-dev)$
-windowrulev2 = opacity 0.9 0.8, class:^(google-chrome)$
-windowrulev2 = opacity 0.9 0.8, class:^(google-chrome-beta)$
-windowrulev2 = opacity 0.9 0.8, class:^(google-chrome-dev)$
-windowrulev2 = opacity 0.9 0.8, class:^(google-chrome-unstable)$
+windowrulev2 = opacity 0.9 0.8, class:^([Mm]icrosoft-edge(-stable|-beta|-dev|-unstable)?)$
+windowrulev2 = opacity 0.9 0.8, class:^(google-chrome(-beta|-dev|-unstable)?)$
windowrulev2 = opacity 0.94 0.86, class:^(chrome-.+-Default)$ # Chrome PWAs
windowrulev2 = opacity 0.9 0.8, class:^([Tt]hunar)$
windowrulev2 = opacity 0.8 0.6, class:^(pcmanfm-qt)$
@@ -66,21 +60,26 @@ windowrulev2 = opacity 0.9 0.8, class:^(deluge)$
windowrulev2 = opacity 0.9 0.8, class:^(Alacritty)$
windowrulev2 = opacity 0.9 0.8, class:^(kitty)$
windowrulev2 = opacity 0.9 0.7, class:^(mousepad)$
-windowrulev2 = opacity 0.9 0.7, class:^(codium-url-handler)$
-windowrulev2 = opacity 0.9 0.7, class:^(VSCodium)$
+windowrulev2 = opacity 0.9 0.7, class:^(VSCodium|codium-url-handler)$
windowrulev2 = opacity 0.9 0.7, class:^(yad)$
windowrulev2 = opacity 0.9 0.7, class:^(com.obsproject.Studio)$
windowrulev2 = opacity 0.9 0.7, class:^([Aa]udacious)$
windowrulev2 = opacity 0.9 0.8, class:^(org.gnome.Nautilus)$
-windowrulev2 = opacity 0.9 0.8, class:^(code-url-handler)$
-windowrulev2 = opacity 0.9 0.8, class:^(VSCode)$
+windowrulev2 = opacity 0.9 0.8, class:^(VSCode|code-url-handler)$
windowrulev2 = opacity 0.9 0.8, class:^(jetbrains-studio)$ # Android Studio
windowrulev2 = opacity 0.94 0.86, class:^(discord)$
windowrulev2 = opacity 0.9 0.8, class:^(org.telegram.desktop)$
windowrulev2 = opacity 0.94 0.86, class:^(gnome-disks)$
windowrulev2 = opacity 0.9 0.8, class:^(org.gnome.baobab)$
windowrulev2 = opacity 0.9 0.8, class:^(seahorse)$ # gnome-keyring gui
+windowrulev2 = opacity 0.82 0.75, class:^(gnome-system-monitor|org.gnome.SystemMonitor)$
+windowrulev2 = opacity 0.9 0.8, class:^(xdg-desktop-portal-gtk)$ # gnome-keyring gui
+# windowrule v2 - size
+windowrulev2 = size 70% 70%, class:^(gnome-system-monitor|org.gnome.SystemMonitor)$
+windowrulev2 = size 70% 70%, class:^(xdg-desktop-portal-gtk)$
+windowrulev2 = size 70% 70%, class:^(evince)$
+windowrulev2 = size 60% 70%, class:^(file-roller|org.gnome.FileRoller)$
#layerrule = unset,class:^([Rr]ofi)$
#layerrule = blur,class:^([Rr]ofi)$
diff --git a/config/hypr/UserScripts/Weather.py b/config/hypr/UserScripts/Weather.py
index 14c9cfe0..046dbcd3 100755
--- a/config/hypr/UserScripts/Weather.py
+++ b/config/hypr/UserScripts/Weather.py
@@ -3,7 +3,7 @@
import subprocess
from pyquery import PyQuery # install using `pip install pyquery`
import json
-
+import os
# original code https://gist.github.com/Surendrajat/ff3876fd2166dd86fb71180f4e9342d7
# weather icons
@@ -122,3 +122,15 @@ out_data = {
"class": status_code,
}
print(json.dumps(out_data))
+
+simple_weather =f"{icon} {status}\n" + \
+ f" {temp} ({temp_feel_text})\n" + \
+ f"{wind_text}\n" + \
+ f"{humidity_text}\n" + \
+ f"{visbility_text} AQI {air_quality_index}\n"
+
+try:
+ with open(os.path.expanduser("~/.cache/.weather_cache"), "w") as file:
+ file.write(simple_weather)
+except:
+ pass \ No newline at end of file
diff --git a/config/hypr/UserScripts/Weather.sh b/config/hypr/UserScripts/Weather.sh
index 40048710..f916b028 100755
--- a/config/hypr/UserScripts/Weather.sh
+++ b/config/hypr/UserScripts/Weather.sh
@@ -78,3 +78,7 @@ esac
#echo $temp $condition
echo -e "{\"text\":\""$temperature $condition"\", \"alt\":\""${weather[0]}"\", \"tooltip\":\""${weather[0]}: $temperature ${weather[1]}"\"}"
+
+cached_weather=" $temperature \n$condition ${weather[1]}"
+
+echo -e $cached_weather > ~/.cache/.weather_cache \ No newline at end of file
diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf
index 1cc8e2af..2cdd9cde 100644
--- a/config/hypr/configs/Keybinds.conf
+++ b/config/hypr/configs/Keybinds.conf
@@ -30,7 +30,6 @@ bind = $mainMod ALT, L, exec, $scriptsDir/ChangeLayout.sh # Toggle Master or Dwi
bind = $mainMod ALT, V, exec, $scriptsDir/ClipManager.sh # Clipboard Manager
bind = $mainMod SHIFT, N, exec, swaync-client -t -sw # swayNC panel
bind = SHIFT, ALT_L, exec, $scriptsDir/SwitchKeyboardLayout.sh # Switch Keyboard Layout
-bind = $mainMod, A, exec, ags -t 'overview'
# FEATURES / EXTRAS (UserScripts)
bind = $mainMod, E, exec, $UserScripts/QuickEdit.sh # Quick Edit Hyprland Settings
@@ -77,7 +76,7 @@ bind = $mainMod, Print, exec, $scriptsDir/ScreenShot.sh --now
bind = $mainMod SHIFT, Print, exec, $scriptsDir/ScreenShot.sh --area
bind = $mainMod CTRL, Print, exec, $scriptsDir/ScreenShot.sh --in5 #screenshot in 5 secs
bind = $mainMod ALT, Print, exec, $scriptsDir/ScreenShot.sh --in10 #screenshot in 10 secs
-bind = ALT, Print, exec, $scriptsDir/ScreenShot.sh --active #screenshot in 10 secs
+bind = ALT, Print, exec, $scriptsDir/ScreenShot.sh --active #take screenshot of active window
# screenshot with swappy (another screenshot tool)
bind = $mainMod SHIFT, S, exec, $scriptsDir/ScreenShot.sh --swappy
diff --git a/config/hypr/hyprlock.conf b/config/hypr/hyprlock.conf
index 3aa029d9..38c927a0 100644
--- a/config/hypr/hyprlock.conf
+++ b/config/hypr/hyprlock.conf
@@ -110,7 +110,7 @@ label {
# weather edit specific location. Note, this cause a 2-4 seconds delay in locking
label {
monitor =
- text = cmd[update:3600000] ping -c 1 wttr.in > /dev/null && curl -s 'wttr.in?format=2' # For specific location : wttr.in/busan?format=2
+ text = cmd[update:3600000] [ -f ~/.cache/.weather_cache ] && cat ~/.cache/.weather_cache
color = $color10
font_size = 24
font_family = JetBrains Mono Nerd Font 10
diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh
index 6c9f610f..f9d2a933 100755
--- a/config/hypr/scripts/DarkLight.sh
+++ b/config/hypr/scripts/DarkLight.sh
@@ -9,6 +9,7 @@ dark_wallpapers="$wallpaper_base_path/Dark"
light_wallpapers="$wallpaper_base_path/Light"
hypr_config_path="$HOME/.config/hypr"
swaync_style="$HOME/.config/swaync/style.css"
+ags_style="$HOME/.config/ags/user/style.css"
SCRIPTSDIR="$HOME/.config/hypr/scripts"
notif="$HOME/.config/swaync/images/bell.png"
dark_rofi_pywal="$HOME/.cache/wal/colors-rofi-dark.rasi"
@@ -74,6 +75,17 @@ else
sed -i '/@define-color noti-bg-alt/s/#.*;/#F0F0F0;/' "${swaync_style}"
fi
+# ags color change
+if [ "$next_mode" = "Dark" ]; then
+ sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(0, 0, 0, 0.4);/' "${ags_style}"
+ sed -i '/@define-color text-color/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(255, 255, 255, 0.7);/' "${ags_style}"
+ sed -i '/@define-color noti-bg-alt/s/#.*;/#111111;/' "${ags_style}"
+else
+ sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(255, 255, 255, 0.4);/' "${ags_style}"
+ sed -i '/@define-color text-color/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(0, 0, 0, 0.7);/' "${ags_style}"
+ sed -i '/@define-color noti-bg-alt/s/#.*;/#F0F0F0;/' "${ags_style}"
+fi
+
# Set Dynamic Wallpaper for Dark or Light Mode
if [ "$next_mode" = "Dark" ]; then
next_wallpaper="$(find "${dark_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)"
diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh
index bf806e01..aeae77d1 100755
--- a/config/hypr/scripts/Refresh.sh
+++ b/config/hypr/scripts/Refresh.sh
@@ -1,6 +1,6 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
-# Scripts for refreshing waybar, rofi, swaync, pywal colors
+# Scripts for refreshing ags waybar, rofi, swaync, pywal colors
SCRIPTSDIR=$HOME/.config/hypr/scripts
UserScripts=$HOME/.config/hypr/UserScripts
@@ -22,6 +22,7 @@ for _prs in "${_ps[@]}"; do
fi
done
+# quit ags
ags -q
sleep 0.3
diff --git a/config/hypr/scripts/RefreshNoWaybar.sh b/config/hypr/scripts/RefreshNoWaybar.sh
index 689bccf0..42d67adc 100755
--- a/config/hypr/scripts/RefreshNoWaybar.sh
+++ b/config/hypr/scripts/RefreshNoWaybar.sh
@@ -25,6 +25,9 @@ for _prs in "${_ps[@]}"; do
fi
done
+# quit ags
+ags -q
+
# Pywal refresh
${SCRIPTSDIR}/PywalSwww.sh &
diff --git a/config/hypr/scripts/Wlogout.sh b/config/hypr/scripts/Wlogout.sh
index 58e1fd68..f3746530 100755
--- a/config/hypr/scripts/Wlogout.sh
+++ b/config/hypr/scripts/Wlogout.sh
@@ -4,12 +4,14 @@
# wlogout (Power, Screen Lock, Suspend, etc)
# Set variables for parameters
-A_2160=680
-B_2160=750
-A_1440=500
-B_1440=550
-A_1080=400
-B_1080=400
+A_2160=450
+B_2160=450
+A_1600=400
+B_1600=400
+A_1440=350
+B_1440=350
+A_1080=50
+B_1080=50
A_720=50
B_720=50
@@ -23,22 +25,33 @@ fi
resolution=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .height / .scale' | awk -F'.' '{print $1}')
hypr_scale=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .scale')
-echo "Detected Resolution: $resolution"
-
# Set parameters based on screen resolution and scaling factor
if ((resolution >= 2160)); then
- wlogout --protocol layer-shell -b 3 -T $(awk "BEGIN {printf \"%.0f\", $A_2160 * 2160 * $hypr_scale / $resolution}") -B $(awk "BEGIN {printf \"%.0f\", $B_2160 * 2160 * $hypr_scale / $resolution}") &
- echo "Setting parameters for resolution >= 2160p"
-elif ((resolution >= 1440)); then
- wlogout --protocol layer-shell -b 6 -T $(awk "BEGIN {printf \"%.0f\", $A_1440 * 1440 * $hypr_scale / $resolution}") -B $(awk "BEGIN {printf \"%.0f\", $B_1440 * 1440 * $hypr_scale / $resolution}") &
- echo "Setting parameters for resolution >= 1440p"
-elif ((resolution >= 1080)); then
- wlogout --protocol layer-shell -b 6 -T $(awk "BEGIN {printf \"%.0f\", $A_1080 * 1080 * $hypr_scale / $resolution}") -B $(awk "BEGIN {printf \"%.0f\", $B_1080 * 1080 * $hypr_scale / $resolution}") &
- echo "Setting parameters for resolution >= 1080p"
-elif ((resolution > 720)); then
- wlogout --protocol layer-shell -b 3 -T $(awk "BEGIN {printf \"%.0f\", $A_720 * 720 * $hypr_scale / $resolution}") -B $(awk "BEGIN {printf \"%.0f\", $B_720 * 720 * $hypr_scale / $resolution}") &
- echo "Setting parameters for resolution >= 720p"
+ T_val=$(awk "BEGIN {printf \"%.0f\", $A_2160 * 2160 * $hypr_scale / $resolution}")
+ B_val=$(awk "BEGIN {printf \"%.0f\", $B_2160 * 2160 * $hypr_scale / $resolution}")
+ echo "Setting parameters for resolution >= 4k"
+ wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val &
+elif ((resolution >= 1600 && resolution < 2160)); then
+ T_val=$(awk "BEGIN {printf \"%.0f\", $A_1600 * 1600 * $hypr_scale / $resolution}")
+ B_val=$(awk "BEGIN {printf \"%.0f\", $B_1600 * 1600 * $hypr_scale / $resolution}")
+ echo "Setting parameters for resolution >= 2.5k and < 4k"
+ wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val &
+elif ((resolution >= 1440 && resolution < 1600)); then
+ T_val=$(awk "BEGIN {printf \"%.0f\", $A_1440 * 1440 * $hypr_scale / $resolution}")
+ B_val=$(awk "BEGIN {printf \"%.0f\", $B_1440 * 1440 * $hypr_scale / $resolution}")
+ echo "Setting parameters for resolution >= 2k and < 2.5k"
+ wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val &
+elif ((resolution >= 1080 && resolution < 1440)); then
+ T_val=$(awk "BEGIN {printf \"%.0f\", $A_1080 * 1080 * $hypr_scale / $resolution}")
+ B_val=$(awk "BEGIN {printf \"%.0f\", $B_1080 * 1080 * $hypr_scale / $resolution}")
+ echo "Setting parameters for resolution >= 1080p and < 2k"
+ wlogout --protocol layer-shell -b 3 -T $T_val -B $B_val &
+elif ((resolution >= 720 && resolution < 1080)); then
+ T_val=$(awk "BEGIN {printf \"%.0f\", $A_720 * 720 * $hypr_scale / $resolution}")
+ B_val=$(awk "BEGIN {printf \"%.0f\", $B_720 * 720 * $hypr_scale / $resolution}")
+ echo "Setting parameters for resolution >= 720p and < 1080p"
+ wlogout --protocol layer-shell -b 3 -T $T_val -B $B_val &
else
+ echo "Setting default parameters"
wlogout &
- echo "Setting default parameters for resolution <= 720p"
-fi \ No newline at end of file
+fi
diff --git a/config/hypr/v2.2.10 b/config/hypr/v2.2.11
index 31b3414d..31b3414d 100644
--- a/config/hypr/v2.2.10
+++ b/config/hypr/v2.2.11
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage