aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/hypr/UserConfigs/Laptops.conf1
-rw-r--r--config/hypr/UserConfigs/Startup_Apps.conf2
-rwxr-xr-xconfig/hypr/UserScripts/Sunset.sh (renamed from config/hypr/scripts/Sunset.sh)0
-rwxr-xr-xconfig/hypr/scripts/AirplaneMode.sh14
-rwxr-xr-xconfig/hypr/scripts/SwitchKeyboardLayout.sh4
-rwxr-xr-xconfig/hypr/scripts/TouchPad.sh44
6 files changed, 26 insertions, 39 deletions
diff --git a/config/hypr/UserConfigs/Laptops.conf b/config/hypr/UserConfigs/Laptops.conf
index 0a12d7fa..14413ce0 100644
--- a/config/hypr/UserConfigs/Laptops.conf
+++ b/config/hypr/UserConfigs/Laptops.conf
@@ -22,6 +22,7 @@ bind = $mainMod, F6, exec, $scriptsDir/ScreenShot.sh --now # Fullscreen
bind = $mainMod SHIFT, F6, exec, $scriptsDir/ScreenShot.sh --area
bind = $mainMod CTRL, F6, exec, $scriptsDir/ScreenShot.sh --in5 # Screenshot in 5 secs
bind = $mainMod ALT, F6, exec, $scriptsDir/ScreenShot.sh --in10 # Screenshot in 10 secs
+bind = ALT, F6, exec, $scriptsDir/ScreenShot.sh --active # Screenshot active window
# Below are useful when you are connecting your laptop in external display
# Suggest you edit below for your laptop display
diff --git a/config/hypr/UserConfigs/Startup_Apps.conf b/config/hypr/UserConfigs/Startup_Apps.conf
index 6593268f..cb3afb94 100644
--- a/config/hypr/UserConfigs/Startup_Apps.conf
+++ b/config/hypr/UserConfigs/Startup_Apps.conf
@@ -53,4 +53,4 @@ exec-once = swayidle -w timeout 900 '$lock'
#exec-once = $scriptsDir/PortalHyprland.sh
# wlsunset - for automatic gamma adjustment. Default is 1900 to 0700 (7pm to 7am). Edit Sunset.sh accordingly
-# exec-once = $scriptsDir/Sunset.sh \ No newline at end of file
+# exec-once = $UserScriptsDir/Sunset.sh \ No newline at end of file
diff --git a/config/hypr/scripts/Sunset.sh b/config/hypr/UserScripts/Sunset.sh
index 96c27c5b..96c27c5b 100755
--- a/config/hypr/scripts/Sunset.sh
+++ b/config/hypr/UserScripts/Sunset.sh
diff --git a/config/hypr/scripts/AirplaneMode.sh b/config/hypr/scripts/AirplaneMode.sh
index e0337dc7..f3a50629 100755
--- a/config/hypr/scripts/AirplaneMode.sh
+++ b/config/hypr/scripts/AirplaneMode.sh
@@ -2,11 +2,13 @@
notif="$HOME/.config/swaync/images/bell.png"
-wifi="$(nmcli r wifi | awk 'FNR = 2 {print $1}')"
-if [ "$wifi" == "enabled" ]; then
- rfkill block all &
- notify-send -u low -i "$notif" 'airplane mode: active'
+# Check if any wireless device is blocked
+wifi_blocked=$(rfkill list wifi | grep -o "Soft blocked: yes")
+
+if [ -n "$wifi_blocked" ]; then
+ rfkill unblock wifi
+ notify-send -u low -i "$notif" 'Airplane mode: OFF'
else
- rfkill unblock all &
- notify-send -u low -i "$notif" 'airplane mode: inactive'
+ rfkill block wifi
+ notify-send -u low -i "$notif" 'Airplane mode: ON'
fi
diff --git a/config/hypr/scripts/SwitchKeyboardLayout.sh b/config/hypr/scripts/SwitchKeyboardLayout.sh
index 47469181..a53a567d 100755
--- a/config/hypr/scripts/SwitchKeyboardLayout.sh
+++ b/config/hypr/scripts/SwitchKeyboardLayout.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
layout_f="$HOME/.cache/kb_layout"
-settings_file="$HOME/.config/hypr/configs/Settings.conf"
+settings_file="$HOME/.config/hypr/UserConfigs/UserSettings.conf"
notif="$HOME/.config/swaync/images/bell.png"
# Check if ~/.cache/kb_layout exists and create it with a default layout from Settings.conf if not found
@@ -40,4 +40,4 @@ hyprctl keyword input:kb_layout "$new_layout"
echo "$new_layout" > "$layout_f"
# Notification for the new keyboard layout
-notify-send -u low -i "$notif" "Keyboard layout set to $new_layout" \ No newline at end of file
+notify-send -u low -i "$notif" "new KB_Layout: $new_layout" \ No newline at end of file
diff --git a/config/hypr/scripts/TouchPad.sh b/config/hypr/scripts/TouchPad.sh
index 7b9a1806..1fcb3249 100755
--- a/config/hypr/scripts/TouchPad.sh
+++ b/config/hypr/scripts/TouchPad.sh
@@ -1,38 +1,22 @@
#!/bin/bash
+HYPRLAND_DEVICE="asue1209:00-04f3:319f-touchpad"
notif="$HOME/.config/swaync/images/bell.png"
-# NOTE: find the right device using hyprctl devices
- HYPRLAND_DEVICE="asue1209:00-04f3:319f-touchpad"
+XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/run/user/$(id -u)}
+STATUS_FILE="$XDG_RUNTIME_DIR/touchpad.status"
-if [ -z "$XDG_RUNTIME_DIR" ]; then
- export XDG_RUNTIME_DIR=/run/user/$(id -u)
-fi
-
-export STATUS_FILE="$XDG_RUNTIME_DIR/touchpad.status"
-
-enable_touchpad() {
- printf "true" > "$STATUS_FILE"
-
- notify-send -u low -i "$notif" "Enabling Touchpad"
-
- hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" true
-}
-
-disable_touchpad() {
- printf "false" > "$STATUS_FILE"
-
- notify-send -u low -i "$notif" "Disabling Touchpad"
+toggle_touchpad() {
+ if [ ! -f "$STATUS_FILE" ] || [ "$(cat "$STATUS_FILE")" = "false" ]; then
+ echo "true" > "$STATUS_FILE"
+ action="enabled"
+ else
+ echo "false" > "$STATUS_FILE"
+ action="disabled"
+ fi
- hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" false
+ notify-send -u low -i "$notif" "Touchpad $action"
+ hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" "$(cat "$STATUS_FILE")"
}
-if ! [ -f "$STATUS_FILE" ]; then
- enable_touchpad
-else
- if [ $(cat "$STATUS_FILE") = "true" ]; then
- disable_touchpad
- elif [ $(cat "$STATUS_FILE") = "false" ]; then
- enable_touchpad
- fi
-fi
+toggle_touchpad
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage