From f0771edf369d3ea51e3322acb9a5baa456f732b1 Mon Sep 17 00:00:00 2001 From: "Ja.KooLit" Date: Fri, 29 Dec 2023 00:41:08 +0900 Subject: Re-Structured Hypr Folder in preparation for Updates Scripts --- config/hypr/UserConfigs/ENVariables.conf | 40 ++++++++ config/hypr/UserConfigs/LaptopDisplay.conf | 4 + config/hypr/UserConfigs/Laptops.conf | 47 ++++++++++ config/hypr/UserConfigs/Monitors.conf | 52 +++++++++++ config/hypr/UserConfigs/Startup_Apps.conf | 56 +++++++++++ config/hypr/UserConfigs/UserKeybinds.conf | 29 ++++++ config/hypr/UserConfigs/UserSettings.conf | 145 +++++++++++++++++++++++++++++ config/hypr/UserConfigs/WindowRules.conf | 72 ++++++++++++++ 8 files changed, 445 insertions(+) create mode 100644 config/hypr/UserConfigs/ENVariables.conf create mode 100644 config/hypr/UserConfigs/LaptopDisplay.conf create mode 100644 config/hypr/UserConfigs/Laptops.conf create mode 100644 config/hypr/UserConfigs/Monitors.conf create mode 100644 config/hypr/UserConfigs/Startup_Apps.conf create mode 100644 config/hypr/UserConfigs/UserKeybinds.conf create mode 100644 config/hypr/UserConfigs/UserSettings.conf create mode 100644 config/hypr/UserConfigs/WindowRules.conf (limited to 'config/hypr/UserConfigs') diff --git a/config/hypr/UserConfigs/ENVariables.conf b/config/hypr/UserConfigs/ENVariables.conf new file mode 100644 index 00000000..031acae3 --- /dev/null +++ b/config/hypr/UserConfigs/ENVariables.conf @@ -0,0 +1,40 @@ +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## + +#environment-variables +env = CLUTTER_BACKEND,wayland +env = GDK_BACKEND,wayland,x11 +env = QT_AUTO_SCREEN_SCALE_FACTOR,1 +env = QT_QPA_PLATFORM,wayland;xcb +env = QT_QPA_PLATFORMTHEME,qt5ct +env = QT_SCALE_FACTOR,1 +env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 +env = XDG_CURRENT_DESKTOP,Hyprland +env = XDG_SESSION_DESKTOP,Hyprland +env = XDG_SESSION_TYPE,wayland + +# vulkan +#env = WLR_RENDERER,vulkan + +# firefox +env = MOZ_ENABLE_WAYLAND,1 + +# NVIDIA +# This is from Hyprland Wiki. As a start, WLR_NO_HARDWARE_CURSORS 1 will be activated if nvidia gpu detected +env = WLR_NO_HARDWARE_CURSORS,1 +env = LIBVA_DRIVER_NAME,nvidia +env = __GLX_VENDOR_LIBRARY_NAME,nvidia +#env = GBM_BACKEND,nvidia-drm + +#env = __NV_PRIME_RENDER_OFFLOAD,1 +#env = __VK_LAYER_NV_optimus,NVIDIA_only +#env = WLR_DRM_NO_ATOMIC,1 +#env = NVD_BACKEND,direct + +# FOR VM and POSSIBLY NVIDIA +#env = WLR_RENDERER_ALLOW_SOFTWARE,1 + +# nvidia firefox (for hardware acceleration on FF)? +# check this post https://github.com/elFarto/nvidia-vaapi-driver#configuration +#env = MOZ_DISABLE_RDD_SANDBOX,1 +#env = NVD_BACKEND,direct +#env = EGL_PLATFORM,wayland \ No newline at end of file diff --git a/config/hypr/UserConfigs/LaptopDisplay.conf b/config/hypr/UserConfigs/LaptopDisplay.conf new file mode 100644 index 00000000..d50c9119 --- /dev/null +++ b/config/hypr/UserConfigs/LaptopDisplay.conf @@ -0,0 +1,4 @@ +## NOTE, THIS FILE IS BEING USED by disabling Laptop display monitor behaviour when closing lid. +## See notes on Laptops.conf + +#monitor = eDP-1, preferred, auto, 1 diff --git a/config/hypr/UserConfigs/Laptops.conf b/config/hypr/UserConfigs/Laptops.conf new file mode 100644 index 00000000..0a12d7fa --- /dev/null +++ b/config/hypr/UserConfigs/Laptops.conf @@ -0,0 +1,47 @@ +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## + +# 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 + +bind = , xf86KbdBrightnessDown, exec, $scriptsDir/BrightnessKbd.sh --dec #Keyboard brightness Down +bind = , xf86KbdBrightnessUp, exec, $scriptsDir/BrightnessKbd.sh --inc #Keyboard brightness up +bind = , xf86Launch1, exec, rog-control-center # ASUS Armory crate button +bind = , xf86Launch3, exec, asusctl led-mode -n #FN+F4 Switch keyboard RGB profile +bind = , xf86Launch4, exec, asusctl profile -n #FN+F5 change of fan profiles (Quite, Balance, Performance) +bind = , xf86MonBrightnessDown, exec, $scriptsDir/Brightness.sh --dec +bind = , xf86MonBrightnessUp, exec, $scriptsDir/Brightness.sh --inc +bind = , xf86TouchpadToggle, exec, $scriptsDir/TouchPad.sh #disable touchpad + +# Screenshot keybindings for Asus G15 (no PrinSrc button) +bind = $mainMod, F6, exec, $scriptsDir/ScreenShot.sh --now # Fullscreen +bind = $mainMod SHIFT, F6, exec, $scriptsDir/ScreenShot.sh --area +bind = $mainMod CTRL, F6, exec, $scriptsDir/ScreenShot.sh --in5 # Screenshot in 5 secs +bind = $mainMod ALT, F6, exec, $scriptsDir/ScreenShot.sh --in10 # Screenshot in 10 secs + +# Below are useful when you are connecting your laptop in external display +# Suggest you edit below for your laptop display +# From WIKI This is to disable laptop monitor when lid is closed. +# consult https://wiki.hyprland.org/hyprland-wiki/pages/Configuring/Binds/#switches +#bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, preferred, auto, 1" +#bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable" + +############################################################################# +### WARNING! Using this method has some caveats!! USE THIS PART WITH SOME CAUTION! +# CONS of doing this, is that you need to set up your wallpaper (SUPER W) and choose wallpaper. +# CAVEATS! Sometimes the Main Laptop Monitor DOES NOT have display that it needs to re-connect your external monitor +# One work around is to ensure that before shutting down laptop, MAKE SURE your laptop lid is OPEN!! +# Make sure to comment (put # on the both the bindl = , switch ......) above +# NOTE: Display for laptop are being generated into LaptopDisplay.conf +# This part is to be use if you do not want your main laptop monitor to wake up during say wallpaper change etc + +#bindl = , switch:off:Lid Switch,exec,echo "monitor = eDP-1, preferred, auto, 1" > $UserConfigs/LaptopDisplay.conf +#bindl = , switch:on:Lid Switch,exec,echo "monitor = eDP-1, disable" > $UserConfigs/LaptopDisplay.conf + +# for laptop-lid action (to erase the last entry) +#exec-once = echo "eDP-1, preferred, auto, 1" > $HOME/.config/hypr/UserConfigs/LaptopDisplay.conf +############################################################################## diff --git a/config/hypr/UserConfigs/Monitors.conf b/config/hypr/UserConfigs/Monitors.conf new file mode 100644 index 00000000..ac87862a --- /dev/null +++ b/config/hypr/UserConfigs/Monitors.conf @@ -0,0 +1,52 @@ +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## + +# 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. + +#Could help when scaling and not pixelating +xwayland { + force_zero_scaling = true +} + +# Monitors +monitor=,preferred,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 + +#monitor = eDP-1, preferred, auto, 1 +#monitor = eDP-1, 2560x1440@165, 0x0, 1 #own screen +#monitor = DP-2, preferred, auto, 1 +#monitor = DP-1, preferred, auto, 1 +#monitor = HDMI-A-1, preferred,auto,1 + +# QEMU-KVM or any virtual box +#monitor = Virtual-1, 1920x1080@60,auto,1 + +# Hi Refresh Rate +#monitor=,highrr,auto,1 + +# High Resolution +#monitor=,highres,auto,1 + +# to disable a monitor +#monitor=name,disable + +# Mirror +#monitor=DP-3,1920x1080@60,0x0,1,mirror,DP-2 +#monitor=,preferred,auto,1,mirror,eDP-1 + + +# Example : +#monitor=eDP-1,2560x1440@165,0x0,1 +#workspace=HDMI-A-1,1 +#monitor=HDMI-A-1,2560x1440@144,0x0,1,mirror,eDP-1 +#workspace=HDMI-A-2,2 + +#monitor=eDP-1,transform,0 +#monitor=eDP-1,addreserved,10,10,10,49 +#workspace=eDP-1,1 + diff --git a/config/hypr/UserConfigs/Startup_Apps.conf b/config/hypr/UserConfigs/Startup_Apps.conf new file mode 100644 index 00000000..6593268f --- /dev/null +++ b/config/hypr/UserConfigs/Startup_Apps.conf @@ -0,0 +1,56 @@ +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +#Commands & Apps to be executed at launch + +$scriptsDir = $HOME/.config/hypr/scripts +$UserscriptsDir = $HOME/.config/hypr/UserScripts +$lock = $scriptsDir/LockScreen.sh +$SwwwRandom = $scriptsDir/WallpaperRandom.sh +$WallpaperPath = $HOME/Pictures/wallpapers + +# Initial boot script to start Pywal and Set wallpaper. This line and corresponding script can be safely deleted once logged in +exec-once = $HOME/.config/hypr/initial-boot.sh + +# wallpaper stuff / More wallpaper options below +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 +exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP + +# Polkit (Polkit Gnome / KDE) +exec-once = $scriptsDir/Polkit.sh + +# starup apps +exec-once = waybar & +exec-once = nm-applet --indicator & +exec-once = swaync & +#exec-once = blueman-applet & +#exec-once = rog-control-center & + + +#clipboard manager +exec-once = wl-paste --type text --watch cliphist store +exec-once = wl-paste --type image --watch cliphist store + +# Rainbow borders +exec-once = $UserscriptsDir/RainbowBorders.sh + +# sway-idle with lock only +exec-once = swayidle -w timeout 900 '$lock' +# sway-idle with lock and sleep +#exec-once = swayidle -w timeout 900 '$lock' timeout 1200 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep '$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 = swww query || swww init && swww img $HOME/Pictures/wallpapers/mecha-nostalgia.png # persistent wallpaper + +#gnome polkit for nixos +#exec-once = $scriptsDir/Polkit-NixOS.sh + +# xdg-desktop-portal-hyprland (should be auto starting. However, you can force to start) +#exec-once = $scriptsDir/PortalHyprland.sh + +# wlsunset - for automatic gamma adjustment. Default is 1900 to 0700 (7pm to 7am). Edit Sunset.sh accordingly +# exec-once = $scriptsDir/Sunset.sh \ No newline at end of file diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf new file mode 100644 index 00000000..f55f0d5e --- /dev/null +++ b/config/hypr/UserConfigs/UserKeybinds.conf @@ -0,0 +1,29 @@ +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# This is where you put your own keybinds. Be Mindful to check as well ~/.config/hypr/configs/Keybinds.conf to avoid conflict +# if you think I should replace the Pre-defined Keybinds in ~/.config/hypr/configs/Keybinds.conf , submit an issue or let me know in DC and present me a valid reason as to why, such as conflicting with global shortcuts, etc etc + +# See https://wiki.hyprland.org/Configuring/Keywords/ for more settings and variables +# See also Laptops.conf for laptops keybinds + +$mainMod = SUPER +$files = thunar +$term = kitty +$scriptsDir = $HOME/.config/hypr/scripts +$UserScripts = $HOME/.config/hypr/UserScripts + +# rofi App launcher +bindr = $mainMod, $mainMod_L, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window +bind = $mainMod, D, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window + +bind = $mainMod, Return, exec, $term # Launch terminal +bind = $mainMod, T, exec, $files + +# User Added Keybinds +bind = $mainMod SHIFT, O, exec, $UserScripts/ZshChangeTheme.sh # Change oh-my-zsh theme + +# For passthrough keyboard into a VM +# bind = $mainMod ALT, P, submap, passthru +#submap = passthru +# to unbind +#bind = $mainMod ALT, P, submap, reset +#submap = reset diff --git a/config/hypr/UserConfigs/UserSettings.conf b/config/hypr/UserConfigs/UserSettings.conf new file mode 100644 index 00000000..338658a4 --- /dev/null +++ b/config/hypr/UserConfigs/UserSettings.conf @@ -0,0 +1,145 @@ +## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# User Settings +# This is where you put your own settings as this will not be touched during update + +## refer to Hyprland wiki for more info https://wiki.hyprland.org/Configuring/Variables + +# Sourcing colors generated by pywal +source = $HOME/.cache/wal/colors-hyprland +# blurls = waybar +# blurls = rofi + +dwindle { + pseudotile = yes + preserve_split = yes + special_scale_factor = 0.8 +} + +master { + new_is_master=1 + new_on_top=1 + mfact = 0.5 +} + +general { + sensitivity=1.00 + apply_sens_to_raw=1 + gaps_in = 4 + gaps_out = 8 + border_size = 2 + resize_on_border = true + + col.active_border = $color0 $color2 $color4 $color6 $color8 90deg + col.inactive_border = $backgroundCol + + layout = master +} + +group { + col.border_active = $color15 + + groupbar { + col.active = $color0 + } +} + +decoration { + rounding = 8 + + active_opacity = 1.0 + inactive_opacity = 0.9 + fullscreen_opacity = 1.0 + + dim_inactive = true + dim_strength = 0.1 + + drop_shadow=true + shadow_range=6 + shadow_render_power = 1 + col.shadow = $color2 + col.shadow_inactive = 0x50000000 + + blur { + enabled = true + size = 5 + passes = 2 + ignore_opacity = true + new_optimizations = true + } +} + +animations { + enabled = yes + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + bezier = linear, 0.0, 0.0, 1.0, 1.0 + bezier = wind, 0.05, 0.9, 0.1, 1.05 + bezier = winIn, 0.1, 1.1, 0.1, 1.1 + bezier = winOut, 0.3, -0.3, 0, 1 + bezier = slow, 0, 0.85, 0.3, 1 + bezier = overshot, 0.7, 0.6, 0.1, 1.1 + bezier = bounce, 1.1, 1.6, 0.1, 0.85 + bezier = sligshot, 1, -1, 0.15, 1.25 + bezier = nice, 0, 6.9, 0.5, -4.20 + + animation = windowsIn, 1, 5, slow, popin + animation = windowsOut, 1, 5, winOut, popin + animation = windowsMove, 1, 5, wind, slide + animation = border, 1, 10, linear + animation = borderangle, 1, 180, linear, loop + animation = fade, 1, 5, overshot + animation = workspaces, 1, 5, wind + animation = windows, 1, 5, bounce, popin +} + +input { + kb_layout=us + kb_variant= + kb_model= + kb_options=grp:alt_shift_toggle + kb_rules= + repeat_rate=50 + repeat_delay=300 + numlock_by_default=1 + left_handed=0 + follow_mouse=1 + float_switch_override_focus=0 + + touchpad { + disable_while_typing=1 + natural_scroll=0 + clickfinger_behavior=0 + middle_button_emulation=1 + tap-to-click=1 + drag_lock=0 + } +} + +gestures { + workspace_swipe=1 + workspace_swipe_fingers=3 + workspace_swipe_distance=400 + workspace_swipe_invert=1 + workspace_swipe_min_speed_to_force=30 + workspace_swipe_cancel_ratio=0.5 + workspace_swipe_create_new=1 + workspace_swipe_forever=1 +} + +misc { + disable_hyprland_logo = true + disable_splash_rendering = true + mouse_move_enables_dpms = true + #vrr = 0 + enable_swallow = true + no_direct_scanout = true #for fullscreen games + focus_on_activate = false + swallow_regex = ^(kitty)$ + #disable_autoreload = true +} + +binds { + workspace_back_and_forth=1 + allow_workspace_cycles=1 + pass_mouse_when_bound=0 +} diff --git a/config/hypr/UserConfigs/WindowRules.conf b/config/hypr/UserConfigs/WindowRules.conf new file mode 100644 index 00000000..a3a77cfb --- /dev/null +++ b/config/hypr/UserConfigs/WindowRules.conf @@ -0,0 +1,72 @@ +## /* ---- 💫 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 +windowrule = float, nwg-look|qt5ct|mpv +windowrule = float, onedriver|onedriver-launcher +windowrule = float, eog +windowrule = float, zoom +windowrule = float, rofi +windowrule = float, gnome-system-monitor +windowrule = float, yad + +#windowrule = noblur,gamescope +#windowrule = fullscreen,gamescope +#windowrule = workspace 6 silent,^(gamescope)$ + +windowrule = center,^(pavucontrol) + +# windowrule v2 +windowrulev2 = workspace 1, class:^(thunderbird)$ +windowrulev2 = workspace 2, class:^(firefox)$ +windowrulev2 = workspace 2, class:^(Firefox-esr)$ +windowrulev2 = workspace 2, class:^(Microsoft-edge-beta)$ +windowrulev2 = workspace 3, class:^([Tt]hunar)$ +windowrulev2 = workspace 4, class:^(com.obsproject.Studio)$ +windowrulev2 = workspace 5 silent, class:^([Ss]team)$,title:^([Ss]team)$ +windowrulev2 = workspace 5 silent, class:^(lutris)$ +windowrulev2 = workspace 6, class:^(virt-manager)$ +windowrulev2 = workspace 7 silent, class:^(discord)$ +windowrulev2 = workspace 7 silent, class:^(WebCord)$ +windowrulev2 = workspace 9 silent, class:^([Aa]udacious)$ + +#opacity (transparent) #enable as desired +windowrulev2 = opacity 0.9 0.6, class:^([Rr]ofi)$ +windowrulev2 = opacity 0.9 0.7, class:^(Brave-browser)$ +windowrulev2 = opacity 0.9 0.7, class:^(Brave-browser-dev)$ +windowrulev2 = opacity 0.9 0.7, class:^(firefox)$ +windowrulev2 = opacity 0.9 0.7, class:^(Firefox-esr)$ +windowrulev2 = opacity 0.9 0.8, 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:^(com.obsproject.Studio)$ +windowrulev2 = opacity 0.9 0.7, class:^([Aa]udacious)$ + + +#layerrule = unset,class:^([Rr]ofi)$ +#layerrule = blur,class:^([Rr]ofi)$ +#layerrule = ignorezero, + +#windowrulev2 = bordercolor rgb(EE4B55) rgb(880808), fullscreen:1 +#windowrulev2 = bordercolor rgb(282737) rgb(1E1D2D), floating:1 +#windowrulev2 = opacity 0.8 0.8, pinned:1 + +# Picture-in-a-Picture (PIP) rules: Oddly, some need re-duplication. This is because the window for +# PIP changes after on first launch, and will not inherant the rules... +windowrulev2=opacity 0.95 0.75,title:^(Picture-in-Picture)$ # for opacity: [focus num] [bg num] +# Interestingly, the opacity rule above doesn't need the reduplication? +windowrulev2=pin,title:^(Picture-in-Picture)$ +#windowrulev2=pin,title:^(Firefox)$ +windowrulev2=float, title:^(Picture-in-Picture)$ +#windowrulev2=float, title:^(Firefox)$ +windowrulev2=size 25% 25%,title:^(Picture-in-Picture)$ +#windowrulev2=size 25% 25%,title:^(Firefox)$ +windowrulev2=move 72% 7%,title:^(Picture-in-Picture)$ +#windowrulev2=move 72% 7%,title:^(Firefox)$ \ No newline at end of file -- cgit v1.2.3 From dcbb02b43a80e2be6ac2b77a4775b7df623d4809 Mon Sep 17 00:00:00 2001 From: "Ja.KooLit" Date: Fri, 29 Dec 2023 01:26:59 +0900 Subject: adjustments of scripts --- config/hypr/UserConfigs/Laptops.conf | 1 + config/hypr/UserConfigs/Startup_Apps.conf | 2 +- config/hypr/UserScripts/Sunset.sh | 2 ++ config/hypr/scripts/AirplaneMode.sh | 14 +++++---- config/hypr/scripts/Sunset.sh | 2 -- config/hypr/scripts/SwitchKeyboardLayout.sh | 4 +-- config/hypr/scripts/TouchPad.sh | 44 +++++++++-------------------- 7 files changed, 28 insertions(+), 41 deletions(-) create mode 100755 config/hypr/UserScripts/Sunset.sh delete mode 100755 config/hypr/scripts/Sunset.sh (limited to 'config/hypr/UserConfigs') diff --git a/config/hypr/UserConfigs/Laptops.conf b/config/hypr/UserConfigs/Laptops.conf index 0a12d7fa..14413ce0 100644 --- a/config/hypr/UserConfigs/Laptops.conf +++ b/config/hypr/UserConfigs/Laptops.conf @@ -22,6 +22,7 @@ bind = $mainMod, F6, exec, $scriptsDir/ScreenShot.sh --now # Fullscreen bind = $mainMod SHIFT, F6, exec, $scriptsDir/ScreenShot.sh --area bind = $mainMod CTRL, F6, exec, $scriptsDir/ScreenShot.sh --in5 # Screenshot in 5 secs bind = $mainMod ALT, F6, exec, $scriptsDir/ScreenShot.sh --in10 # Screenshot in 10 secs +bind = ALT, F6, exec, $scriptsDir/ScreenShot.sh --active # Screenshot active window # Below are useful when you are connecting your laptop in external display # Suggest you edit below for your laptop display diff --git a/config/hypr/UserConfigs/Startup_Apps.conf b/config/hypr/UserConfigs/Startup_Apps.conf index 6593268f..cb3afb94 100644 --- a/config/hypr/UserConfigs/Startup_Apps.conf +++ b/config/hypr/UserConfigs/Startup_Apps.conf @@ -53,4 +53,4 @@ exec-once = swayidle -w timeout 900 '$lock' #exec-once = $scriptsDir/PortalHyprland.sh # wlsunset - for automatic gamma adjustment. Default is 1900 to 0700 (7pm to 7am). Edit Sunset.sh accordingly -# exec-once = $scriptsDir/Sunset.sh \ No newline at end of file +# exec-once = $UserScriptsDir/Sunset.sh \ No newline at end of file diff --git a/config/hypr/UserScripts/Sunset.sh b/config/hypr/UserScripts/Sunset.sh new file mode 100755 index 00000000..96c27c5b --- /dev/null +++ b/config/hypr/UserScripts/Sunset.sh @@ -0,0 +1,2 @@ +#!/bin/bash +wlsunset -t 4000 -T 6500 -d 900 -S 07:00 -s 19:00 \ No newline at end of file diff --git a/config/hypr/scripts/AirplaneMode.sh b/config/hypr/scripts/AirplaneMode.sh index e0337dc7..f3a50629 100755 --- a/config/hypr/scripts/AirplaneMode.sh +++ b/config/hypr/scripts/AirplaneMode.sh @@ -2,11 +2,13 @@ notif="$HOME/.config/swaync/images/bell.png" -wifi="$(nmcli r wifi | awk 'FNR = 2 {print $1}')" -if [ "$wifi" == "enabled" ]; then - rfkill block all & - notify-send -u low -i "$notif" 'airplane mode: active' +# Check if any wireless device is blocked +wifi_blocked=$(rfkill list wifi | grep -o "Soft blocked: yes") + +if [ -n "$wifi_blocked" ]; then + rfkill unblock wifi + notify-send -u low -i "$notif" 'Airplane mode: OFF' else - rfkill unblock all & - notify-send -u low -i "$notif" 'airplane mode: inactive' + rfkill block wifi + notify-send -u low -i "$notif" 'Airplane mode: ON' fi diff --git a/config/hypr/scripts/Sunset.sh b/config/hypr/scripts/Sunset.sh deleted file mode 100755 index 96c27c5b..00000000 --- a/config/hypr/scripts/Sunset.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -wlsunset -t 4000 -T 6500 -d 900 -S 07:00 -s 19:00 \ No newline at end of file diff --git a/config/hypr/scripts/SwitchKeyboardLayout.sh b/config/hypr/scripts/SwitchKeyboardLayout.sh index 47469181..a53a567d 100755 --- a/config/hypr/scripts/SwitchKeyboardLayout.sh +++ b/config/hypr/scripts/SwitchKeyboardLayout.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash layout_f="$HOME/.cache/kb_layout" -settings_file="$HOME/.config/hypr/configs/Settings.conf" +settings_file="$HOME/.config/hypr/UserConfigs/UserSettings.conf" notif="$HOME/.config/swaync/images/bell.png" # Check if ~/.cache/kb_layout exists and create it with a default layout from Settings.conf if not found @@ -40,4 +40,4 @@ hyprctl keyword input:kb_layout "$new_layout" echo "$new_layout" > "$layout_f" # Notification for the new keyboard layout -notify-send -u low -i "$notif" "Keyboard layout set to $new_layout" \ No newline at end of file +notify-send -u low -i "$notif" "new KB_Layout: $new_layout" \ No newline at end of file diff --git a/config/hypr/scripts/TouchPad.sh b/config/hypr/scripts/TouchPad.sh index 7b9a1806..1fcb3249 100755 --- a/config/hypr/scripts/TouchPad.sh +++ b/config/hypr/scripts/TouchPad.sh @@ -1,38 +1,22 @@ #!/bin/bash +HYPRLAND_DEVICE="asue1209:00-04f3:319f-touchpad" notif="$HOME/.config/swaync/images/bell.png" -# NOTE: find the right device using hyprctl devices - HYPRLAND_DEVICE="asue1209:00-04f3:319f-touchpad" +XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/run/user/$(id -u)} +STATUS_FILE="$XDG_RUNTIME_DIR/touchpad.status" -if [ -z "$XDG_RUNTIME_DIR" ]; then - export XDG_RUNTIME_DIR=/run/user/$(id -u) -fi - -export STATUS_FILE="$XDG_RUNTIME_DIR/touchpad.status" - -enable_touchpad() { - printf "true" > "$STATUS_FILE" - - notify-send -u low -i "$notif" "Enabling Touchpad" - - hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" true -} - -disable_touchpad() { - printf "false" > "$STATUS_FILE" - - notify-send -u low -i "$notif" "Disabling Touchpad" +toggle_touchpad() { + if [ ! -f "$STATUS_FILE" ] || [ "$(cat "$STATUS_FILE")" = "false" ]; then + echo "true" > "$STATUS_FILE" + action="enabled" + else + echo "false" > "$STATUS_FILE" + action="disabled" + fi - hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" false + notify-send -u low -i "$notif" "Touchpad $action" + hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" "$(cat "$STATUS_FILE")" } -if ! [ -f "$STATUS_FILE" ]; then - enable_touchpad -else - if [ $(cat "$STATUS_FILE") = "true" ]; then - disable_touchpad - elif [ $(cat "$STATUS_FILE") = "false" ]; then - enable_touchpad - fi -fi +toggle_touchpad -- cgit v1.2.3 From 7dd29c700fe9bf791c6cc7a39d0bfe916d80cac5 Mon Sep 17 00:00:00 2001 From: "Ja.KooLit" Date: Fri, 29 Dec 2023 12:30:50 +0900 Subject: Final changes for v2.2.2 --- config/hypr/UserConfigs/00-Readme | 9 +++++++++ config/hypr/UserConfigs/Monitors.conf | 4 ---- config/hypr/UserConfigs/Startup_Apps.conf | 2 -- config/hypr/UserConfigs/UserSettings.conf | 7 ++++++- config/hypr/UserScripts/00-Readme | 1 + config/hypr/configs/Settings.conf | 5 +++-- config/hypr/hyprland.conf | 3 +-- config/hypr/initial-boot.sh | 3 ++- 8 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 config/hypr/UserConfigs/00-Readme create mode 100644 config/hypr/UserScripts/00-Readme (limited to 'config/hypr/UserConfigs') diff --git a/config/hypr/UserConfigs/00-Readme b/config/hypr/UserConfigs/00-Readme new file mode 100644 index 00000000..315e3376 --- /dev/null +++ b/config/hypr/UserConfigs/00-Readme @@ -0,0 +1,9 @@ +Hyprland-Dots v2.2.2 + +1.) Suggest not to rename files in this folder. As this is connected and being sourced from hyprland.conf in ~/.config/hypr + +2.) This folder, along with UserScripts folder will NOT be touch during update. + +3.) However, if hyprland has a big change in settings, i.e., blur section is moved into another group, you should managed the change. + +I will update the Hyprland-Dots wiki for guidance. Make sure to check out changelogs as well diff --git a/config/hypr/UserConfigs/Monitors.conf b/config/hypr/UserConfigs/Monitors.conf index ac87862a..ca2ef0e6 100644 --- a/config/hypr/UserConfigs/Monitors.conf +++ b/config/hypr/UserConfigs/Monitors.conf @@ -5,10 +5,6 @@ # https://wiki.hyprland.org/Configuring/Monitors/ # Configure your Display resolution, offset, scale and Monitors here, use `hyprctl monitors` to get the info. -#Could help when scaling and not pixelating -xwayland { - force_zero_scaling = true -} # Monitors monitor=,preferred,auto,1 diff --git a/config/hypr/UserConfigs/Startup_Apps.conf b/config/hypr/UserConfigs/Startup_Apps.conf index cb3afb94..2aacba44 100644 --- a/config/hypr/UserConfigs/Startup_Apps.conf +++ b/config/hypr/UserConfigs/Startup_Apps.conf @@ -7,8 +7,6 @@ $lock = $scriptsDir/LockScreen.sh $SwwwRandom = $scriptsDir/WallpaperRandom.sh $WallpaperPath = $HOME/Pictures/wallpapers -# Initial boot script to start Pywal and Set wallpaper. This line and corresponding script can be safely deleted once logged in -exec-once = $HOME/.config/hypr/initial-boot.sh # wallpaper stuff / More wallpaper options below exec-once = swww query || swww init diff --git a/config/hypr/UserConfigs/UserSettings.conf b/config/hypr/UserConfigs/UserSettings.conf index 338658a4..fa2e55a9 100644 --- a/config/hypr/UserConfigs/UserSettings.conf +++ b/config/hypr/UserConfigs/UserSettings.conf @@ -86,7 +86,7 @@ animations { animation = windowsOut, 1, 5, winOut, popin animation = windowsMove, 1, 5, wind, slide animation = border, 1, 10, linear - animation = borderangle, 1, 180, linear, loop + animation = borderangle, 1, 180, linear, loop #used by rainbow borders and rotating colors animation = fade, 1, 5, overshot animation = workspaces, 1, 5, wind animation = windows, 1, 5, bounce, popin @@ -143,3 +143,8 @@ binds { allow_workspace_cycles=1 pass_mouse_when_bound=0 } + +#Could help when scaling and not pixelating +xwayland { + force_zero_scaling = true +} diff --git a/config/hypr/UserScripts/00-Readme b/config/hypr/UserScripts/00-Readme new file mode 100644 index 00000000..de251df0 --- /dev/null +++ b/config/hypr/UserScripts/00-Readme @@ -0,0 +1 @@ +a) Place your new scripts here. If you need to edit a script from main script (~/.config/hypr/scripts), copy it on this folder, and edit. Make sure to update as well the keybinds in ~/.config/hypr/UserConfigs folder if any script is attached to it \ No newline at end of file diff --git a/config/hypr/configs/Settings.conf b/config/hypr/configs/Settings.conf index e9901013..96f6f1e9 100644 --- a/config/hypr/configs/Settings.conf +++ b/config/hypr/configs/Settings.conf @@ -1,7 +1,8 @@ ## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## + # Default Settings. avoid changing this file as during update, this will be replaced ## refer to Hyprland wiki for more info https://wiki.hyprland.org/Configuring/Variables - - +# Initial boot script enable to apply initial wallpapers, theming, new settings etc. +exec-once = $HOME/.config/hypr/initial-boot.sh \ No newline at end of file diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 4fd65aa4..24c0be6f 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -3,9 +3,8 @@ ###### Default Configs $configs = $HOME/.config/hypr/configs -source=$configs/Keybinds.conf source=$configs/Settings.conf - +source=$configs/Keybinds.conf #### User Configs $UserConfigs = $HOME/.config/hypr/UserConfigs diff --git a/config/hypr/initial-boot.sh b/config/hypr/initial-boot.sh index 704d8676..e31863ca 100755 --- a/config/hypr/initial-boot.sh +++ b/config/hypr/initial-boot.sh @@ -2,8 +2,9 @@ # A bash script designed to run only once dotfiles installed -# THIS SCRIPT CAN BE DELETED ONCE SUCCESSFULLY BOOTED!! And also, edit ~/.config/hypr/configs/Execs.conf +# THIS SCRIPT CAN BE DELETED ONCE SUCCESSFULLY BOOTED!! And also, edit ~/.config/hypr/configs/Settings.conf # not necessary to do since this script is only designed to run only once as long as the marker exists +# However, I do highly suggest not to touch it since again, as long as the marker exist, script wont run # Variables scriptsDir=$HOME/.config/hypr/scripts -- cgit v1.2.3