diff options
| -rw-r--r-- | config/hypr/UserConfigs/UserDecorations.conf | 6 | ||||
| -rw-r--r-- | config/hypr/UserConfigs/WindowRules.conf | 5 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/QuickEdit.sh | 35 | ||||
| -rw-r--r-- | config/hypr/monitors.conf | 52 | ||||
| -rw-r--r-- | config/hypr/workspaces.conf | 28 | ||||
| -rwxr-xr-x | copy.sh | 52 |
6 files changed, 152 insertions, 26 deletions
diff --git a/config/hypr/UserConfigs/UserDecorations.conf b/config/hypr/UserConfigs/UserDecorations.conf index b69f26ec..0b450904 100644 --- a/config/hypr/UserConfigs/UserDecorations.conf +++ b/config/hypr/UserConfigs/UserDecorations.conf @@ -10,8 +10,8 @@ source = $HOME/.config/hypr/wallust/wallust-hyprland.conf general { border_size = 2 - gaps_in = 4 - gaps_out = 6 + gaps_in = 2 + gaps_out = 4 col.active_border = $color12 col.inactive_border = $color10 @@ -55,4 +55,4 @@ group { groupbar { col.active = $color0 } -}
\ No newline at end of file +} diff --git a/config/hypr/UserConfigs/WindowRules.conf b/config/hypr/UserConfigs/WindowRules.conf index 4c1e5dc6..05db62f1 100644 --- a/config/hypr/UserConfigs/WindowRules.conf +++ b/config/hypr/UserConfigs/WindowRules.conf @@ -14,6 +14,8 @@ windowrulev2 = tag +browser, class:^([Tt]horium-browser|[Cc]achy-browser)$ windowrulev2 = tag +browser, class:^(zen-alpha|zen)$ windowrulev2 = tag +notif, class:^(swaync-control-center|swaync-notification-window|swaync-client|class)$ +windowrulev2 = tag +nwg, class:^(nwg-displays|nwg-look)$ + # terminal tags windowrulev2 = tag +terminal, class:^(Alacritty|kitty|kitty-dropterm)$ @@ -82,6 +84,7 @@ windowrulev2 = tag +viewer, class:^(eog|org.gnome.Loupe)$ # image viewer windowrulev2 = center, title:^(KooL Quick Cheat Sheet)$ windowrulev2 = center, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*) windowrulev2 = center, title:^(ROG Control)$ +windowrulev2 = center, tag:nwg* windowrulev2 = center, title:^(Keybindings)$ windowrulev2 = center, class:^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$ windowrulev2 = center, class:^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$ @@ -114,6 +117,7 @@ windowrulev2 = float, title:^(KooL Quick Cheat Sheet)$ windowrulev2 = float, tag:wallpaper* windowrulev2 = float, tag:settings* windowrulev2 = float, tag:viewer* +windowrulev2 = float, tag:nwg* windowrulev2 = float, class:([Zz]oom|onedriver|onedriver-launcher)$ windowrulev2 = float, class:(org.gnome.Calculator), title:(Calculator) windowrulev2 = float, class:^(mpv|com.github.rafostar.Clapper)$ @@ -123,6 +127,7 @@ windowrulev2 = float, class:^([Ff]erdium)$ windowrulev2 = float, title:^(Picture-in-Picture)$ #windowrulev2 = float, title:^(Firefox)$ + #windowrule v2 - float popups and dialogue windowrulev2 = float, title:^(Authentication Required)$ windowrulev2 = center, title:^(Authentication Required)$ diff --git a/config/hypr/UserScripts/QuickEdit.sh b/config/hypr/UserScripts/QuickEdit.sh index 09530881..12db89b4 100755 --- a/config/hypr/UserScripts/QuickEdit.sh +++ b/config/hypr/UserScripts/QuickEdit.sh @@ -15,17 +15,17 @@ msg=' ⁉️ Choose which config to View or Edit ⁉️' # Function to display the menu options menu() { cat <<EOF -1. ENV variables -2. Window Rules -3. Monitors -4. User Keybinds -5. User Settings -6. Startup Apps -7. Decorations -8. Animations -9. Workspace Rules -10. Laptop Keybinds -11. Default Keybinds +1. view/edit ENV variables +2. view/edit Window Rules +3. view/edit User Keybinds +4. view/edit User Settings +5. view/edit Startup Apps +6. view/edit Decorations +7. view/edit Animations +8. view/edit Laptop Keybinds +9. view/edit Default Keybinds +10. view/edit Monitors (via nwg-display) +11. view/edit Workspace Rules (nwg-display) EOF } @@ -37,20 +37,22 @@ main() { case $choice in 1) file="$UserConfigs/ENVariables.conf" ;; 2) file="$UserConfigs/WindowRules.conf" ;; - 3) file="$UserConfigs/Monitors.conf" ;; + 3) file="$UserConfigs/UserKeybinds.conf" ;; 4) file="$UserConfigs/UserKeybinds.conf" ;; 5) file="$UserConfigs/UserSettings.conf" ;; 6) file="$UserConfigs/Startup_Apps.conf" ;; 7) file="$UserConfigs/UserDecorations.conf" ;; 8) file="$UserConfigs/UserAnimations.conf" ;; - 9) file="$UserConfigs/WorkspaceRules.conf" ;; - 10) file="$UserConfigs/Laptops.conf" ;; - 11) file="$configs/Keybinds.conf" ;; + 9) file="$UserConfigs/Laptops.conf" ;; + 10) nwg-displays ;; + 11) nwg-displays ;; *) return ;; # Do nothing for invalid choices esac # Open the selected file in the terminal with the text editor - $tty -e $edit "$file" + if [ -n "$file" ]; then + $tty -e $edit "$file" + fi } # Check if rofi is already running @@ -59,3 +61,4 @@ if pidof rofi > /dev/null; then fi main + diff --git a/config/hypr/monitors.conf b/config/hypr/monitors.conf new file mode 100644 index 00000000..b3b75847 --- /dev/null +++ b/config/hypr/monitors.conf @@ -0,0 +1,52 @@ +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # + +# WARN!!! THIS WILL BE OVERWRITTEN by NWG-DISPLAY + +# Monitor Configuration +# See Hyprland wiki for more details +# https://wiki.hyprland.org/Configuring/Monitors/ +# Configure your Display resolution, offset, scale and Monitors here, use `hyprctl monitors` to get the info. + +# Monitors +monitor=,preferred,auto,1 + +# High Refresh Rate +monitor=,highrr,auto,1 + +# High Resolution +monitor=,highres,auto,1 + +# NOTE: for laptop, kindly check notes in Laptops.conf regarding display +# Created this inorder for the monitor display to not wake up if not intended. +# See here: https://github.com/hyprwm/Hyprland/issues/4090 + +# Some examples to set your own monitor +#monitor = eDP-1, preferred, auto, 1 +#monitor = eDP-1, 2560x1440@165, 0x0, 1 #own screen +#monitor = DP-3, 1920x1080@240, auto, 1 +#monitor = DP-1, preferred, auto, 1 +#monitor = HDMI-A-1, preferred,auto,1 + +# QEMU-KVM, virtual box or vmware +#monitor = Virtual-1, 1920x1080@60,auto,1 + +# to disable a monitor +#monitor=name,disable + +# Mirror samples +#monitor=DP-3,1920x1080@60,0x0,1,mirror,DP-2 +#monitor=,preferred,auto,1,mirror,eDP-1 +#monitor=HDMI-A-1,2560x1440@144,0x0,1,mirror,eDP-1 + +# 10 bit monitor support - See wiki https://wiki.hyprland.org/Configuring/Monitors/#10-bit-support - See NOTES below +# NOTE: Colors registered in Hyprland (e.g. the border color) do not support 10 bit. +# NOTE: Some applications do not support screen capture with 10 bit enabled. (Screen captures like OBS may render black screen) +# monitor=,preferred,auto,1,bitdepth,10 + +#monitor=eDP-1,transform,0 +#monitor=eDP-1,addreserved,10,10,10,49 + +# workspaces - Monitor rules +# https://wiki.hyprland.org/Configuring/Workspace-Rules/ +# SUPER E - Workspace-Rules +# See ~/.config/hypr/UserConfigs/WorkspaceRules.conf diff --git a/config/hypr/workspaces.conf b/config/hypr/workspaces.conf new file mode 100644 index 00000000..37471b3e --- /dev/null +++ b/config/hypr/workspaces.conf @@ -0,0 +1,28 @@ +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # + +# WARN THIS WILL BE OVERWRITTEN by NWG-DISPLAY + +# You can set workspace rules to achieve workspace-specific behaviors. +# For instance, you can define a workspace where all windows are drawn without borders or gaps. + +# https://wiki.hyprland.org/Configuring/Workspace-Rules/ + +# Assigning workspace to a certain monitor. Below are just examples +# workspace = 1, monitor:eDP-1 +# workspace = 2, monitor:eDP-1 +# workspace = 3, monitor:eDP-1 +# workspace = 4, monitor:eDP-1 +# workspace = 5, monitor:DP-2 +# workspace = 6, monitor:DP-2 +# workspace = 7, monitor:DP-2 +# workspace = 8, monitor:DP-2 + + +# example rules (from wiki) +# workspace = 3, rounding:false, decorate:false +# workspace = name:coding, rounding:false, decorate:false, gapsin:0, gapsout:0, border:false, decorate:false, monitor:DP-1 +# workspace = 8,bordersize:8 +# workspace = name:Hello, monitor:DP-1, default:true +# workspace = name:gaming, monitor:desc:Chimei Innolux Corporation 0x150C, default:true +# workspace = 5, on-created-empty:[float] firefox +# workspace = special:scratchpad, on-created-empty:foot
\ No newline at end of file @@ -104,7 +104,7 @@ if hostnamectl | grep -q 'Chassis: vm'; then sed -i 's/^\([[:space:]]*no_hardware_cursors[[:space:]]*=[[:space:]]*\)false/\1true/' config/hypr/UserConfigs/UserSettings.conf sed -i '/env = WLR_RENDERER_ALLOW_SOFTWARE,1/s/^#//' config/hypr/UserConfigs/ENVariables.conf #sed -i '/env = LIBGL_ALWAYS_SOFTWARE,1/s/^#//' config/hypr/UserConfigs/ENVariables.conf - sed -i '/monitor = Virtual-1, 1920x1080@60,auto,1/s/^#//' config/hypr/UserConfigs/Monitors.conf + sed -i '/monitor = Virtual-1, 1920x1080@60,auto,1/s/^#//' config/hypr/monitors.conf fi # Proper Polkit for NixOS @@ -114,7 +114,7 @@ if hostnamectl | grep -q 'Operating System: NixOS'; then sed -i '/^exec-once = \$scriptsDir\/Polkit\.sh$/ s/^#*/#/' config/hypr/UserConfigs/Startup_Apps.conf fi -# Check if dpkg is installed (use to check if Debian or Ubuntu or based distros +# to check if Debian or Ubuntu or based distros if grep -iq '^\(ID_LIKE\|ID\)=.*\(debian\|ubuntu\)' /etc/os-release >/dev/null 2>&1; then echo "${INFO} Debian/Ubuntu based distro. Disabling pyprland since it does not work properly" 2>&1 | tee -a "$LOG" || true # disabling pyprland as causing issues @@ -583,14 +583,12 @@ FILES_TO_RESTORE=( "ENVariables.conf" "LaptopDisplay.conf" "Laptops.conf" - "Monitors.conf" "Startup_Apps.conf" "UserDecorations.conf" "UserAnimations.conf" "UserKeybinds.conf" "UserSettings.conf" "WindowRules.conf" - "WorkspaceRules.conf" ) DIRPATH=~/.config/"$DIRH" @@ -637,13 +635,13 @@ SCRIPTS_TO_RESTORE=( ) DIRSHPATH=~/.config/"$DIRSH" -BACKUP_DIR_PATH="$DIRSHPATH-backup-$BACKUP_DIR/UserScripts" +BACKUP_DIR_PATH_S="$DIRSHPATH-backup-$BACKUP_DIR/UserScripts" -if [ -d "$BACKUP_DIR_PATH" ]; then +if [ -d "$BACKUP_DIR_PATH_S" ]; then echo -e "${NOTE} Restoring previous ${MAGENTA}User-Scripts${RESET}..." for SCRIPT_NAME in "${SCRIPTS_TO_RESTORE[@]}"; do - BACKUP_SCRIPT="$BACKUP_DIR_PATH/$SCRIPT_NAME" + BACKUP_SCRIPT="$BACKUP_DIR_PATH_S/$SCRIPT_NAME" if [ -f "$BACKUP_SCRIPT" ]; then printf "\n${INFO} Found ${YELLOW}$SCRIPT_NAME${RESET} in hypr backup...\n" @@ -663,6 +661,46 @@ fi printf "\n%.0s" {1..1} +# restoring some files in ~/.config/hypr +DIR_H="hypr" +FILES_2_RESTORE=( + "hyprlock.conf" + "hypridle.conf" + "monitors.conf" + "workspaces.conf" +) + +DIRPATH=~/.config/"$DIR_H" +BACKUP_DIR=$(get_backup_dirname) +BACKUP_DIR_PATH_F="$DIRPATH-backup-$BACKUP_DIR" + +if [ -d "$BACKUP_DIR_PATH_F" ]; then + echo -e "${NOTE} Restoring some files in ${MAGENTA}~/.config/hypr directory${RESET}..." + + for FILE_RESTORE in "${FILES_2_RESTORE[@]}"; do + BACKUP_FILE="$BACKUP_DIR_PATH_F/$FILE_RESTORE" + + if [ -f "$BACKUP_FILE" ]; then + echo -e "\n${INFO} Found ${YELLOW}$FILE_RESTORE${RESET} in hypr backup..." + read -p "${CAT} Do you want to restore ${YELLOW}$FILE_RESTORE${RESET} from backup? (y/N): " file2restore + + if [[ "$file2restore" == [Yy]* ]]; then + if cp "$BACKUP_FILE" "$DIRPATH/$FILE_RESTORE"; then + echo "${OK} - $FILE_RESTORE restored!" 2>&1 | tee -a "$LOG" + else + echo "${ERROR} - Failed to restore $FILE_RESTORE!" 2>&1 | tee -a "$LOG" + fi + else + echo "${NOTE} - Skipped restoring $FILE_RESTORE." + fi + else + echo "${ERROR} - Backup file $BACKUP_FILE does not exist." + fi + done +fi + +printf "\n%.0s" {1..1} + # Define the target directory for rofi themes rofi_DIR="$HOME/.local/share/rofi/themes" |
