From 5268ec683acaad4967989a33248448d739250be8 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Mon, 4 Mar 2024 21:01:16 +0530 Subject: [PATCH] Apply patch, use implicit path of bash --- hyprland-config/hypr/UserScripts/QuickEdit.sh | 2 +- hyprland-config/hypr/UserScripts/RainbowBorders.sh | 2 +- hyprland-config/hypr/UserScripts/RofiBeats.sh | 2 +- hyprland-config/hypr/UserScripts/Sounds.sh | 2 +- hyprland-config/hypr/UserScripts/WallpaperAutoChange.sh | 2 +- hyprland-config/hypr/UserScripts/WallpaperRandom.sh | 2 +- hyprland-config/hypr/UserScripts/WallpaperSelect.sh | 2 +- hyprland-config/hypr/UserScripts/Weather.py | 2 +- hyprland-config/hypr/UserScripts/Weather.sh | 4 ++-- hyprland-config/hypr/UserScripts/ZshChangeTheme.sh | 2 +- hyprland-config/hypr/initial-boot.sh | 3 ++- hyprland-config/hypr/scripts/AirplaneMode.sh | 2 +- hyprland-config/hypr/scripts/Brightness.sh | 2 +- hyprland-config/hypr/scripts/BrightnessKbd.sh | 2 +- hyprland-config/hypr/scripts/ChangeBlur.sh | 2 +- hyprland-config/hypr/scripts/ChangeLayout.sh | 2 +- hyprland-config/hypr/scripts/ClipManager.sh | 2 +- hyprland-config/hypr/scripts/DarkLight.sh | 2 +- hyprland-config/hypr/scripts/GameMode.sh | 2 +- hyprland-config/hypr/scripts/KeyHints.sh | 2 +- hyprland-config/hypr/scripts/LockScreen.sh | 2 +- hyprland-config/hypr/scripts/MediaCtrl.sh | 2 +- hyprland-config/hypr/scripts/Polkit-NixOS.sh | 2 +- hyprland-config/hypr/scripts/Polkit.sh | 8 +++++++- hyprland-config/hypr/scripts/PortalHyprland.sh | 2 +- hyprland-config/hypr/scripts/PywalSwww.sh | 2 +- hyprland-config/hypr/scripts/Refresh.sh | 2 +- hyprland-config/hypr/scripts/RefreshNoWaybar.sh | 2 +- hyprland-config/hypr/scripts/RofiEmoji.sh | 2 +- hyprland-config/hypr/scripts/ScreenShot.sh | 2 +- hyprland-config/hypr/scripts/SwitchKeyboardLayout.sh | 2 +- hyprland-config/hypr/scripts/TouchPad.sh | 2 +- hyprland-config/hypr/scripts/Volume.sh | 2 +- hyprland-config/hypr/scripts/WaybarCava.sh | 2 +- hyprland-config/hypr/scripts/WaybarLayout.sh | 2 +- hyprland-config/hypr/scripts/WaybarStyles.sh | 2 +- hyprland-config/hypr/scripts/Wlogout.sh | 2 +- 37 files changed, 45 insertions(+), 38 deletions(-) diff --git a/hyprland-config/hypr/UserScripts/QuickEdit.sh b/hyprland-config/hypr/UserScripts/QuickEdit.sh index 163101e2..6e6876b5 100755 --- a/hyprland-config/hypr/UserScripts/QuickEdit.sh +++ b/hyprland-config/hypr/UserScripts/QuickEdit.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Rofi menu for Quick Edit / View of Settings (SUPER E) configs="$HOME/.config/hypr/configs" diff --git a/hyprland-config/hypr/UserScripts/RainbowBorders.sh b/hyprland-config/hypr/UserScripts/RainbowBorders.sh index 1f5e6cdb..0cc65fa0 100755 --- a/hyprland-config/hypr/UserScripts/RainbowBorders.sh +++ b/hyprland-config/hypr/UserScripts/RainbowBorders.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function random_hex() { random_hex=("0xff$(openssl rand -hex 3)") diff --git a/hyprland-config/hypr/UserScripts/RofiBeats.sh b/hyprland-config/hypr/UserScripts/RofiBeats.sh index 16777f55..959ec370 100755 --- a/hyprland-config/hypr/UserScripts/RofiBeats.sh +++ b/hyprland-config/hypr/UserScripts/RofiBeats.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Directory for icons iDIR="$HOME/.config/swaync/icons" diff --git a/hyprland-config/hypr/UserScripts/Sounds.sh b/hyprland-config/hypr/UserScripts/Sounds.sh index 0d2bfff7..50cea319 100755 --- a/hyprland-config/hypr/UserScripts/Sounds.sh +++ b/hyprland-config/hypr/UserScripts/Sounds.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # This script is used to play system sounds. diff --git a/hyprland-config/hypr/UserScripts/WallpaperAutoChange.sh b/hyprland-config/hypr/UserScripts/WallpaperAutoChange.sh index 56f2ee05..789edba0 100755 --- a/hyprland-config/hypr/UserScripts/WallpaperAutoChange.sh +++ b/hyprland-config/hypr/UserScripts/WallpaperAutoChange.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # source https://wiki.archlinux.org/title/Hyprland#Using_a_script_to_change_wallpaper_every_X_minutes diff --git a/hyprland-config/hypr/UserScripts/WallpaperRandom.sh b/hyprland-config/hypr/UserScripts/WallpaperRandom.sh index f8cc54f9..629bcb24 100755 --- a/hyprland-config/hypr/UserScripts/WallpaperRandom.sh +++ b/hyprland-config/hypr/UserScripts/WallpaperRandom.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Script for Random Wallpaper ( CTRL ALT W) diff --git a/hyprland-config/hypr/UserScripts/WallpaperSelect.sh b/hyprland-config/hypr/UserScripts/WallpaperSelect.sh index 663fb540..d0b766fe 100755 --- a/hyprland-config/hypr/UserScripts/WallpaperSelect.sh +++ b/hyprland-config/hypr/UserScripts/WallpaperSelect.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # This script for selecting wallpapers (SUPER W) diff --git a/hyprland-config/hypr/UserScripts/Weather.py b/hyprland-config/hypr/UserScripts/Weather.py index 154c1589..c7bbaa61 100755 --- a/hyprland-config/hypr/UserScripts/Weather.py +++ b/hyprland-config/hypr/UserScripts/Weather.py @@ -2,7 +2,7 @@ # From https://raw.githubusercontent.com/rxyhn/dotfiles/main/home/rxyhn/modules/desktop/waybar/scripts/waybar-wttr.py ## ensure to insert city inside "" -city = "" +city = "Kolkata" import json import requests from datetime import datetime diff --git a/hyprland-config/hypr/UserScripts/Weather.sh b/hyprland-config/hypr/UserScripts/Weather.sh index 40048710..1ba985e7 100755 --- a/hyprland-config/hypr/UserScripts/Weather.sh +++ b/hyprland-config/hypr/UserScripts/Weather.sh @@ -1,6 +1,6 @@ -#!/bin/bash +#!/usr/bin/env bash -city= +city=Kolkata cachedir=~/.cache/rbn cachefile=${0##*/}-$1 diff --git a/hyprland-config/hypr/UserScripts/ZshChangeTheme.sh b/hyprland-config/hypr/UserScripts/ZshChangeTheme.sh index 7057ed2e..996f319e 100755 --- a/hyprland-config/hypr/UserScripts/ZshChangeTheme.sh +++ b/hyprland-config/hypr/UserScripts/ZshChangeTheme.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash themes_dir="$HOME/.oh-my-zsh/themes" file_extension=".zsh-theme" diff --git a/hyprland-config/hypr/initial-boot.sh b/hyprland-config/hypr/initial-boot.sh index fffdcd98..75d84660 100755 --- a/hyprland-config/hypr/initial-boot.sh +++ b/hyprland-config/hypr/initial-boot.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash + # A bash script designed to run only once dotfiles installed # THIS SCRIPT CAN BE DELETED ONCE SUCCESSFULLY BOOTED!! And also, edit ~/.config/hypr/configs/Settings.conf diff --git a/hyprland-config/hypr/scripts/AirplaneMode.sh b/hyprland-config/hypr/scripts/AirplaneMode.sh index 1176c80f..d1be656a 100755 --- a/hyprland-config/hypr/scripts/AirplaneMode.sh +++ b/hyprland-config/hypr/scripts/AirplaneMode.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Airplane Mode. Turning on or off all wifi using rfkill. diff --git a/hyprland-config/hypr/scripts/Brightness.sh b/hyprland-config/hypr/scripts/Brightness.sh index 04987ab1..64a0456e 100755 --- a/hyprland-config/hypr/scripts/Brightness.sh +++ b/hyprland-config/hypr/scripts/Brightness.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Script for Monitor backlights (if supported) using brightnessctl diff --git a/hyprland-config/hypr/scripts/BrightnessKbd.sh b/hyprland-config/hypr/scripts/BrightnessKbd.sh index f96c6e08..3206bb85 100755 --- a/hyprland-config/hypr/scripts/BrightnessKbd.sh +++ b/hyprland-config/hypr/scripts/BrightnessKbd.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Script for keyboard backlights (if supported) using brightnessctl diff --git a/hyprland-config/hypr/scripts/ChangeBlur.sh b/hyprland-config/hypr/scripts/ChangeBlur.sh index 8ad0dd40..ff3691d3 100755 --- a/hyprland-config/hypr/scripts/ChangeBlur.sh +++ b/hyprland-config/hypr/scripts/ChangeBlur.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## ## Script for changing blurs on the fly diff --git a/hyprland-config/hypr/scripts/ChangeLayout.sh b/hyprland-config/hypr/scripts/ChangeLayout.sh index 5981024a..a3f7fdfa 100755 --- a/hyprland-config/hypr/scripts/ChangeLayout.sh +++ b/hyprland-config/hypr/scripts/ChangeLayout.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # for changing Hyprland Layouts (Master or Dwindle) on the fly diff --git a/hyprland-config/hypr/scripts/ClipManager.sh b/hyprland-config/hypr/scripts/ClipManager.sh index 682174fc..a722ffec 100755 --- a/hyprland-config/hypr/scripts/ClipManager.sh +++ b/hyprland-config/hypr/scripts/ClipManager.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Clipboard Manager. This script uses cliphist, rofi, and wl-copy. diff --git a/hyprland-config/hypr/scripts/DarkLight.sh b/hyprland-config/hypr/scripts/DarkLight.sh index 885c7c6a..5f63e04e 100755 --- a/hyprland-config/hypr/scripts/DarkLight.sh +++ b/hyprland-config/hypr/scripts/DarkLight.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 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 diff --git a/hyprland-config/hypr/scripts/GameMode.sh b/hyprland-config/hypr/scripts/GameMode.sh index f05676eb..ef2b0650 100755 --- a/hyprland-config/hypr/scripts/GameMode.sh +++ b/hyprland-config/hypr/scripts/GameMode.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Game Mode. Turning off all animations diff --git a/hyprland-config/hypr/scripts/KeyHints.sh b/hyprland-config/hypr/scripts/KeyHints.sh index 5b79cf06..0f040ce9 100755 --- a/hyprland-config/hypr/scripts/KeyHints.sh +++ b/hyprland-config/hypr/scripts/KeyHints.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Keyhints. Idea got from Garuda Hyprland diff --git a/hyprland-config/hypr/scripts/LockScreen.sh b/hyprland-config/hypr/scripts/LockScreen.sh index 1e676780..9162fef9 100755 --- a/hyprland-config/hypr/scripts/LockScreen.sh +++ b/hyprland-config/hypr/scripts/LockScreen.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # For Swaylock diff --git a/hyprland-config/hypr/scripts/MediaCtrl.sh b/hyprland-config/hypr/scripts/MediaCtrl.sh index d9855e4f..e5e676a6 100755 --- a/hyprland-config/hypr/scripts/MediaCtrl.sh +++ b/hyprland-config/hypr/scripts/MediaCtrl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Playerctl diff --git a/hyprland-config/hypr/scripts/Polkit-NixOS.sh b/hyprland-config/hypr/scripts/Polkit-NixOS.sh index 048c1b02..a872c56c 100755 --- a/hyprland-config/hypr/scripts/Polkit-NixOS.sh +++ b/hyprland-config/hypr/scripts/Polkit-NixOS.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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 diff --git a/hyprland-config/hypr/scripts/Polkit.sh b/hyprland-config/hypr/scripts/Polkit.sh index 07b1211d..57bb5892 100755 --- a/hyprland-config/hypr/scripts/Polkit.sh +++ b/hyprland-config/hypr/scripts/Polkit.sh @@ -1,7 +1,13 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # This is for polkits, it will start from top and will stop if the top is executed +# NixOS detected so load the correct script +if cat /etc/os-release | grep -iq 'ID=nixos'; then + source ./Polkit-NixOS.sh + exit 0 +fi + # Polkit possible paths files to check polkit=( "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" diff --git a/hyprland-config/hypr/scripts/PortalHyprland.sh b/hyprland-config/hypr/scripts/PortalHyprland.sh index 389ec738..971d67b6 100755 --- a/hyprland-config/hypr/scripts/PortalHyprland.sh +++ b/hyprland-config/hypr/scripts/PortalHyprland.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # For manually starting xdg-desktop-portal diff --git a/hyprland-config/hypr/scripts/PywalSwww.sh b/hyprland-config/hypr/scripts/PywalSwww.sh index 4ed7448f..2700c516 100755 --- a/hyprland-config/hypr/scripts/PywalSwww.sh +++ b/hyprland-config/hypr/scripts/PywalSwww.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Pywal Colors for current wallpaper diff --git a/hyprland-config/hypr/scripts/Refresh.sh b/hyprland-config/hypr/scripts/Refresh.sh index a585eb84..5d8ed1ca 100755 --- a/hyprland-config/hypr/scripts/Refresh.sh +++ b/hyprland-config/hypr/scripts/Refresh.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Scripts for refreshing waybar, rofi, swaync, pywal colors diff --git a/hyprland-config/hypr/scripts/RefreshNoWaybar.sh b/hyprland-config/hypr/scripts/RefreshNoWaybar.sh index f0c3d569..da1c8c59 100755 --- a/hyprland-config/hypr/scripts/RefreshNoWaybar.sh +++ b/hyprland-config/hypr/scripts/RefreshNoWaybar.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Modified version of Refresh but no waybar refresh diff --git a/hyprland-config/hypr/scripts/RofiEmoji.sh b/hyprland-config/hypr/scripts/RofiEmoji.sh index 4182a5a9..fad9fcf5 100755 --- a/hyprland-config/hypr/scripts/RofiEmoji.sh +++ b/hyprland-config/hypr/scripts/RofiEmoji.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Rofi Emoticons. Not my own. Cant remember the source diff --git a/hyprland-config/hypr/scripts/ScreenShot.sh b/hyprland-config/hypr/scripts/ScreenShot.sh index f35f9292..d2de6ae8 100755 --- a/hyprland-config/hypr/scripts/ScreenShot.sh +++ b/hyprland-config/hypr/scripts/ScreenShot.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Screenshots scripts diff --git a/hyprland-config/hypr/scripts/SwitchKeyboardLayout.sh b/hyprland-config/hypr/scripts/SwitchKeyboardLayout.sh index 90451c67..5c3d3ebe 100755 --- a/hyprland-config/hypr/scripts/SwitchKeyboardLayout.sh +++ b/hyprland-config/hypr/scripts/SwitchKeyboardLayout.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # This is for changing kb_layouts. Set kb_layouts in $settings_file diff --git a/hyprland-config/hypr/scripts/TouchPad.sh b/hyprland-config/hypr/scripts/TouchPad.sh index 47ad48f6..954b88af 100755 --- a/hyprland-config/hypr/scripts/TouchPad.sh +++ b/hyprland-config/hypr/scripts/TouchPad.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # For disabling touchpad. diff --git a/hyprland-config/hypr/scripts/Volume.sh b/hyprland-config/hypr/scripts/Volume.sh index 8c5af5de..2038b374 100755 --- a/hyprland-config/hypr/scripts/Volume.sh +++ b/hyprland-config/hypr/scripts/Volume.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Scripts for volume controls for audio and mic diff --git a/hyprland-config/hypr/scripts/WaybarCava.sh b/hyprland-config/hypr/scripts/WaybarCava.sh index bf9e7435..ba8346b5 100755 --- a/hyprland-config/hypr/scripts/WaybarCava.sh +++ b/hyprland-config/hypr/scripts/WaybarCava.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Not my own work. This was added through Github PR. Credit to original author diff --git a/hyprland-config/hypr/scripts/WaybarLayout.sh b/hyprland-config/hypr/scripts/WaybarLayout.sh index 31146b59..bbfd6d0f 100755 --- a/hyprland-config/hypr/scripts/WaybarLayout.sh +++ b/hyprland-config/hypr/scripts/WaybarLayout.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Script for waybar layout or configs diff --git a/hyprland-config/hypr/scripts/WaybarStyles.sh b/hyprland-config/hypr/scripts/WaybarStyles.sh index bbcb6ea3..82b2c86b 100755 --- a/hyprland-config/hypr/scripts/WaybarStyles.sh +++ b/hyprland-config/hypr/scripts/WaybarStyles.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Script for waybar styles diff --git a/hyprland-config/hypr/scripts/Wlogout.sh b/hyprland-config/hypr/scripts/Wlogout.sh index 4c53c381..00620f04 100755 --- a/hyprland-config/hypr/scripts/Wlogout.sh +++ b/hyprland-config/hypr/scripts/Wlogout.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # wlogout (Power, Screen Lock, Suspend, etc)