diff options
| author | JaKooLit <jimmielovejay.com> | 2024-01-01 18:43:31 +0900 |
|---|---|---|
| committer | JaKooLit <jimmielovejay.com> | 2024-01-01 18:43:31 +0900 |
| commit | 2bbe867a07895b5bfdd00722830324fb1b37cf11 (patch) | |
| tree | d344007ddc9614137c64b6ea4bf619310646e59f /config/hypr/scripts | |
| parent | f7c551d45dee4dee7b2ae7af635506f6bad0c1bc (diff) | |
Just a small tinkering... :)
Diffstat (limited to 'config/hypr/scripts')
26 files changed, 84 insertions, 32 deletions
diff --git a/config/hypr/scripts/AirplaneMode.sh b/config/hypr/scripts/AirplaneMode.sh index f3a50629..1176c80f 100755 --- a/config/hypr/scripts/AirplaneMode.sh +++ b/config/hypr/scripts/AirplaneMode.sh @@ -1,4 +1,6 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Airplane Mode. Turning on or off all wifi using rfkill. notif="$HOME/.config/swaync/images/bell.png" diff --git a/config/hypr/scripts/Brightness.sh b/config/hypr/scripts/Brightness.sh index 14c03da5..04987ab1 100755 --- a/config/hypr/scripts/Brightness.sh +++ b/config/hypr/scripts/Brightness.sh @@ -1,4 +1,6 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Script for Monitor backlights (if supported) using brightnessctl iDIR="$HOME/.config/swaync/icons" notification_timeout=1000 diff --git a/config/hypr/scripts/BrightnessKbd.sh b/config/hypr/scripts/BrightnessKbd.sh index 3bdcebcb..f96c6e08 100755 --- a/config/hypr/scripts/BrightnessKbd.sh +++ b/config/hypr/scripts/BrightnessKbd.sh @@ -1,4 +1,6 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Script for keyboard backlights (if supported) using brightnessctl iDIR="$HOME/.config/swaync/icons" diff --git a/config/hypr/scripts/ChangeBlur.sh b/config/hypr/scripts/ChangeBlur.sh index 95789f5c..8ad0dd40 100755 --- a/config/hypr/scripts/ChangeBlur.sh +++ b/config/hypr/scripts/ChangeBlur.sh @@ -1,4 +1,6 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +## Script for changing blurs on the fly notif="$HOME/.config/swaync/images/bell.png" diff --git a/config/hypr/scripts/ChangeLayout.sh b/config/hypr/scripts/ChangeLayout.sh index 93bc2fe9..5981024a 100755 --- a/config/hypr/scripts/ChangeLayout.sh +++ b/config/hypr/scripts/ChangeLayout.sh @@ -1,4 +1,6 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# for changing Hyprland Layouts (Master or Dwindle) on the fly notif="$HOME/.config/swaync/images/bell.png" diff --git a/config/hypr/scripts/ClipManager.sh b/config/hypr/scripts/ClipManager.sh index eb717eaa..ee6b512f 100755 --- a/config/hypr/scripts/ClipManager.sh +++ b/config/hypr/scripts/ClipManager.sh @@ -1,6 +1,6 @@ #!/bin/bash -# -# Clipboard Manager +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Clipboard Manager. This needed cliphist & wl-copy and of course rofi if [[ ! $(pidof rofi) ]]; then cliphist list | rofi -dmenu -config ~/.config/rofi/config-long.rasi | cliphist decode | wl-copy diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh index ec8c4473..dab6e816 100755 --- a/config/hypr/scripts/DarkLight.sh +++ b/config/hypr/scripts/DarkLight.sh @@ -1,5 +1,8 @@ #!/bin/bash -set -x +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# For Dark and Light switching +# Note: Scripts are looking for keywords Light or Dark except for wallpapers as the are in a separate folders + # Paths wallpaper_base_path="$HOME/Pictures/wallpapers/Dynamic-Wallpapers" dark_wallpapers="$wallpaper_base_path/Dark" diff --git a/config/hypr/scripts/GameMode.sh b/config/hypr/scripts/GameMode.sh index d53ec7d3..f05676eb 100755 --- a/config/hypr/scripts/GameMode.sh +++ b/config/hypr/scripts/GameMode.sh @@ -1,4 +1,6 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Game Mode. Turning off all animations notif="$HOME/.config/swaync/images/bell.png" SCRIPTSDIR="$HOME/.config/hypr/scripts" diff --git a/config/hypr/scripts/KeyHints.sh b/config/hypr/scripts/KeyHints.sh index 90c9ec47..5b79cf06 100755 --- a/config/hypr/scripts/KeyHints.sh +++ b/config/hypr/scripts/KeyHints.sh @@ -1,4 +1,6 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Keyhints. Idea got from Garuda Hyprland # Detect monitor resolution and scale x_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .width') @@ -42,8 +44,8 @@ yad --width=$dynamic_width --height=$dynamic_height \ " Q" "close active window" "(not kill)" \ " Shift Q " "closes a specified window" "(window)" \ " Alt V" "Clipboard Manager" "(cliphist)" \ -" W" "Choose wallpaper" "(swww)" \ -"CTRL ALT W" "Random wallpaper" "(swww)" \ +" W" "Choose wallpaper" "(Wallpaper Menu)" \ +"CTRL ALT W" "Random wallpaper" "(via swww)" \ " B" "Hide/UnHide Waybar" "waybar" \ " CTRL B" "Choose waybar styles" "(waybar styles)" \ " ALT B" "Choose waybar layout" "(waybar layout)" \ @@ -61,7 +63,7 @@ yad --width=$dynamic_width --height=$dynamic_height \ " Shift F" "Toggle float" "single window" \ " ALT F" "Toggle all windows to float" "all windows" \ " Shift B" "Toggle Blur" "normal or less blur" \ -" SHIFT G" "Gamemode! All animations off" "" \ +" SHIFT G" "Gamemode! All animations OFF or ON" "toggle" \ " H" "Launch this app" "" \ " E" "View or EDIT Keybinds, Settings, Monitor" "" \ "" "" "" \ diff --git a/config/hypr/scripts/LockScreen.sh b/config/hypr/scripts/LockScreen.sh index 538b6eff..1e676780 100755 --- a/config/hypr/scripts/LockScreen.sh +++ b/config/hypr/scripts/LockScreen.sh @@ -1,4 +1,6 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# For Swaylock CONFIG="$HOME/.config/swaylock/config" diff --git a/config/hypr/scripts/MediaCtrl.sh b/config/hypr/scripts/MediaCtrl.sh index 9d970443..d9855e4f 100755 --- a/config/hypr/scripts/MediaCtrl.sh +++ b/config/hypr/scripts/MediaCtrl.sh @@ -1,4 +1,6 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Playerctl music_icon="$HOME/.config/swaync/icons/music.png" diff --git a/config/hypr/scripts/Polkit-NixOS.sh b/config/hypr/scripts/Polkit-NixOS.sh index ef5e74fd..048c1b02 100755 --- a/config/hypr/scripts/Polkit-NixOS.sh +++ b/config/hypr/scripts/Polkit-NixOS.sh @@ -1,4 +1,6 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# For NixOS starting of polkit-gnome. Dec 2023, the settings stated in NixOS wiki does not work so have to manual start it # Find all polkit-gnome executables in the Nix store polkit_gnome_paths=$(find /nix/store -name 'polkit-gnome-authentication-agent-1' -type f 2>/dev/null) diff --git a/config/hypr/scripts/Polkit.sh b/config/hypr/scripts/Polkit.sh index 031c74d6..07b1211d 100755 --- a/config/hypr/scripts/Polkit.sh +++ b/config/hypr/scripts/Polkit.sh @@ -1,4 +1,6 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# This is for polkits, it will start from top and will stop if the top is executed # Polkit possible paths files to check polkit=( diff --git a/config/hypr/scripts/PortalHyprland.sh b/config/hypr/scripts/PortalHyprland.sh index 70a994ed..389ec738 100755 --- a/config/hypr/scripts/PortalHyprland.sh +++ b/config/hypr/scripts/PortalHyprland.sh @@ -1,4 +1,7 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# For manually starting xdg-desktop-portal + sleep 1 killall xdg-desktop-portal-hyprland killall xdg-desktop-portal-wlr diff --git a/config/hypr/scripts/PywalSwww.sh b/config/hypr/scripts/PywalSwww.sh index d91d3f60..0cbadaf4 100755 --- a/config/hypr/scripts/PywalSwww.sh +++ b/config/hypr/scripts/PywalSwww.sh @@ -1,4 +1,6 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Pywal Colors for current wallpaper # Define the path to the swww cache directory cache_dir="$HOME/.cache/swww/" diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh index b5e0f556..a585eb84 100755 --- a/config/hypr/scripts/Refresh.sh +++ b/config/hypr/scripts/Refresh.sh @@ -1,7 +1,9 @@ -#!/usr/bin/env bash +#!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Scripts for refreshing waybar, rofi, swaync, pywal colors SCRIPTSDIR=$HOME/.config/hypr/scripts -UserSCRIPTSDIR=$HOME/.config/hypr/UserScripts +UserScripts=$HOME/.config/hypr/UserScripts # Define file_exists function file_exists() { @@ -30,8 +32,8 @@ swaync > /dev/null 2>&1 & # Relaunching rainbow borders if the script exists sleep 1 -if file_exists "${UserSCRIPTSDIR}/RainbowBorders.sh"; then - ${UserSCRIPTSDIR}/RainbowBorders.sh & +if file_exists "${UserScripts}/RainbowBorders.sh"; then + ${UserScripts}/RainbowBorders.sh & fi # for cava-pywal (note, need to manually restart cava once wallpaper changes) diff --git a/config/hypr/scripts/RefreshNoWaybar.sh b/config/hypr/scripts/RefreshNoWaybar.sh index be06167c..f0c3d569 100755 --- a/config/hypr/scripts/RefreshNoWaybar.sh +++ b/config/hypr/scripts/RefreshNoWaybar.sh @@ -1,11 +1,12 @@ -#!/usr/bin/env bash +#!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Modified version of Refresh but no waybar refresh # Used by automatic wallpaper change -# Modified inorder to refresh rofi background, Pywal +# Modified inorder to refresh rofi background, Pywal, SwayNC SCRIPTSDIR=$HOME/.config/hypr/scripts -UserSCRIPTSDIR=$HOME/.config/hypr/UserScripts +UserScripts=$HOME/.config/hypr/UserScripts # Define file_exists function file_exists() { @@ -29,8 +30,8 @@ ${SCRIPTSDIR}/PywalSwww.sh & # Relaunching rainbow borders if the script exists sleep 1 -if file_exists "${UserSCRIPTSDIR}/RainbowBorders.sh"; then - ${UserSCRIPTSDIR}/RainbowBorders.sh & +if file_exists "${UserScripts}/RainbowBorders.sh"; then + ${UserScripts}/RainbowBorders.sh & fi # for cava-pywal (note, need to manually restart cava once wallpaper changes) diff --git a/config/hypr/scripts/RofiEmoji.sh b/config/hypr/scripts/RofiEmoji.sh index 6667cc53..4182a5a9 100755 --- a/config/hypr/scripts/RofiEmoji.sh +++ b/config/hypr/scripts/RofiEmoji.sh @@ -1,11 +1,12 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Rofi Emoticons. Not my own. Cant remember the source sed '1,/^### DATA ###$/d' $0 | rofi -dmenu -config ~/.config/rofi/config-long.rasi| cut -d ' ' -f 1 | tr -d '\n' | wl-copy exit - ### DATA ### 😀 grinning face face smile happy joy :D grin 😃 grinning face with big eyes face happy joy haha :D :) smile funny diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index 1d5eeacf..ddf4398b 100755 --- a/config/hypr/scripts/ScreenShot.sh +++ b/config/hypr/scripts/ScreenShot.sh @@ -1,4 +1,6 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Screenshots scripts iDIR="$HOME/.config/swaync/icons" notify_cmd_shot="notify-send -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/picture.png" diff --git a/config/hypr/scripts/SwitchKeyboardLayout.sh b/config/hypr/scripts/SwitchKeyboardLayout.sh index a53a567d..90451c67 100755 --- a/config/hypr/scripts/SwitchKeyboardLayout.sh +++ b/config/hypr/scripts/SwitchKeyboardLayout.sh @@ -1,4 +1,6 @@ -#!/usr/bin/env bash +#!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# This is for changing kb_layouts. Set kb_layouts in $settings_file layout_f="$HOME/.cache/kb_layout" settings_file="$HOME/.config/hypr/UserConfigs/UserSettings.conf" diff --git a/config/hypr/scripts/TouchPad.sh b/config/hypr/scripts/TouchPad.sh index 1fcb3249..47ad48f6 100755 --- a/config/hypr/scripts/TouchPad.sh +++ b/config/hypr/scripts/TouchPad.sh @@ -1,6 +1,8 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# For disabling touchpad. -HYPRLAND_DEVICE="asue1209:00-04f3:319f-touchpad" +Touchpad_Device="asue1209:00-04f3:319f-touchpad" notif="$HOME/.config/swaync/images/bell.png" XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/run/user/$(id -u)} @@ -16,7 +18,7 @@ toggle_touchpad() { fi notify-send -u low -i "$notif" "Touchpad $action" - hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" "$(cat "$STATUS_FILE")" + hyprctl keyword "device:$Touchpad_Device:enabled" "$(cat "$STATUS_FILE")" } toggle_touchpad diff --git a/config/hypr/scripts/Volume.sh b/config/hypr/scripts/Volume.sh index f68491cf..1c18211f 100755 --- a/config/hypr/scripts/Volume.sh +++ b/config/hypr/scripts/Volume.sh @@ -1,4 +1,6 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Scripts for volume controls for audio and mic iDIR="$HOME/.config/swaync/icons" diff --git a/config/hypr/scripts/WaybarCava.sh b/config/hypr/scripts/WaybarCava.sh index 458a31bb..77fce82a 100755 --- a/config/hypr/scripts/WaybarCava.sh +++ b/config/hypr/scripts/WaybarCava.sh @@ -1,4 +1,7 @@ # #! /bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## + +# Not my own work. This was added through Github PR. Credit to original author #----- Optimized bars animation without much CPU usage increase -------- bar="▁▂▃▄▅▆▇█" diff --git a/config/hypr/scripts/WaybarLayout.sh b/config/hypr/scripts/WaybarLayout.sh index dbe0ee7f..31146b59 100755 --- a/config/hypr/scripts/WaybarLayout.sh +++ b/config/hypr/scripts/WaybarLayout.sh @@ -1,12 +1,14 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Script for waybar layout or configs set -euo pipefail IFS=$'\n\t' # Define directories -config_dir="$HOME/.config/waybar/configs" +waybar_layouts="$HOME/.config/waybar/configs" waybar_config="$HOME/.config/waybar/config" -scripts_dir="$HOME/.config/hypr/scripts" +SCRIPTSDIR="$HOME/.config/hypr/scripts" rofi_config="$HOME/.config/rofi/config-waybar-layout.rasi" # Function to display menu options @@ -14,14 +16,14 @@ menu() { options=() while IFS= read -r file; do options+=("$(basename "$file")") - done < <(find "$config_dir" -maxdepth 1 -type f -exec basename {} \; | sort) + done < <(find "$waybar_layouts" -maxdepth 1 -type f -exec basename {} \; | sort) printf '%s\n' "${options[@]}" } # Apply selected configuration apply_config() { - ln -sf "$config_dir/$1" "$waybar_config" + ln -sf "$waybar_layouts/$1" "$waybar_config" restart_waybar_if_needed } @@ -31,7 +33,7 @@ restart_waybar_if_needed() { pkill waybar sleep 0.1 # Delay for Waybar to completely terminate fi - "${scripts_dir}/Refresh.sh" & + "${SCRIPTSDIR}/Refresh.sh" & } # Main function diff --git a/config/hypr/scripts/WaybarStyles.sh b/config/hypr/scripts/WaybarStyles.sh index 9395c528..bbcb6ea3 100755 --- a/config/hypr/scripts/WaybarStyles.sh +++ b/config/hypr/scripts/WaybarStyles.sh @@ -1,29 +1,31 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Script for waybar styles set -euo pipefail IFS=$'\n\t' # Define directories -config_dir="$HOME/.config/waybar/style" -waybar_config="$HOME/.config/waybar/style.css" -scripts_dir="$HOME/.config/hypr/scripts" +waybar_styles="$HOME/.config/waybar/style" +waybar_style="$HOME/.config/waybar/style.css" +SCRIPTSDIR="$HOME/.config/hypr/scripts" rofi_config="$HOME/.config/rofi/config-waybar-style.rasi" # Function to display menu options menu() { options=() while IFS= read -r file; do - if [ -f "$config_dir/$file" ]; then + if [ -f "$waybar_styles/$file" ]; then options+=("$(basename "$file" .css)") fi - done < <(find "$config_dir" -maxdepth 1 -type f -name '*.css' -exec basename {} \; | sort) + done < <(find "$waybar_styles" -maxdepth 1 -type f -name '*.css' -exec basename {} \; | sort) printf '%s\n' "${options[@]}" } # Apply selected style apply_style() { - ln -sf "$config_dir/$1.css" "$waybar_config" + ln -sf "$waybar_styles/$1.css" "$waybar_style" restart_waybar_if_needed } @@ -33,7 +35,7 @@ restart_waybar_if_needed() { pkill waybar sleep 0.1 # Delay for Waybar to completely terminate fi - "${scripts_dir}/Refresh.sh" & + "${SCRIPTSDIR}/Refresh.sh" & } # Main function diff --git a/config/hypr/scripts/Wlogout.sh b/config/hypr/scripts/Wlogout.sh index 71d21447..7181fc5f 100755 --- a/config/hypr/scripts/Wlogout.sh +++ b/config/hypr/scripts/Wlogout.sh @@ -1,8 +1,11 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## + +# wlogout (Power, Screen Lock, Suspend, etc) # Set variables for parameters A_2160=500 -B_2160=500 +B_2160=550 A_1440=500 B_1440=550 A_1080=300 |
