From bc1f2b18d88403449ce72e637ecc183b1de06a70 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 17 Dec 2023 19:54:53 +0900 Subject: [PATCH 1/5] updated gamemode.sh --- config/hypr/scripts/GameMode.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/hypr/scripts/GameMode.sh b/config/hypr/scripts/GameMode.sh index fe3fed7..0e6f83a 100755 --- a/config/hypr/scripts/GameMode.sh +++ b/config/hypr/scripts/GameMode.sh @@ -19,9 +19,11 @@ if [ "$HYPRGAMEMODE" = 1 ] ; then exit else swww init && swww img "$HOME/.config/rofi/.current_wallpaper" + sleep 0.1 + ${SCRIPTSDIR}/PywalSwww.sh sleep 0.5 ${SCRIPTSDIR}/Refresh.sh - dunstify -u low -i "$dunst_notif" "gamemode disabled. All animations normal" + dunstify -u normal -i "$dunst_notif" "gamemode disabled. All animations normal" exit fi hyprctl reload From 18d13f4fa7f1558d4b3056f59313beb936400c09 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 17 Dec 2023 20:05:30 +0900 Subject: [PATCH 2/5] updated copy.sh --- copy.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/copy.sh b/copy.sh index 5db1ea5..7244ed3 100755 --- a/copy.sh +++ b/copy.sh @@ -2,6 +2,8 @@ ### https://github.com/JaKooLit/JaKooLit +wallpaper=$HOME/Pictures/wallpapers/CuteCat.png + # Check if running as root. If root, script will exit if [[ $EUID -eq 0 ]]; then echo "This script should not be executed as root! Exiting......." @@ -162,6 +164,8 @@ printf "${NOTE} - copying dotfiles\n" fi done +printf "\n%.0s" {1..2} + # Copying config files printf " Copying config files...\n" mkdir -p ~/.config @@ -222,12 +226,11 @@ else rm -r "$HOME/.config/waybar/configs/[TOP] Default" "$HOME/.config/waybar/configs/[BOT] Default" 2>&1 | tee -a "$LOG" fi - # symlinks for waybar style ln -sf "$HOME/.config/waybar/style/[Pywal] Chroma Fusion.css" "$HOME/.config/waybar/style.css" && \ # initialize pywal to avoid config error on hyprland -wal -i ~/Pictures/wallpapers/anime-girl-abyss.png 2>&1 | tee -a "$LOG" +wal -i $wallpaper -s -t 2>&1 | tee -a "$LOG" #initial symlink for Pywal Dark and Light for Rofi Themes ln -sf "$HOME/.cache/wal/colors-rofi-dark.rasi" "$HOME/.config/rofi/pywal-color/pywal-theme.rasi" From 96c5794d550d34bce500828f4160667d70d60681 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 17 Dec 2023 20:49:07 +0900 Subject: [PATCH 3/5] final tweak.. I hope --- config/hypr/configs/Execs.conf | 8 +++----- config/hypr/initial-boot.sh | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/config/hypr/configs/Execs.conf b/config/hypr/configs/Execs.conf index 03f7f43..76ec382 100644 --- a/config/hypr/configs/Execs.conf +++ b/config/hypr/configs/Execs.conf @@ -10,7 +10,8 @@ $WallpaperPath = $HOME/Pictures/wallpapers exec-once = $HOME/.config/hypr/initial-boot.sh # wallpaper stuff / More wallpaper options below -exec-once = swww query || swww init +exec-once = swww query || swww init +exec-once = $SwwwRandom $WallpaperPath # random wallpaper switcher every 30 minutes # Startup exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP @@ -22,7 +23,7 @@ exec-once = $scriptsDir/Polkit.sh # starup apps exec-once = waybar & exec-once = dunst & -exec-once = blueman-applet & +#exec-once = blueman-applet & exec-once = nm-applet --indicator & #exec-once = rog-control-center & @@ -40,10 +41,7 @@ exec-once = swayidle -w timeout 900 '$lock' # sway idle without lock #exec-once = swayidle -w timeout 900 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' - ## Here are list of features available but disabled by default - -#exec-once = $SwwwRandom $WallpaperPath # random wallpaper switcher every 30 minutes #exec-once = swww query || swww init && swww img $HOME/Pictures/wallpapers/mecha-nostalgia.png # persistent wallpaper #gnome polkit for nixos diff --git a/config/hypr/initial-boot.sh b/config/hypr/initial-boot.sh index a992353..f0524bc 100755 --- a/config/hypr/initial-boot.sh +++ b/config/hypr/initial-boot.sh @@ -17,7 +17,7 @@ if [ ! -f ~/.config/hypr/.initial_startup_done ]; then # Initialize pywal printf " Initializing pywal........\n\n" - wal -i "$wallpaper" + wal -i $wallpaper -s -t # Initial symlink for Pywal Dark and Light for Rofi Themes ln -sf "$HOME/.cache/wal/colors-rofi-dark.rasi" "$HOME/.config/rofi/pywal-color/pywal-theme.rasi" From 70d3ed24206ba3445a73b75328f7688c6f78e894 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 17 Dec 2023 22:09:37 +0900 Subject: [PATCH 4/5] minor tweaks before final --- config/hypr/configs/Settings.conf | 2 +- config/hypr/configs/WindowRules.conf | 20 ++++++++----------- config/hypr/scripts/AirplaneMode.sh | 2 +- config/hypr/scripts/ChangeBlur.sh | 2 +- config/hypr/scripts/SwitchKeyboardLayout.sh | 4 ++++ copy.sh | 22 ++++++++++++++------- 6 files changed, 30 insertions(+), 22 deletions(-) diff --git a/config/hypr/configs/Settings.conf b/config/hypr/configs/Settings.conf index 066998f..55b3dec 100644 --- a/config/hypr/configs/Settings.conf +++ b/config/hypr/configs/Settings.conf @@ -59,7 +59,7 @@ decoration { blur { enabled = true - size = 6 + size = 5 passes = 2 ignore_opacity = true new_optimizations = true diff --git a/config/hypr/configs/WindowRules.conf b/config/hypr/configs/WindowRules.conf index bfcb022..99bc50a 100644 --- a/config/hypr/configs/WindowRules.conf +++ b/config/hypr/configs/WindowRules.conf @@ -1,7 +1,6 @@ ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more - windowrule = float, org.kde.polkit-kde-authentication-agent-1 windowrule = float, nm-connection-editor|blueman-manager windowrule = float, pavucontrol @@ -17,12 +16,9 @@ windowrule = float, yad #windowrule = fullscreen,gamescope #windowrule = workspace 6 silent,^(gamescope)$ -# windowrule = move 1380 495,^(pavucontrol) # Make sure to change these valuers -windowrule = center,^(pavucontrol) # Make sure to delete this line if uncommen the line above -#windowrule = size 533 533,^(pavucontrol) # These are optionals. But recommended +windowrule = center,^(pavucontrol) # windowrule v2 - windowrulev2 = workspace 1, class:^(thunderbird)$ windowrulev2 = workspace 2, class:^(firefox)$ windowrulev2 = workspace 2, class:^(Firefox-esr)$ @@ -38,15 +34,15 @@ windowrulev2 = workspace 9 silent, class:^(audacious)$ #opacity (transparent) #enable as desired windowrulev2 = opacity 0.9 0.6, class:^([Rr]ofi)$ -windowrulev2 = opacity 0.9 0.7, class:^(firefox)$ -windowrulev2 = opacity 0.9 0.8, class:^([Tt]hunar)$ +windowrulev2 = opacity 0.9 0.6, class:^(firefox)$ +windowrulev2 = opacity 0.9 0.7, class:^([Tt]hunar)$ windowrulev2 = opacity 0.8 0.6, class:^(pcmanfm-qt)$ windowrulev2 = opacity 0.9 0.7, class:^(gedit)$ -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:^(yad)$ +windowrulev2 = opacity 0.9 0.7, class:^(kitty)$ +windowrulev2 = opacity 0.9 0.6, class:^(mousepad)$ +windowrulev2 = opacity 0.9 0.6, class:^(codium-url-handler)$ +windowrulev2 = opacity 0.9 0.6, class:^(VSCodium)$ +windowrulev2 = opacity 0.9 0.6, class:^(yad)$ #layerrule = unset,class:^([Rr]ofi)$ #layerrule = blur,class:^([Rr]ofi)$ diff --git a/config/hypr/scripts/AirplaneMode.sh b/config/hypr/scripts/AirplaneMode.sh index dc9a595..428a09b 100755 --- a/config/hypr/scripts/AirplaneMode.sh +++ b/config/hypr/scripts/AirplaneMode.sh @@ -1,6 +1,6 @@ #!/bin/bash -dunstify -u low -i "$dunst_notif" +dunst_notif="$HOME/.config/dunst/images/bell.png" wifi="$(nmcli r wifi | awk 'FNR = 2 {print $1}')" if [ "$wifi" == "enabled" ]; then diff --git a/config/hypr/scripts/ChangeBlur.sh b/config/hypr/scripts/ChangeBlur.sh index 46d8a1f..891e22e 100755 --- a/config/hypr/scripts/ChangeBlur.sh +++ b/config/hypr/scripts/ChangeBlur.sh @@ -9,7 +9,7 @@ if [ "${STATE}" == "2" ]; then hyprctl keyword decoration:blur:passes 1 dunstify -u low -i "$dunst_notif" "Less blur" else - hyprctl keyword decoration:blur:size 6 + hyprctl keyword decoration:blur:size 5 hyprctl keyword decoration:blur:passes 2 dunstify -u low -i "$dunst_notif" "Normal blur" fi diff --git a/config/hypr/scripts/SwitchKeyboardLayout.sh b/config/hypr/scripts/SwitchKeyboardLayout.sh index e7c56b4..9d1ee84 100755 --- a/config/hypr/scripts/SwitchKeyboardLayout.sh +++ b/config/hypr/scripts/SwitchKeyboardLayout.sh @@ -2,6 +2,7 @@ layout_f="$HOME/.cache/kb_layout" settings_file="$HOME/.config/hypr/configs/Settings.conf" +dunst_notif="$HOME/.config/dunst/images/bell.png" # Check if ~/.cache/kb_layout exists and create it with a default layout from Settings.conf if not found if [ ! -f "$layout_f" ]; then @@ -37,3 +38,6 @@ new_layout="${layout_mapping[next_index]}" # Update the keyboard layout hyprctl keyword input:kb_layout "$new_layout" echo "$new_layout" > "$layout_f" + +# Notification for the new keyboard layout +dunstify -u low -i "$dunst_notif" "Keyboard layout set to $new_layout" \ No newline at end of file diff --git a/copy.sh b/copy.sh index 7244ed3..453443f 100755 --- a/copy.sh +++ b/copy.sh @@ -99,8 +99,13 @@ if [ "$confirm" = "y" ]; then mv temp.conf config/hypr/configs/Settings.conf else # If the detected layout is not correct, prompt the user to enter the correct layout - printf "${YELLOW} Ensure to type in the proper keyboard layout else Hyprland will crash and might not start!!!\n\n" - printf "${WARN} - Sample Keyboard layouts are us, kr, es, gb, de, pl, etc.\n\n" + printf "\n%.0s" {1..2} + echo "$(tput bold)$(tput setaf 3)ATTENTION!!!! VERY IMPORTANT!!!! $(tput sgr0)" + echo "$(tput bold)$(tput setaf 7)Setting a wrong value here will result in Hyprland not starting $(tput sgr0)" + echo "$(tput bold)$(tput setaf 7)If you are not sure, keep it in us layout. You can change later on! $(tput sgr0)" + echo "$(tput bold)$(tput setaf 7)You can also set more than 2 layouts!$(tput sgr0)" + echo "$(tput bold)$(tput setaf 7)ie: us,kr,es $(tput sgr0)" + printf "\n%.0s" {1..2} read -p "${CAT} - Please enter the correct keyboard layout: " new_layout # Update the 'kb_layout=' line with the correct layout in the file awk -v new_layout="$new_layout" '/kb_layout/ {$0 = " kb_layout=" new_layout} 1' config/hypr/configs/Settings.conf > temp.conf @@ -192,19 +197,22 @@ while true; do case $WALL in [Yy]) echo "${NOTE} Downloading additional wallpapers..." - if git clone https://github.com/JaKooLit/Wallpaper-Bank.git 2>&1 | tee -a "$LOG"; then - if cp -R Wallpaper-Bank/wallpapers/* ~/Pictures/wallpapers/; then 2>&1 | tee -a "$LOG" + if git clone --progress "https://github.com/JaKooLit/Wallpaper-Bank.git" 2>&1 | tee -a "$LOG"; then + echo "${NOTE} Wallpapers downloaded successfully." + + if cp -R Wallpaper-Bank/wallpapers/* ~/Pictures/wallpapers/ 2>&1 | tee -a "$LOG"; then + echo "${NOTE} Wallpapers copied successfully." rm -rf Wallpaper-Bank 2>&1 | tee -a "$LOG" # Remove cloned repository after copying wallpapers break else - echo "${ERROR} Copying wallpapers failed" 2>&1 | tee -a "$LOG" + echo "${ERROR} Copying wallpapers failed" >&2 | tee -a "$LOG" fi else - echo "${ERROR} Downloading additional wallpapers failed" 2>&1 | tee -a "$LOG" + echo "${ERROR} Downloading additional wallpapers failed" >&2 | tee -a "$LOG" fi ;; [Nn]) - echo "You chose not to download additional wallpapers." 2>&1 | tee -a "$LOG" + echo "You chose not to download additional wallpapers." >&2 | tee -a "$LOG" break ;; *) From 4b2e29a0e96a92f1fac7909281db6000571e5127 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 17 Dec 2023 22:56:45 +0900 Subject: [PATCH 5/5] updated pulseaudio waybar module --- config/hypr/scripts/Volume.sh | 4 ++-- config/waybar/modules | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/hypr/scripts/Volume.sh b/config/hypr/scripts/Volume.sh index 1273a5d..d0eb0b6 100755 --- a/config/hypr/scripts/Volume.sh +++ b/config/hypr/scripts/Volume.sh @@ -29,9 +29,9 @@ get_icon() { # Notify notify_user() { if [[ "$(get_volume)" == "Muted" ]]; then - dunstify -h string:x-dunst-stack-tag:volume_notif -u low -i "$(get_icon)" "Volume : Muted" + dunstify -h string:x-dunst-stack-tag:volume_notif -u low -i "$(get_icon)" "Volume: Muted" else - dunstify -h int:value:"$(get_volume | sed 's/%//')" -h string:x-dunst-stack-tag:volume_notif -u low -i "$(get_icon)" "Volume : $(get_volume)" + dunstify -h int:value:"$(get_volume | sed 's/%//')" -h string:x-dunst-stack-tag:volume_notif -u low -i "$(get_icon)" "Volume: $(get_volume)" fi } diff --git a/config/waybar/modules b/config/waybar/modules index 1ff46ba..918865b 100644 --- a/config/waybar/modules +++ b/config/waybar/modules @@ -402,7 +402,7 @@ }, "pulseaudio": { - "format": "{icon}", + "format": "{icon} {volume}%", "format-bluetooth": "{icon} 󰂰 {volume}%", "format-muted": "󰖁", "format-icons": {