From 2bbe867a07895b5bfdd00722830324fb1b37cf11 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 1 Jan 2024 18:43:31 +0900 Subject: [PATCH] Just a small tinkering... :) --- config/hypr/UserConfigs/Laptops.conf | 3 +- config/hypr/UserConfigs/Startup_Apps.conf | 10 ++-- config/hypr/UserScripts/QuickEdit.sh | 23 ++++---- config/hypr/UserScripts/Sunset.sh | 5 ++ config/hypr/UserScripts/Wallpaper.sh | 24 -------- .../hypr/UserScripts/WallpaperAutoChange.sh | 37 ++++++++++++ config/hypr/UserScripts/WallpaperRandom.sh | 57 ++++++++----------- config/hypr/UserScripts/WallpaperSelect.sh | 12 ++-- config/hypr/configs/Keybinds.conf | 8 ++- config/hypr/hyprland.conf | 7 +-- config/hypr/scripts/AirplaneMode.sh | 2 + config/hypr/scripts/Brightness.sh | 2 + config/hypr/scripts/BrightnessKbd.sh | 2 + config/hypr/scripts/ChangeBlur.sh | 2 + config/hypr/scripts/ChangeLayout.sh | 2 + config/hypr/scripts/ClipManager.sh | 4 +- config/hypr/scripts/DarkLight.sh | 5 +- config/hypr/scripts/GameMode.sh | 2 + config/hypr/scripts/KeyHints.sh | 8 ++- config/hypr/scripts/LockScreen.sh | 2 + config/hypr/scripts/MediaCtrl.sh | 2 + config/hypr/scripts/Polkit-NixOS.sh | 2 + config/hypr/scripts/Polkit.sh | 2 + config/hypr/scripts/PortalHyprland.sh | 3 + config/hypr/scripts/PywalSwww.sh | 2 + config/hypr/scripts/Refresh.sh | 10 ++-- config/hypr/scripts/RefreshNoWaybar.sh | 11 ++-- config/hypr/scripts/RofiEmoji.sh | 3 +- config/hypr/scripts/ScreenShot.sh | 2 + config/hypr/scripts/SwitchKeyboardLayout.sh | 4 +- config/hypr/scripts/TouchPad.sh | 6 +- config/hypr/scripts/Volume.sh | 2 + config/hypr/scripts/WaybarCava.sh | 3 + config/hypr/scripts/WaybarLayout.sh | 12 ++-- config/hypr/scripts/WaybarStyles.sh | 16 +++--- config/hypr/scripts/Wlogout.sh | 5 +- 36 files changed, 183 insertions(+), 119 deletions(-) delete mode 100755 config/hypr/UserScripts/Wallpaper.sh create mode 100755 config/hypr/UserScripts/WallpaperAutoChange.sh diff --git a/config/hypr/UserConfigs/Laptops.conf b/config/hypr/UserConfigs/Laptops.conf index 14413ce..20a6c6f 100644 --- a/config/hypr/UserConfigs/Laptops.conf +++ b/config/hypr/UserConfigs/Laptops.conf @@ -3,10 +3,9 @@ # See https://wiki.hyprland.org/Configuring/Keywords/ for more variable settings # These configs are mostly for laptops. This is addemdum to Keybinds.conf -$configs = $HOME/.config/hypr/configs -$UserConfigs = $HOME/.config/hypr/UserConfigs $mainMod = SUPER $scriptsDir = $HOME/.config/hypr/scripts +$UserConfigs = $HOME/.config/hypr/UserConfigs bind = , xf86KbdBrightnessDown, exec, $scriptsDir/BrightnessKbd.sh --dec #Keyboard brightness Down bind = , xf86KbdBrightnessUp, exec, $scriptsDir/BrightnessKbd.sh --inc #Keyboard brightness up diff --git a/config/hypr/UserConfigs/Startup_Apps.conf b/config/hypr/UserConfigs/Startup_Apps.conf index 5ba2dbf..d8385f0 100644 --- a/config/hypr/UserConfigs/Startup_Apps.conf +++ b/config/hypr/UserConfigs/Startup_Apps.conf @@ -2,15 +2,15 @@ #Commands & Apps to be executed at launch $scriptsDir = $HOME/.config/hypr/scripts -$UserscriptsDir = $HOME/.config/hypr/UserScripts -$lock = $scriptsDir/LockScreen.sh -$SwwwRandom = $UserscriptsDir/WallpaperRandom.sh -$WallpaperPath = $HOME/Pictures/wallpapers +$UserScripts = $HOME/.config/hypr/UserScripts +$wallDIR=$HOME/Pictures/wallpapers +$lock = $scriptsDir/LockScreen.sh +$SwwwRandom = $UserscriptsDir/WallpaperAutoChange.sh # wallpaper stuff / More wallpaper options below exec-once = swww query || swww init -exec-once = $SwwwRandom $WallpaperPath # random wallpaper switcher every 30 minutes +exec-once = $SwwwRandom $wallDIR # random wallpaper switcher every 30 minutes # Startup exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP diff --git a/config/hypr/UserScripts/QuickEdit.sh b/config/hypr/UserScripts/QuickEdit.sh index 9c7cdff..163101e 100755 --- a/config/hypr/UserScripts/QuickEdit.sh +++ b/config/hypr/UserScripts/QuickEdit.sh @@ -1,7 +1,8 @@ #!/bin/bash +# Rofi menu for Quick Edit / View of Settings (SUPER E) -defaultDir="$HOME/.config/hypr/configs" -userDir="$HOME/.config/hypr/UserConfigs" +configs="$HOME/.config/hypr/configs" +UserConfigs="$HOME/.config/hypr/UserConfigs" menu(){ printf "1. view Env-variables\n" @@ -19,31 +20,31 @@ main() { choice=$(menu | rofi -dmenu -config ~/.config/rofi/config-compact.rasi | cut -d. -f1) case $choice in 1) - kitty -e nano "$userDir/ENVariables.conf" + kitty -e nano "$UserConfigs/ENVariables.conf" ;; 2) - kitty -e nano "$userDir/WindowRules.conf" + kitty -e nano "$UserConfigs/WindowRules.conf" ;; 3) - kitty -e nano "$userDir/Startup_Apps.conf" + kitty -e nano "$UserConfigs/Startup_Apps.conf" ;; 4) - kitty -e nano "$userDir/UserKeybinds.conf" + kitty -e nano "$UserConfigs/UserKeybinds.conf" ;; 5) - kitty -e nano "$userDir/Monitors.conf" + kitty -e nano "$UserConfigs/Monitors.conf" ;; 6) - kitty -e nano "$userDir/Laptops.conf" + kitty -e nano "$UserConfigs/Laptops.conf" ;; 7) - kitty -e nano "$userDir/UserSettings.conf" + kitty -e nano "$UserConfigs/UserSettings.conf" ;; 8) - kitty -e nano "$defaultDir/Settings.conf" + kitty -e nano "$configs/Settings.conf" ;; 9) - kitty -e nano "$defaultDir/Keybinds.conf" + kitty -e nano "$configs/Keybinds.conf" ;; *) ;; diff --git a/config/hypr/UserScripts/Sunset.sh b/config/hypr/UserScripts/Sunset.sh index 96c27c5..50e386d 100755 --- a/config/hypr/UserScripts/Sunset.sh +++ b/config/hypr/UserScripts/Sunset.sh @@ -1,2 +1,7 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## + +# wlsunset project page +# https://sr.ht/~kennylevinsen/wlsunset/ + wlsunset -t 4000 -T 6500 -d 900 -S 07:00 -s 19:00 \ No newline at end of file diff --git a/config/hypr/UserScripts/Wallpaper.sh b/config/hypr/UserScripts/Wallpaper.sh deleted file mode 100755 index d75d2ea..0000000 --- a/config/hypr/UserScripts/Wallpaper.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -DIR="$HOME/Pictures/wallpapers" -SCRIPTSDIR="$HOME/.config/hypr/scripts" - -PICS=($(find ${DIR} -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.gif" \))) -RANDOMPICS=${PICS[ $RANDOM % ${#PICS[@]} ]} - - -# Transition config -FPS=60 -TYPE="random" -DURATION=1 -BEZIER=".43,1.19,1,.4" -SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION --transition-bezier $BEZIER" - - -swww query || swww init && swww img ${RANDOMPICS} $SWWW_PARAMS - - -${SCRIPTSDIR}/PywalSwww.sh -sleep 1 -${SCRIPTSDIR}/Refresh.sh - diff --git a/config/hypr/UserScripts/WallpaperAutoChange.sh b/config/hypr/UserScripts/WallpaperAutoChange.sh new file mode 100755 index 0000000..56f2ee0 --- /dev/null +++ b/config/hypr/UserScripts/WallpaperAutoChange.sh @@ -0,0 +1,37 @@ +#!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# source https://wiki.archlinux.org/title/Hyprland#Using_a_script_to_change_wallpaper_every_X_minutes + +# This script will randomly go through the files of a directory, setting it +# up as the wallpaper at regular intervals +# +# NOTE: this script uses bash (not POSIX shell) for the RANDOM variable + +pywal_refresh=$HOME/.config/hypr/scripts/RefreshNoWaybar.sh + +if [[ $# -lt 1 ]] || [[ ! -d $1 ]]; then + echo "Usage: + $0 " + exit 1 +fi + +# Edit below to control the images transition +export SWWW_TRANSITION_FPS=60 +export SWWW_TRANSITION_TYPE=simple + +# This controls (in seconds) when to switch to the next image +INTERVAL=1800 + +while true; do + find "$1" \ + | while read -r img; do + echo "$((RANDOM % 1000)):$img" + done \ + | sort -n | cut -d':' -f2- \ + | while read -r img; do + swww img "$img" + $pywal_refresh + sleep $INTERVAL + + done +done diff --git a/config/hypr/UserScripts/WallpaperRandom.sh b/config/hypr/UserScripts/WallpaperRandom.sh index 13bd299..f8cc54f 100755 --- a/config/hypr/UserScripts/WallpaperRandom.sh +++ b/config/hypr/UserScripts/WallpaperRandom.sh @@ -1,35 +1,26 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Script for Random Wallpaper ( CTRL ALT W) + +wallDIR="$HOME/Pictures/wallpapers" +scriptsDir="$HOME/.config/hypr/scripts" + +PICS=($(find ${wallDIR} -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.gif" \))) +RANDOMPICS=${PICS[ $RANDOM % ${#PICS[@]} ]} + + +# Transition config +FPS=60 +TYPE="random" +DURATION=1 +BEZIER=".43,1.19,1,.4" +SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION --transition-bezier $BEZIER" + + +swww query || swww init && swww img ${RANDOMPICS} $SWWW_PARAMS + + +${scriptsDir}/PywalSwww.sh +sleep 1 +${scriptsDir}/Refresh.sh -# This script will randomly go through the files of a directory, setting it -# up as the wallpaper at regular intervals -# -# NOTE: this script uses bash (not POSIX shell) for the RANDOM variable - -pywal_refresh=$HOME/.config/hypr/scripts/RefreshNoWaybar.sh - -if [[ $# -lt 1 ]] || [[ ! -d $1 ]]; then - echo "Usage: - $0 " - exit 1 -fi - -# Edit below to control the images transition -export SWWW_TRANSITION_FPS=60 -export SWWW_TRANSITION_TYPE=simple - -# This controls (in seconds) when to switch to the next image -INTERVAL=1800 - -while true; do - find "$1" \ - | while read -r img; do - echo "$((RANDOM % 1000)):$img" - done \ - | sort -n | cut -d':' -f2- \ - | while read -r img; do - swww img "$img" - $pywal_refresh - sleep $INTERVAL - - done -done diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 5c3f2b9..663fb54 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -1,9 +1,11 @@ #!/bin/bash +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# This script for selecting wallpapers (SUPER W) SCRIPTSDIR="$HOME/.config/hypr/scripts" # WALLPAPERS PATH -DIR="$HOME/Pictures/wallpapers" +wallDIR="$HOME/Pictures/wallpapers" # Transition config FPS=30 @@ -18,7 +20,7 @@ if pidof swaybg > /dev/null; then fi # Retrieve image files -PICS=($(ls "${DIR}" | grep -E ".jpg$|.jpeg$|.png$|.gif$")) +PICS=($(ls "${wallDIR}" | grep -E ".jpg$|.jpeg$|.png$|.gif$")) RANDOM_PIC="${PICS[$((RANDOM % ${#PICS[@]}))]}" RANDOM_PIC_NAME="${#PICS[@]}. random" @@ -29,7 +31,7 @@ menu() { for i in "${!PICS[@]}"; do # Displaying .gif to indicate animated images if [[ -z $(echo "${PICS[$i]}" | grep .gif$) ]]; then - printf "$(echo "${PICS[$i]}" | cut -d. -f1)\x00icon\x1f${DIR}/${PICS[$i]}\n" + printf "$(echo "${PICS[$i]}" | cut -d. -f1)\x00icon\x1f${wallDIR}/${PICS[$i]}\n" else printf "${PICS[$i]}\n" fi @@ -50,7 +52,7 @@ main() { # Random choice case if [ "$choice" = "$RANDOM_PIC_NAME" ]; then - swww img "${DIR}/${RANDOM_PIC}" $SWWW_PARAMS + swww img "${wallDIR}/${RANDOM_PIC}" $SWWW_PARAMS exit 0 fi @@ -65,7 +67,7 @@ main() { done if [[ $pic_index -ne -1 ]]; then - swww img "${DIR}/${PICS[$pic_index]}" $SWWW_PARAMS + swww img "${wallDIR}/${PICS[$pic_index]}" $SWWW_PARAMS else echo "Image not found." exit 1 diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf index 47bfae0..1da7e9f 100644 --- a/config/hypr/configs/Keybinds.conf +++ b/config/hypr/configs/Keybinds.conf @@ -1,8 +1,13 @@ ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Default Keybinds +# visit https://wiki.hyprland.org/Configuring/Binds/ for more info $mainMod = SUPER +# Default $scriptsDir = $HOME/.config/hypr/scripts +$configs = $HOME/.config/hypr/configs +# User +$UserConfigs = $HOME/.config/hypr/UserConfigs $UserScripts = $HOME/.config/hypr/UserScripts bind = CTRL ALT, Delete, exec, hyprctl dispatch exit 0 @@ -29,7 +34,7 @@ bind = $mainMod SHIFT, N, exec, swaync-client -t -sw # swayNC panel bind = $mainMod, E, exec, $UserScripts/QuickEdit.sh # Quick Edit Hyprland Settings bind = $mainMod SHIFT, M, exec, $UserScripts/RofiBeats.sh # online music bind = $mainMod, W, exec, $UserScripts/WallpaperSelect.sh # Select wallpaper to apply -bind = CTRL ALT, W, exec, $UserScripts/Wallpaper.sh # Random wallpapers +bind = CTRL ALT, W, exec, $UserScripts/WallpaperRandom.sh # Random wallpapers # Waybar / Bar related bind = $mainMod, B, exec, killall -SIGUSR1 waybar # Toggle hide/show waybar @@ -44,7 +49,6 @@ bind = $mainMod, K, layoutmsg, cycleprev bind = $mainMod, M, exec, hyprctl dispatch splitratio 0.3 bind = $mainMod, P, pseudo, # dwindle bind = $mainMod CTRL, Return, layoutmsg, swapwithmaster -bind = $mainMod SHIFT, M, exec, hyprctl dispatch splitratio -0.3 # group bind = $mainMod, G, togglegroup diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 24c0be6..69f421c 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -11,12 +11,9 @@ $UserConfigs = $HOME/.config/hypr/UserConfigs source= $UserConfigs/Startup_Apps.conf source= $UserConfigs/ENVariables.conf -source= $UserConfigs/UserKeybinds.conf -source= $UserConfigs/UserSettings.conf source= $UserConfigs/Monitors.conf source= $UserConfigs/Laptops.conf source= $UserConfigs/LaptopDisplay.conf source= $UserConfigs/WindowRules.conf - - - +source= $UserConfigs/UserKeybinds.conf +source= $UserConfigs/UserSettings.conf \ No newline at end of file diff --git a/config/hypr/scripts/AirplaneMode.sh b/config/hypr/scripts/AirplaneMode.sh index f3a5062..1176c80 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 14c03da..04987ab 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 3bdcebc..f96c6e0 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 95789f5..8ad0dd4 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 93bc2fe..5981024 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 eb717ea..ee6b512 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 ec8c447..dab6e81 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 d53ec7d..f05676e 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 90c9ec4..5b79cf0 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 538b6ef..1e67678 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 9d97044..d9855e4 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 ef5e74f..048c1b0 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 031c74d..07b1211 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 70a994e..389ec73 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 d91d3f6..0cbadaf 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 b5e0f55..a585eb8 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 be06167..f0c3d56 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 6667cc5..4182a5a 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 1d5eeac..ddf4398 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 a53a567..90451c6 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 1fcb324..47ad48f 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 f68491c..1c18211 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 458a31b..77fce82 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 dbe0ee7..31146b5 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 9395c52..bbcb6ea 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 71d2144..7181fc5 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