diff options
| author | Donald Williams <129223418+dwilliam62@users.noreply.github.com> | 2025-12-11 12:32:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-11 12:32:33 -0500 |
| commit | 1d67791220aacb211a84d90ef030a352e402bd80 (patch) | |
| tree | fc87b1a5e413e906bcc47cf8abf389c2bbd51b71 /config | |
| parent | bcfd5e7c2b67f0a62b1ceeb62d20b0a80ca55a70 (diff) | |
| parent | bd5ca3f57c5c2b4a9c8602025cc38e4140b1d5a3 (diff) | |
Merge pull request #881 from JaKooLit/development
Development to main Major update v2.3.18
Diffstat (limited to 'config')
60 files changed, 2070 insertions, 2081 deletions
diff --git a/config/fastfetch/config-compact.jsonc b/config/fastfetch/config-compact.jsonc index 962b6bb3..358efcc5 100644 --- a/config/fastfetch/config-compact.jsonc +++ b/config/fastfetch/config-compact.jsonc @@ -28,10 +28,10 @@ "keyColor": "yellow" }, { - "type": "custom", + "keyColor": "blue", "key": " ", - "format": "JaKooLit: {$DOTS_VERSION}", - "keyColor": "blue" + "text": "echo Jakoolit: v${DOTS_VERSION}", + "type": "command" }, { "type": "wm", @@ -68,6 +68,12 @@ "keyColor": "green" }, { + "type": "command", + "key": " ", + "keyColor": "magenta", + "text": "echo $(( ($(date +%s) - $(stat -c %W /)) / 86400 )) days" + }, + { "type": "custom", "format": " ─────────────────────────── " }, diff --git a/config/fastfetch/config-pokemon.jsonc b/config/fastfetch/config-pokemon.jsonc index 0435033c..63f60378 100644 --- a/config/fastfetch/config-pokemon.jsonc +++ b/config/fastfetch/config-pokemon.jsonc @@ -27,10 +27,10 @@ "keyColor": "yellow" }, { - "type": "custom", + "type": "command", "key": " ", "keyColor": "blue", - "format": "JaKooLit Version: {$DOTS_VERSION}" + "text": "echo JaKooLit Version: ${DOTS_VERSION}" }, { "type": "wm", @@ -67,6 +67,12 @@ "keyColor": "green" }, { + "type": "command", + "key": " ", + "keyColor": "magenta", + "text": "echo $(( ($(date +%s) - $(stat -c %W /)) / 86400 )) days" + }, + { "type": "custom", "format": " ─────────────────────────── " }, diff --git a/config/fastfetch/config-v2.jsonc b/config/fastfetch/config-v2.jsonc index 6d20c695..163ca67b 100644 --- a/config/fastfetch/config-v2.jsonc +++ b/config/fastfetch/config-v2.jsonc @@ -28,9 +28,9 @@ "keyColor": "31" }, { - "type": "custom", + "type": "command", "key": " ├ ", - "format": "JaKooLit Version: {$DOTS_VERSION}", + "format": "echo JaKooLit Version: ${DOTS_VERSION}", "keyColor": "31" }, { diff --git a/config/fastfetch/config.jsonc b/config/fastfetch/config.jsonc index dce06d78..8b2de09f 100644 --- a/config/fastfetch/config.jsonc +++ b/config/fastfetch/config.jsonc @@ -24,9 +24,9 @@ "keyColor": "yellow" }, { - "type": "custom", + "type": "command", "key": "│ ├", - "format": "JaKooLit Version: {$DOTS_VERSION}", + "text": "echo JaKooLit Version: ${DOTS_VERSION}", "keyColor": "yellow" }, { @@ -127,10 +127,6 @@ "key": "│ └", "keyColor": "magenta" }, - { - "type": "custom", - "format": "\u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m \u001b[38m \u001b[39m \u001b[39m \u001b[38m \u001b[37m \u001b[36m \u001b[35m \u001b[34m \u001b[33m \u001b[32m \u001b[31m \u001b[90m " - }, "break" ] } diff --git a/config/hypr/UserConfigs/ENVariables.conf b/config/hypr/UserConfigs/ENVariables.conf index 4e736dc3..41d9b2d4 100644 --- a/config/hypr/UserConfigs/ENVariables.conf +++ b/config/hypr/UserConfigs/ENVariables.conf @@ -3,54 +3,20 @@ # Set your defaults editor through ENV in ~/.config/hypr/UserConfigs/01-UserDefaults.conf -# environment-variables -# Current Version of JakooLit Dotfiles: -env = DOTS_VERSION,2.3.18 +### QT Variables ### +# env = QT_AUTO_SCREEN_SCALE_FACTOR,1 +# env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 +# env = QT_QPA_PLATFORMTHEME,qt5ct +# env = QT_QPA_PLATFORMTHEME,qt6ct -# Toolkit Backend Variables -env = GDK_BACKEND,wayland,x11,* -env = QT_QPA_PLATFORM,wayland;xcb -env = CLUTTER_BACKEND,wayland - -#Run SDL2 applications on Wayland. -#Remove or set to x11 if games that provide older versions of SDL cause compatibility issues -#env = SDL_VIDEODRIVER,wayland - -# xdg Specifications -env = XDG_CURRENT_DESKTOP,Hyprland -env = XDG_SESSION_DESKTOP,Hyprland -env = XDG_SESSION_TYPE,wayland - -# QT Variables -env = QT_AUTO_SCREEN_SCALE_FACTOR,1 -env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 -env = QT_QPA_PLATFORMTHEME,qt5ct -env = QT_QPA_PLATFORMTHEME,qt6ct - -# hyprland-qt-support -env = QT_QUICK_CONTROLS_STYLE,org.hyprland.style - -# xwayland apps scale fix (useful if you are use monitor scaling). +### xwayland apps scale fix (useful if you are use monitor scaling). ### # Set same value if you use scaling in Monitors.conf # 1 is 100% 1.5 is 150% # see https://wiki.hyprland.org/Configuring/XWayland/ -env = GDK_SCALE,1 -env = QT_SCALE_FACTOR,1 +# env = GDK_SCALE,1 +# env = QT_SCALE_FACTOR,1 -# Bibata-Modern-Ice-Cursor -# NOTE! You must have the hyprcursor version to activate this. -# https://wiki.hyprland.org/Hypr-Ecosystem/hyprcursor/ -#env = HYPRCURSOR_THEME,Bibata-Modern-Ice -#env = HYPRCURSOR_SIZE,24 - -# firefox -env = MOZ_ENABLE_WAYLAND,1 - -# electron >28 apps (may help) ## -# https://www.electronjs.org/docs/latest/api/environment-variables -env = ELECTRON_OZONE_PLATFORM_HINT,auto # auto selects Wayland if possible, X11 otherwise - -# NVIDIA +### NVIDIA ### # This is from Hyprland Wiki. Below will be activated nvidia gpu detected # See hyprland wiki https://wiki.hyprland.org/Nvidia/#environment-variables @@ -59,34 +25,27 @@ env = ELECTRON_OZONE_PLATFORM_HINT,auto # auto selects Wayland if possible, X11 #env = NVD_BACKEND,direct #env = GSK_RENDERER,ngl -# additional ENV's for nvidia. Caution, activate with care +### additional ENV's for nvidia. Caution, activate with care ### #env = GBM_BACKEND,nvidia-drm - #env = __GL_GSYNC_ALLOWED,1 #adaptive Vsync #env = __NV_PRIME_RENDER_OFFLOAD,1 #env = __VK_LAYER_NV_optimus,NVIDIA_only #env = WLR_DRM_NO_ATOMIC,1 -# FOR VM and POSSIBLY NVIDIA +### FOR VM and POSSIBLY NVIDIA ### # LIBGL_ALWAYS_SOFTWARE software mesa rendering #env = LIBGL_ALWAYS_SOFTWARE,1 # Warning. May cause hyprland to crash #env = WLR_RENDERER_ALLOW_SOFTWARE,1 -# nvidia firefox (for hardware acceleration on FF)? +### nvidia firefox ### # check this post https://github.com/elFarto/nvidia-vaapi-driver#configuration #env = MOZ_DISABLE_RDD_SANDBOX,1 #env = EGL_PLATFORM,wayland -#### Aquamarine Environment Variables #### ( Hyprland > 0.45 ) -# https://wiki.hyprland.org/Configuring/Environment-variables/#aquamarine-environment-variables----ref-httpsgithubcomhyprwmaquamarineblobmaindocsenvmd--- +### Aquamarine Environment Variables (Hyprland > 0.45) ### +# https://wiki.hyprland.org/Configuring/Environment-variables/#aquamarine-environment-variables # env = AQ_TRACE,1 # Enables more verbose logging. # env = AQ_DRM_DEVICES,/dev/dri/card1:/dev/dri/card0 # Set an explicit list of DRM devices (GPUs) to use. It’s a colon-separated list of paths, with the first being the primary. E.g. /dev/dri/card1:/dev/dri/card0 # env = AQ_MGPU_NO_EXPLICIT,1 # Disables explicit syncing on mgpu buffers # env = AQ_NO_MODIFIERS,1 # Disables modifiers for DRM buffers -#### Hyprland Environment Variables #### -# https://wiki.hyprland.org/Configuring/Environment-variables/#hyprland-environment-variables -# env = HYPRLAND_TRACE,1 # Enables more verbose logging. -# env = HYPRLAND_NO_RT,1 # Disables realtime priority setting by Hyprland. -# env = HYPRLAND_NO_SD_NOTIFY,1 # If systemd, disables the 'sd_notify' calls. -# env = HYPRLAND_NO_SD_VARS,1 # Disables management of variables in systemd and dbus activation environments. diff --git a/config/hypr/UserConfigs/Laptops.conf b/config/hypr/UserConfigs/Laptops.conf index edb68463..af5cb583 100644 --- a/config/hypr/UserConfigs/Laptops.conf +++ b/config/hypr/UserConfigs/Laptops.conf @@ -1,5 +1,4 @@ # /* ---- 💫 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 @@ -7,30 +6,6 @@ $mainMod = SUPER $scriptsDir = $HOME/.config/hypr/scripts $UserConfigs = $HOME/.config/hypr/UserConfigs -# for disabling Touchpad. hyprctl devices to get device name. -$Touchpad_Device=asue1209:00-04f3:319f-touchpad - -binde = , xf86KbdBrightnessDown, exec, $scriptsDir/BrightnessKbd.sh --dec # decrease keyboard brightness -binde = , xf86KbdBrightnessUp, exec, $scriptsDir/BrightnessKbd.sh --inc # increase keyboard brightness -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) -binde = , xf86MonBrightnessDown, exec, $scriptsDir/Brightness.sh --dec # decrease monitor brightness -binde = , xf86MonBrightnessUp, exec, $scriptsDir/Brightness.sh --inc # increase monitor brightness -bind = , xf86TouchpadToggle, exec, $scriptsDir/TouchPad.sh # disable touchpad - -# Screenshot keybindings using F6 (no PrinSrc button) -bind = $mainMod, F6, exec, $scriptsDir/ScreenShot.sh --now # screenshot -bind = $mainMod SHIFT, F6, exec, $scriptsDir/ScreenShot.sh --area # screenshot (area) -bind = $mainMod CTRL, F6, exec, $scriptsDir/ScreenShot.sh --in5 # # screenshot (5 secs delay) -bind = $mainMod ALT, F6, exec, $scriptsDir/ScreenShot.sh --in10 # screenshot (10 secs delay) -bind = ALT, F6, exec, $scriptsDir/ScreenShot.sh --active # screenshot (active window only) - -$TOUCHPAD_ENABLED = true -device { - name = $Touchpad_Device - enabled = $TOUCHPAD_ENABLED -} # 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. @@ -52,4 +27,3 @@ device { # for laptop-lid action (to erase the last entry) #exec-once = echo "monitor = eDP-1, preferred, auto, 1" > $HOME/.config/hypr/UserConfigs/LaptopDisplay.conf -# diff --git a/config/hypr/UserConfigs/Startup_Apps.conf b/config/hypr/UserConfigs/Startup_Apps.conf new file mode 100644 index 00000000..f00acf90 --- /dev/null +++ b/config/hypr/UserConfigs/Startup_Apps.conf @@ -0,0 +1,3 @@ +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # +# Commands and Apps to be executed at launch + diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf index 17711559..e140cfe4 100644 --- a/config/hypr/UserConfigs/UserKeybinds.conf +++ b/config/hypr/UserConfigs/UserKeybinds.conf @@ -11,73 +11,30 @@ $scriptsDir = $HOME/.config/hypr/scripts $UserScripts = $HOME/.config/hypr/UserScripts $UserConfigs = $HOME/.config/hypr/UserConfigs -# settings for User defaults apps - set your default terminal and file manager on this file -source= $UserConfigs/01-UserDefaults.conf +# IMPORTANT: If you want to remap and existing keybind you MUST unbindd it first -# common shortcuts -#bindr = $mainMod, $mainMod_L, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window # Super Key to Launch rofi menu -bindd = $mainMod, D, app launcher, exec, pkill rofi || true && rofi -show drun -modi drun,filebrowser,run,window -bindd = $mainMod, B, open default browser, exec, xdg-open "https://" -bindd = $mainMod, A, desktop overview, exec, $scriptsDir/OverviewToggle.sh # toggles quickshell or ags overview (tries QS first, falls back to AGS) -#bindd = $mainMod, A, ags overview, exec, pkill rofi || true && ags -t 'overview' # desktop overview (if installed) -#bindd = $mainMod, A, Quickshell overview, global, quickshell:overviewToggle # desktop overview (if installed) -bindd = $mainMod, Return, Open terminal, exec, $term -bindd = $mainMod, E, file manager, exec, $files +# The bindings are CASE SENSITIVE. We suggest you copy the exisitng binding here +# Then change `bindd` to `unbind` +# E.g. +# unbind = $mainMod, Return, Open terminal, exec, $term +# bindd = $mainMod, Return, Open terminal, exec, ghostty +# +# unbind = $mainMod, E, file manager, exec, $files +# bindd = $mainMod, T, file manager, exec, $files -# FEATURES / EXTRAS -bindd = $mainMod, H, help / cheat sheet, exec, $scriptsDir/KeyHints.sh -bindd = $mainMod ALT, R, refresh bar and menus, exec, $scriptsDir/Refresh.sh -bindd = $mainMod ALT, E, emoji menu, exec, $scriptsDir/RofiEmoji.sh -bindd = $mainMod, S, web search, exec, $scriptsDir/RofiSearch.sh -bindd = $mainMod CTRL, S, window switcher, exec, rofi -show window -bindd = $mainMod ALT, O, toggle blur, exec, $scriptsDir/ChangeBlur.sh -bindd = $mainMod SHIFT, G, toggle game mode, exec, $scriptsDir/GameMode.sh -bindd = $mainMod ALT, L, toggle master/dwindle layout, exec, $scriptsDir/ChangeLayout.sh -bindd = $mainMod ALT, V, clipboard manager, exec, $scriptsDir/ClipManager.sh -bindd = $mainMod CTRL, R, rofi theme selector, exec, $scriptsDir/RofiThemeSelector.sh -bindd = $mainMod CTRL SHIFT, R, rofi theme selector (modified), exec, pkill rofi || true && $scriptsDir/RofiThemeSelector-modified.sh +# If you are ADDING a bindd, make sure you include the description +# Other the keybind search menu might not show it properly + +# E.g. +# bindd = $mainMod, Z, My z app, exec APPNAME -bindd = $mainMod SHIFT, F, fullscreen, fullscreen -bindd = $mainMod CTRL, F, maximize window, fullscreen, 1 -bindd = $mainMod, SPACE, Float current window, togglefloating, -bindd = $mainMod ALT, SPACE, Float all windows, exec, hyprctl dispatch workspaceopt allfloat -bindd = $mainMod SHIFT, Return, DropDown terminal, exec, $scriptsDir/Dropterminal.sh $term -# Desktop zooming or magnifier -bindd = $mainMod ALT, mouse_down, zoom in, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor * 2.0}')" -bindd = $mainMod ALT, mouse_up, zoom out, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor / 2.0}')" -## NOTES for ja (Hyprland version 0.39 (Ubuntu 24.04)) -#bind = $mainMod ALT, mouse_down, exec, hyprctl keyword misc:cursor_zoom_factor "$(hyprctl getoption misc:cursor_zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor * 2.0}')" -#bind = $mainMod ALT, mouse_up, exec, hyprctl keyword misc:cursor_zoom_factor "$(hyprctl getoption misc:cursor_zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor / 2.0}')" -# Waybar / Bar related -bindd = $mainMod CTRL ALT, B, toggle waybar on/off, exec, pkill -SIGUSR1 waybar -bindd = $mainMod CTRL, B, waybar styles menu, exec, $scriptsDir/WaybarStyles.sh -bindd = $mainMod ALT, B, waybar layout menu, exec, $scriptsDir/WaybarLayout.sh -# Night light toggle (Hyprsunset) -bindd = $mainMod, N, toggle night light, exec, $scriptsDir/Hyprsunset.sh toggle -# FEATURES / EXTRAS (UserScripts) -bindd = $mainMod SHIFT, M, online music, exec, $UserScripts/RofiBeats.sh -bindd = $mainMod, W, select wallpaper, exec, $UserScripts/WallpaperSelect.sh -bindd = $mainMod SHIFT, W, wallpaper effects, exec, $UserScripts/WallpaperEffects.sh -bindd = CTRL ALT, W, random wallpaper, exec, $UserScripts/WallpaperRandom.sh -bindd = $mainMod CTRL, O, toggle active window opacity, exec, hyprctl setprop active opaque toggle -bindd = $mainMod SHIFT, K, search keybinds, exec, $scriptsDir/KeyBinds.sh -bindd = $mainMod SHIFT, A, animations menu, exec, $scriptsDir/Animations.sh -bindd = $mainMod SHIFT, O, change oh-my-zsh theme, exec, $UserScripts/ZshChangeTheme.sh -bindlnd = ALT_L, SHIFT_L, switch keyboard layout globally, exec, $scriptsDir/SwitchKeyboardLayout.sh -bindlnd = SHIFT_L, ALT_L, switch keyboard layout per-window, exec, $scriptsDir/Tak0-Per-Window-Switch.sh -bindd = $mainMod ALT, C, calculator, exec, $UserScripts/RofiCalc.sh -# Move current workspaces to monitors (left right up or down) -bindd = $mainMod CTRL, F9, move workspace to left monitor, movecurrentworkspacetomonitor, l -bindd = $mainMod CTRL, F10, move workspace to right monitor, movecurrentworkspacetomonitor, r -bindd = $mainMod CTRL, F11, move workspace to up monitor, movecurrentworkspacetomonitor, u -bindd = $mainMod CTRL, F12, move workspace to down monitor, movecurrentworkspacetomonitor, d # For passthrough keyboard into a VM diff --git a/config/hypr/UserConfigs/UserSettings.conf b/config/hypr/UserConfigs/UserSettings.conf index 4802e79a..df68b396 100644 --- a/config/hypr/UserConfigs/UserSettings.conf +++ b/config/hypr/UserConfigs/UserSettings.conf @@ -4,119 +4,7 @@ # if the upgrade.sh is used. # refer to Hyprland wiki for more info https://wiki.hyprland.org/Configuring/Variables/ - # NOTE: some settings are in ~/.config/hypr/UserConfigs/UserDecorAnimations.conf +# +# Look on ~/.config/hypr/configs/SystemSettings.conf to know how to modify this -dwindle { - pseudotile = true - preserve_split = true - #smart_split = true - special_scale_factor = 0.8 -} - -master { - new_status = master - new_on_top = 1 - mfact = 0.5 -} - -general { - resize_on_border = true - - layout = dwindle -} - -input { - kb_layout = us - kb_variant = - kb_model = - kb_options = - kb_rules = - repeat_rate = 50 - repeat_delay = 300 - - sensitivity = 0 #mouse sensitivity - #accel_profile = # flat or adaptive or blank or EMPTY means libinput’s default mode - numlock_by_default = true - left_handed = false - follow_mouse = 1 - float_switch_override_focus = false - - touchpad { - disable_while_typing = true - natural_scroll = true - clickfinger_behavior = false - middle_button_emulation = false - tap-to-click = true - drag_lock = false - } - - # below for devices with touchdevice ie. touchscreen - touchdevice { - enabled = true - } - - # below is for table see link above for proper variables - tablet { - transform = 0 - left_handed = 0 - } -} - - -gestures { - gesture = 3, horizontal, workspace - workspace_swipe_distance = 500 - workspace_swipe_invert = true - workspace_swipe_min_speed_to_force = 30 - workspace_swipe_cancel_ratio = 0.5 - workspace_swipe_create_new = true - workspace_swipe_forever = true - #workspace_swipe_use_r = true #uncomment if wanted a forever create a new workspace with swipe right - gesture = 3, up, dispatcher, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor * 1.5}')" - gesture = 3, down, dispatcher, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor / 1.5}')" -} - -misc { - disable_hyprland_logo = true - disable_splash_rendering = true - vfr = true - vrr = 2 - mouse_move_enables_dpms = true - enable_swallow = off - swallow_regex = ^(kitty)$ - focus_on_activate = false - initial_workspace_tracking = 0 - middle_click_paste = false - enable_anr_dialog = true # Application not Responding (ANR) - anr_missed_pings = 15 # ANR Threshold default 1 is too low - allow_session_lock_restore = true # Prevent lockscreen crash when resume from suspend -} - -#opengl { -# nvidia_anti_flicker = true -#} - -binds { - workspace_back_and_forth = true - allow_workspace_cycles = true - pass_mouse_when_bound = false -} - -#Could help when scaling and not pixelating -xwayland { - enabled = true - force_zero_scaling = true -} - -render { - direct_scanout = 0 -} - -cursor { - sync_gsettings_theme = true - no_hardware_cursors = 2 # change to 1 if want to disable - enable_hyprcursor = true - warp_on_change_workspace = 2 - no_warps = true -} diff --git a/config/hypr/UserConfigs/WindowRules-old.conf b/config/hypr/UserConfigs/WindowRules-old.conf deleted file mode 100644 index d6e1dead..00000000 --- a/config/hypr/UserConfigs/WindowRules-old.conf +++ /dev/null @@ -1,206 +0,0 @@ -# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # -# For window rules and layerrules -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more - -# NOTES: This is only for Hyprland older versions (< 0.48) - -# windowrule v2 - tags - add apps under appropriate tag to use the same settings -# browser tags -windowrulev2 = tag +browser, class:^([Ff]irefox|org.mozilla.firefox|[Ff]irefox-esr|[Ff]irefox-bin)$ -windowrulev2 = tag +browser, class:^([Gg]oogle-chrome(-beta|-dev|-unstable)?)$ -windowrulev2 = tag +browser, class:^(chrome-.+-Default)$ # Chrome PWAs -windowrulev2 = tag +browser, class:^([Cc]hromium)$ -windowrulev2 = tag +browser, class:^([Mm]icrosoft-edge(-stable|-beta|-dev|-unstable))$ -windowrulev2 = tag +browser, class:^(Brave-browser(-beta|-dev|-unstable)?)$ -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 +KooL_Cheat, title:^(KooL Quick Cheat Sheet)$ -windowrulev2 = tag +KooL_Settings, title:^(KooL Hyprland Settings)$ -windowrulev2 = tag +KooL-Settings, class:^(nwg-displays|nwg-look)$ - -# terminal tags -windowrulev2 = tag +terminal, class:^(Alacritty|kitty|kitty-dropterm)$ - -# email tags -windowrulev2 = tag +email, class:^([Tt]hunderbird|org.gnome.Evolution)$ -windowrulev2 = tag +email, class:^(eu.betterbird.Betterbird)$ - -# project tags -windowrulev2 = tag +projects, class:^(codium|codium-url-handler|VSCodium)$ -windowrulev2 = tag +projects, class:^(VSCode|code-url-handler)$ -windowrulev2 = tag +projects, class:^(jetbrains-.+)$ # JetBrains IDEs - -# screenshare tags -windowrulev2 = tag +screenshare, class:^(com.obsproject.Studio)$ - -# IM tags -windowrulev2 = tag +im, class:^([Dd]iscord|[Ww]ebCord|[Vv]esktop)$ -windowrulev2 = tag +im, class:^([Ff]erdium)$ -windowrulev2 = tag +im, class:^([Ww]hatsapp-for-linux)$ -windowrulev2 = tag +im, class:^(ZapZap|com.rtosta.zapzap)$ -windowrulev2 = tag +im, class:^(org.telegram.desktop|io.github.tdesktop_x64.TDesktop)$ -windowrulev2 = tag +im, class:^(teams-for-linux)$ - -# game tags -windowrulev2 = tag +games, class:^(gamescope)$ -windowrulev2 = tag +games, class:^(steam_app_\d+)$ - -# gamestore tags -windowrulev2 = tag +gamestore, class:^([Ss]team)$ -windowrulev2 = tag +gamestore, title:^([Ll]utris)$ -windowrulev2 = tag +gamestore, class:^(com.heroicgameslauncher.hgl)$ - -# file-manager tags -windowrulev2 = tag +file-manager, class:^([Tt]hunar|org.gnome.Nautilus|[Pp]cmanfm-qt)$ -windowrulev2 = tag +file-manager, class:^(app.drey.Warp)$ - -# wallpaper tags -windowrulev2 = tag +wallpaper title:^([Ww]aytrogen)$ -windowrulev2 = tag +wallpaper, class:^([Ww]aytrogen)$ - -# multimedia tags -windowrulev2 = tag +multimedia, class:^([Aa]udacious)$ - - -# settings tags -windowrulev2 = tag +settings, title:^(ROG Control)$ -windowrulev2 = tag +settings, class:^(wihotspot(-gui)?)$ # wifi hotspot -windowrulev2 = tag +settings, class:^([Bb]aobab|org.gnome.[Bb]aobab)$ # Disk usage analyzer -windowrulev2 = tag +settings, class:^(gnome-disks|wihotspot(-gui)?)$ -windowrulev2 = tag +settings, title:(Kvantum Manager) -windowrulev2 = tag +settings, class:^(file-roller|org.gnome.FileRoller)$ # archive manager -windowrulev2 = tag +settings, class:^(nm-applet|nm-connection-editor|blueman-manager)$ -windowrulev2 = tag +settings, class:^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$ -windowrulev2 = tag +settings, class:^(qt5ct|qt6ct|[Yy]ad)$ -windowrulev2 = tag +settings, class:(xdg-desktop-portal-gtk) -windowrulev2 = tag +settings, class:^(org.kde.polkit-kde-authentication-agent-1)$ -windowrulev2 = tag +settings, class:^([Rr]ofi)$ - -# viewer tags -windowrulev2 = tag +viewer, class:^(gnome-system-monitor|org.gnome.SystemMonitor|io.missioncenter.MissionCenter)$ # system monitor -windowrulev2 = tag +viewer, class:^(evince)$ # document viewer -windowrulev2 = tag +viewer, class:^(eog|org.gnome.Loupe)$ # image viewer - -# POSITION -# windowrulev2 = center,floating:1 # warning, it cause even the menu to float and center. -windowrulev2 = center, tag:KooL_Cheat* -windowrulev2 = center, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*) -windowrulev2 = center, title:^(ROG Control)$ -windowrulev2 = center, tag:KooL-Settings* -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)$ -windowrulev2 = center, class:^([Ff]erdium)$ -windowrulev2 = move 72% 7%,title:^(Picture-in-Picture)$ -#windowrulev2 = move 72% 7%,title:^(Firefox)$ - -# windowrule v2 to avoid idle for fullscreen apps -#windowrulev2 = idleinhibit fullscreen, class:^(*)$ -#windowrulev2 = idleinhibit fullscreen, title:^(*)$ -windowrulev2 = idleinhibit fullscreen, fullscreen:1 - -# windowrule v2 move to workspace -windowrulev2 = workspace 1, tag:email* -windowrulev2 = workspace 2, tag:browser* -#windowrulev2 = workspace 3, class:^([Tt]hunar)$ -#windowrulev2 = workspace 3, tag:projects* -windowrulev2 = workspace 5, tag:gamestore* -windowrulev2 = workspace 7, tag:im* -windowrulev2 = workspace 8, tag:games* - -# windowrule v2 move to workspace (silent) -windowrulev2 = workspace 4 silent, tag:screenshare* -windowrulev2 = workspace 6 silent, class:^(virt-manager)$ -windowrulev2 = workspace 6 silent, class:^(.virt-manager-wrapped)$ -windowrulev2 = workspace 9 silent, tag:multimedia* - -# FLOAT -windowrulev2 = float, tag:KooL_Cheat* -windowrulev2 = float, tag:wallpaper* -windowrulev2 = float, tag:settings* -windowrulev2 = float, tag:viewer* -windowrulev2 = float, tag:KooL-Settings* -windowrulev2 = float, class:([Zz]oom|onedriver|onedriver-launcher)$ -windowrulev2 = float, class:(org.gnome.Calculator), title:(Calculator) -windowrulev2 = float, class:^(mpv|com.github.rafostar.Clapper)$ -windowrulev2 = float, class:^([Qq]alculate-gtk)$ -#windowrulev2 = float, class:^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$ -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)$ -windowrulev2 = float, class:(codium|codium-url-handler|VSCodium), title:negative:(.*codium.*|.*VSCodium.*) -windowrulev2 = float, class:^(com.heroicgameslauncher.hgl)$, title:negative:(Heroic Games Launcher) -windowrulev2 = float, class:^([Ss]team)$, title:negative:^([Ss]team)$ -windowrulev2 = float, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*) -#windowrulev2 = float, class:(electron), title:(Add Folder to Workspace) -windowrulev2 = float, title:^(Add Folder to Workspace)$ -windowrulev2 = size 70% 60%, title:^(Add Folder to Workspace)$ -windowrulev2 = center, title:^(Add Folder to Workspace)$ -windowrulev2 = float, initialTitle:(Open Files) -windowrulev2 = size 70% 60%, initialTitle:(Open Files) -windowrulev2 = float, title:^(SDDM Background)$ #KooL's Dots YAD for setting SDDM background -windowrulev2 = center, title:^(SDDM Background)$ #KooL's Dots YAD for setting SDDM background -windowrulev2 = size 16% 12%, title:^(SDDM Background)$ #KooL's Dots YAD for setting SDDM background - -# OPACITY -windowrulev2 = opacity 0.9 0.7, tag:browser* -windowrulev2 = opacity 0.9 0.8, tag:projects* -windowrulev2 = opacity 0.94 0.86, tag:im* -windowrulev2 = opacity 0.94 0.86, tag:multimedia* -windowrulev2 = opacity 0.9 0.8, tag:file-manager* -windowrulev2 = opacity 0.8 0.7, tag:terminal* -windowrulev2 = opacity 0.8 0.7, tag:settings* -windowrulev2 = opacity 0.82 0.75, tag:viewer* -windowrulev2 = opacity 0.9 0.7, tag:wallpaper* -windowrulev2 = opacity 0.8 0.7, class:^(gedit|org.gnome.TextEditor|mousepad)$ -windowrulev2 = opacity 0.9 0.8, class:^(deluge)$ -windowrulev2 = opacity 0.9 0.8, class:^(im.riot.Riot)$ # Element matrix client -windowrulev2 = opacity 0.9 0.8, class:^(seahorse)$ # gnome-keyring gui -windowrulev2 = opacity 0.95 0.75, title:^(Picture-in-Picture)$ - - -# SIZE -windowrulev2 = size 65% 90%, tag:KooL_Cheat* -windowrulev2 = size 70% 70%, tag:wallpaper* -windowrulev2 = size 70% 70%, tag:settings* -windowrulev2 = size 60% 70%, class:^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$ -windowrulev2 = size 60% 70%, class:^([Ff]erdium)$ - -#windowrulev2 = size 25% 25%, title:^(Picture-in-Picture)$ -#windowrulev2 = size 25% 25%, title:^(Firefox)$ - -# PINNING -windowrulev2 = pin, title:^(Picture-in-Picture)$ -#windowrulev2 = pin,title:^(Firefox)$ - -# windowrule v2 - extras -windowrulev2 = keepaspectratio, title:^(Picture-in-Picture)$ - -# BLUR & FULLSCREEN -windowrulev2 = noblur, tag:games* -windowrulev2 = fullscreen, tag:games* - -#windowrulev2 = bordercolor rgb(EE4B55) rgb(880808), fullscreen:1 -#windowrulev2 = bordercolor rgb(282737) rgb(1E1D2D), floating:1 -#windowrulev2 = opacity 0.8 0.8, pinned:1 - -# LAYER RULES -layerrule = blur, rofi -layerrule = ignorezero, rofi -layerrule = blur, notifications -layerrule = ignorezero, notifications -#layerrule = ignorealpha 0.5, tag:notif* - -#layerrule = ignorezero, class:^([Rr]ofi)$ -#layerrule = blur, class:^([Rr]ofi)$ -#layerrule = unset,class:^([Rr]ofi)$ -#layerrule = ignorezero, <rofi> - -#layerrule = ignorezero, overview -#layerrule = blur, overview
\ No newline at end of file diff --git a/config/hypr/UserConfigs/WindowRules-v3.conf b/config/hypr/UserConfigs/WindowRules-v3.conf deleted file mode 100644 index f093faf6..00000000 --- a/config/hypr/UserConfigs/WindowRules-v3.conf +++ /dev/null @@ -1,671 +0,0 @@ -# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # -# For window rules and layerrules -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more - -# NOTES: This is only for Hyprland > 0.52 - -# note for ja: This should NOT be implemented on Debian and Ubuntu - -# windowrule - tags - add apps under appropriate tag to use the same settings -# browser tags -# notif tags -# KooL settings tag -# terminal tags -# email tags -# project tags -# screenshare tags -# IM tags -# game tags -# gamestore tags -# file-manager tags -# wallpaper tags -# multimedia tags -# multimedia-video tags -# settings tags -# viewer tags -# Some special override rules - -# POSITION -# windowrule = center,floating:1 # warning, it cause even the menu to float and center. -#windowrule = move 72% 7%,title:^(Firefox)$ - -# windowrule to avoid idle for fullscreen apps -#windowrule = idleinhibit fullscreen, class:^(*)$ -#windowrule = idleinhibit fullscreen, title:^(*)$ - -# windowrule move to workspace -#windowrule = workspace 1, tag:email* -#windowrule = workspace 2, tag:browser* -#windowrule = workspace 3, class:^([Tt]hunar)$ -#windowrule = workspace 3, tag:projects* -#windowrule = workspace 5, tag:gamestore* -#windowrule = workspace 7, tag:im* -#windowrule = workspace 8, tag:games* - -# windowrule move to workspace (silent) -#windowrule = workspace 4 silent, tag:screenshare* -#windowrule = workspace 6 silent, class:^(virt-manager)$ -#windowrule = workspace 6 silent, class:^(.virt-manager-wrapped)$ -#windowrule = workspace 9 silent, tag:multimedia* -# -# FLOAT -#windowrule = float, class:^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$ -#windowrule = float, title:^(Firefox)$ - -# windowrule - ######### float popups and dialogue ####### - - -# OPACITY - -# SIZE - -#windowrule = size 25% 25%, title:^(Picture-in-Picture)$ -#windowrule = size 25% 25%, title:^(Firefox)$ - -# PINNING -#windowrule = pin,title:^(Firefox)$ - -# windowrule - extras - -# BLUR & FULLSCREEN - - -#This not gonna take the focus to the window that appears when hovering over some of the parts of the IntelliJ Products - -#This will gonna make the VS Code bluer like other apps - -#windowrule = bordercolor rgb(EE4B55) rgb(880808), fullscreen:1 -#windowrule = bordercolor rgb(282737) rgb(1E1D2D), floating:1 -#windowrule = opacity 0.8 0.8, pinned:1 - -# LAYER RULES - -#layerrule = ignorealpha 0.5, tag:notif* - -#layerrule = ignorezero, class:^([Rr]ofi)$ -#layerrule = blur, class:^([Rr]ofi)$ -#layerrule = unset,class:^([Rr]ofi)$ -#layerrule = ignorezero, <rofi> - -#layerrule = ignorezero, overview -#layerrule = blur, overview - -# --- Auto-generated window rules --- -windowrule { - name = windowrule-1 - match:class = ^([Ff]irefox|org.mozilla.firefox|[Ff]irefox-esr|[Ff]irefox-bin)$ - tag = +browser -} - -windowrule { - name = windowrule-2 - match:class = ^([Gg]oogle-chrome(-beta|-dev|-unstable)?)$ - tag = +browser -} - -windowrule { - name = windowrule-3 - match:class = ^(chrome-.+-Default)$ # Chrome PWAs - tag = +browser -} - -windowrule { - name = windowrule-4 - match:class = ^([Cc]hromium)$ - tag = +browser -} - -windowrule { - name = windowrule-5 - match:class = ^([Mm]icrosoft-edge(-stable|-beta|-dev|-unstable))$ - tag = +browser -} - -windowrule { - name = windowrule-6 - match:class = ^(Brave-browser(-beta|-dev|-unstable)?)$ - tag = +browser -} - -windowrule { - name = windowrule-7 - match:class = ^([Tt]horium-browser|[Cc]achy-browser)$ - tag = +browser -} - -windowrule { - name = windowrule-8 - match:class = ^(zen-alpha|zen)$ - tag = +browser -} - -windowrule { - name = windowrule-9 - match:class = ^(swaync-control-center|swaync-notification-window|swaync-client|class)$ - tag = +notif -} - -windowrule { - name = windowrule-10 - match:title = ^(KooL Quick Cheat Sheet)$ - tag = +KooL_Cheat -} - -windowrule { - name = windowrule-11 - match:title = ^(KooL Hyprland Settings)$ - tag = +KooL_Settings -} - -windowrule { - name = windowrule-12 - match:class = ^(nwg-displays|nwg-look)$ - tag = +KooL-Settings -} - -windowrule { - name = windowrule-13 - match:class = ^(Alacritty|kitty|kitty-dropterm)$ - tag = +terminal -} - -windowrule { - name = windowrule-14 - match:class = ^([Tt]hunderbird|org.gnome.Evolution)$ - tag = +email -} - -windowrule { - name = windowrule-15 - match:class = ^(eu.betterbird.Betterbird)$ - tag = +email -} - -windowrule { - name = windowrule-16 - match:class = ^(codium|codium-url-handler|VSCodium)$ - tag = +projects -} - -windowrule { - name = windowrule-17 - match:class = ^(VSCode|code-url-handler)$ - tag = +projects -} - -windowrule { - name = windowrule-18 - match:class = ^(jetbrains-.+)$ # JetBrains IDEs - tag = +projects -} - -windowrule { - name = windowrule-19 - match:class = ^(com.obsproject.Studio)$ - tag = +screenshare -} - -windowrule { - name = windowrule-20 - match:class = ^([Dd]iscord|[Ww]ebCord|[Vv]esktop)$ - tag = +im -} - -windowrule { - name = windowrule-21 - match:class = ^([Ff]erdium)$ - center = on - float = on - size = 60% = 70% - tag = +im -} - -windowrule { - name = windowrule-22 - match:class = ^([Ww]hatsapp-for-linux)$ - tag = +im -} - -windowrule { - name = windowrule-23 - match:class = ^(ZapZap|com.rtosta.zapzap)$ - tag = +im -} - -windowrule { - name = windowrule-24 - match:class = ^(org.telegram.desktop|io.github.tdesktop_x64.TDesktop)$ - tag = +im -} - -windowrule { - name = windowrule-25 - match:class = ^(teams-for-linux)$ - tag = +im -} - -windowrule { - name = windowrule-26 - match:class = ^(im.riot.Riot|Element)$ # Element Matrix client - tag = +im -} - -windowrule { - name = windowrule-27 - match:class = ^(gamescope)$ - tag = +games -} - -windowrule { - name = windowrule-28 - match:class = ^(steam_app_\d+)$ - tag = +games -} - -windowrule { - name = windowrule-29 - match:class = ^([Ss]team)$ - tag = +gamestore -} - -windowrule { - name = windowrule-30 - match:title = ^([Ll]utris)$ - tag = +gamestore -} - -windowrule { - name = windowrule-31 - match:class = ^(com.heroicgameslauncher.hgl)$ - tag = +gamestore -} - -windowrule { - name = windowrule-32 - match:class = ^([Tt]hunar|org.gnome.Nautilus|[Pp]cmanfm-qt)$ - tag = +file-manager -} - -windowrule { - name = windowrule-33 - match:class = ^(app.drey.Warp)$ - tag = +file-manager -} - -windowrule { - name = windowrule-34 - match:class = ^([Ww]aytrogen)$ - tag = +wallpaper -} - -windowrule { - name = windowrule-35 - match:class = ^([Aa]udacious)$ - tag = +multimedia -} - -windowrule { - name = windowrule-36 - match:class = ^([Mm]pv|vlc)$ - tag = +multimedia_video -} - -windowrule { - name = windowrule-37 - match:title = ^(ROG Control)$ - center = on - tag = +settings -} - -windowrule { - name = windowrule-38 - match:class = ^(wihotspot(-gui)?)$ # wifi hotspot - tag = +settings -} - -windowrule { - name = windowrule-39 - match:class = ^([Bb]aobab|org.gnome.[Bb]aobab)$ # Disk usage analyzer - tag = +settings -} - -windowrule { - name = windowrule-40 - match:class = ^(gnome-disks|wihotspot(-gui)?)$ - tag = +settings -} - -windowrule { - name = windowrule-41 - match:title = (Kvantum Manager) - tag = +settings -} - -windowrule { - name = windowrule-42 - match:class = ^(file-roller|org.gnome.FileRoller)$ # archive manager - tag = +settings -} - -windowrule { - name = windowrule-43 - match:class = ^(nm-applet|nm-connection-editor|blueman-manager)$ - tag = +settings -} - -windowrule { - name = windowrule-44 - match:class = ^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$ - center = on - tag = +settings -} - -windowrule { - name = windowrule-45 - match:class = ^(qt5ct|qt6ct|[Yy]ad)$ - tag = +settings -} - -windowrule { - name = windowrule-46 - match:class = (xdg-desktop-portal-gtk) - tag = +settings -} - -windowrule { - name = windowrule-47 - match:class = ^(org.kde.polkit-kde-authentication-agent-1)$ - tag = +settings -} - -windowrule { - name = windowrule-48 - match:class = ^([Rr]ofi)$ - tag = +settings -} - -windowrule { - name = windowrule-49 - match:class = ^(gnome-system-monitor|org.gnome.SystemMonitor|io.missioncenter.MissionCenter)$ # system monitor - tag = +viewer -} - -windowrule { - name = windowrule-50 - match:class = ^(evince)$ # document viewer - tag = +viewer -} - -windowrule { - name = windowrule-51 - match:class = ^(eog|org.gnome.Loupe)$ # image viewer - tag = +viewer -} - -windowrule { - name = windowrule-52 - match:tag = multimedia_video* - no_blur = on - opacity = 1.0 -} - -windowrule { - name = windowrule-53 - match:tag = KooL_Cheat* - center = on - float = on - size = 65% = 90% -} - -windowrule { - name = windowrule-54 - match:class = ([Tt]hunar) - match:title = negative:(.*[Tt]hunar.*) - center = on - float = on -} - -windowrule { - name = windowrule-55 - match:tag = KooL-Settings* - center = on - float = on -} - -windowrule { - name = windowrule-56 - match:title = ^(Keybindings)$ - center = on -} - -windowrule { - name = windowrule-57 - match:class = ^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$ - center = on - size = 60% = 70% -} - -windowrule { - name = windowrule-58 - match:title = ^(Picture-in-Picture)$ - float = on - move = 72% = 7% - opacity = 0.95 = 0.75 - pin = 0 -} - -windowrule { - name = windowrule-59 - match:fullscreen = 1 - idle_inhibit = fullscreen -} - -windowrule { - name = windowrule-60 - match:tag = wallpaper* - float = on - opacity = 0.9 = 0.7 - size = 70% = 70% -} - -windowrule { - name = windowrule-61 - match:tag = settings* - float = on - opacity = 0.8 = 0.7 - size = 70% = 70% -} - -windowrule { - name = windowrule-62 - match:tag = viewer* - float = on - opacity = 0.82 = 0.75 -} - -windowrule { - name = windowrule-63 - match:class = ([Zz]oom|onedriver|onedriver-launcher)$ - float = on -} - -windowrule { - name = windowrule-64 - match:class = (org.gnome.Calculator) - match:title = (Calculator) - float = on -} - -windowrule { - name = windowrule-65 - match:class = ^(mpv|com.github.rafostar.Clapper)$ - float = on -} - -windowrule { - name = windowrule-66 - match:class = ^([Qq]alculate-gtk)$ - float = on -} - -windowrule { - name = windowrule-67 - match:title = ^(Authentication Required)$ - center = on - float = on -} - -windowrule { - name = windowrule-68 - match:class = (codium|codium-url-handler|VSCodium) - match:title = negative:(.*codium.*|.*VSCodium.*) - float = on -} - -windowrule { - name = windowrule-69 - match:class = ^(com.heroicgameslauncher.hgl)$ - match:title = negative:(Heroic Games Launcher) - float = on -} - -windowrule { - name = windowrule-70 - match:class = ^([Ss]team)$ - match:title = negative:^([Ss]team)$ - float = on -} - -windowrule { - name = windowrule-71 - match:title = ^(Add Folder to Workspace)$ - center = on - float = on - size = 70% = 60% -} - -windowrule { - name = windowrule-72 - match:title = ^(Save As)$ - center = on - float = on - size = 70% = 60% -} - -windowrule { - name = windowrule-73 - match:initial_title = (Open Files) - float = on - size = 70% = 60% -} - -windowrule { - name = windowrule-74 - match:title = ^(SDDM Background)$ #KooL's Dots YAD for setting SDDM background - center = on - float = on - size = 16% = 12% -} - -windowrule { - name = windowrule-75 - match:tag = browser* - opacity = 0.99 = 0.8 -} - -windowrule { - name = windowrule-76 - match:tag = projects* - opacity = 0.9 = 0.8 -} - -windowrule { - name = windowrule-77 - match:tag = im* - opacity = 0.94 = 0.86 -} - -windowrule { - name = windowrule-78 - match:tag = multimedia* - opacity = 0.94 = 0.86 -} - -windowrule { - name = windowrule-79 - match:tag = file-manager* - opacity = 0.9 = 0.8 -} - -windowrule { - name = windowrule-80 - match:tag = terminal* - opacity = 0.9 = 0.7 -} - -windowrule { - name = windowrule-81 - match:class = ^(gedit|org.gnome.TextEditor|mousepad)$ - opacity = 0.8 = 0.7 -} - -windowrule { - name = windowrule-82 - match:class = ^(deluge)$ - opacity = 0.9 = 0.8 -} - -windowrule { - name = windowrule-83 - match:class = ^(seahorse)$ # gnome-keyring gui - opacity = 0.9 = 0.8 -} - -windowrule { - name = windowrule-84 - match:class = ^(code)$ - opacity = 0.8 - opacity = 0.9 -} - -windowrule { - name = windowrule-85 - match:tag = games* - fullscreen = 0 - no_blur = on -} - -windowrule { - name = windowrule-86 - match:class = ^(jetbrains-*) - no_initial_focus = on -} - -windowrule { - name = windowrule-87 - match:title = ^(wind.*)$ - no_initial_focus = on -} - -# --- Auto-generated layer rules --- -layerrule { - name = layerrule-1 - match:namespace = rofi - blur = on - ignore_alpha = 0 -} - -layerrule { - name = layerrule-2 - match:namespace = notifications - blur = on - ignore_alpha = 0 -} - -layerrule { - name = layerrule-3 - match:namespace = quickshell:overview - blur = on - ignore_alpha = 0 - ignore_alpha = 0.5 -} diff --git a/config/hypr/UserConfigs/WindowRules.conf b/config/hypr/UserConfigs/WindowRules.conf index 2c24dafc..ee9eb317 100644 --- a/config/hypr/UserConfigs/WindowRules.conf +++ b/config/hypr/UserConfigs/WindowRules.conf @@ -2,234 +2,5 @@ # For window rules and layerrules # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more -# NOTES: This is only for Hyprland > 0.48 - -# note for ja: This should NOT be implemented on Debian and Ubuntu - -# windowrule - tags - add apps under appropriate tag to use the same settings -# browser tags -windowrule = tag +browser, class:^([Ff]irefox|org.mozilla.firefox|[Ff]irefox-esr|[Ff]irefox-bin)$ -windowrule = tag +browser, class:^([Gg]oogle-chrome(-beta|-dev|-unstable)?)$ -windowrule = tag +browser, class:^(chrome-.+-Default)$ # Chrome PWAs -windowrule = tag +browser, class:^([Cc]hromium)$ -windowrule = tag +browser, class:^([Mm]icrosoft-edge(-stable|-beta|-dev|-unstable))$ -windowrule = tag +browser, class:^(Brave-browser(-beta|-dev|-unstable)?)$ -windowrule = tag +browser, class:^([Tt]horium-browser|[Cc]achy-browser)$ -windowrule = tag +browser, class:^(zen-alpha|zen)$ - -# notif tags -windowrule = tag +notif, class:^(swaync-control-center|swaync-notification-window|swaync-client|class)$ - -# KooL settings tag -windowrule = tag +KooL_Cheat, title:^(KooL Quick Cheat Sheet)$ -windowrule = tag +KooL_Settings, title:^(KooL Hyprland Settings)$ -windowrule = tag +KooL-Settings, class:^(nwg-displays|nwg-look)$ - -# terminal tags -windowrule = tag +terminal, class:^(Alacritty|kitty|kitty-dropterm)$ - -# email tags -windowrule = tag +email, class:^([Tt]hunderbird|org.gnome.Evolution)$ -windowrule = tag +email, class:^(eu.betterbird.Betterbird)$ - -# project tags -windowrule = tag +projects, class:^(codium|codium-url-handler|VSCodium)$ -windowrule = tag +projects, class:^(VSCode|code-url-handler)$ -windowrule = tag +projects, class:^(jetbrains-.+)$ # JetBrains IDEs - -# screenshare tags -windowrule = tag +screenshare, class:^(com.obsproject.Studio)$ - -# IM tags -windowrule = tag +im, class:^([Dd]iscord|[Ww]ebCord|[Vv]esktop)$ -windowrule = tag +im, class:^([Ff]erdium)$ -windowrule = tag +im, class:^([Ww]hatsapp-for-linux)$ -windowrule = tag +im, class:^(ZapZap|com.rtosta.zapzap)$ -windowrule = tag +im, class:^(org.telegram.desktop|io.github.tdesktop_x64.TDesktop)$ -windowrule = tag +im, class:^(teams-for-linux)$ -windowrule = tag +im, class:^(im.riot.Riot|Element)$ # Element Matrix client - -# game tags -windowrule = tag +games, class:^(gamescope)$ -windowrule = tag +games, class:^(steam_app_\d+)$ - -# gamestore tags -windowrule = tag +gamestore, class:^([Ss]team)$ -windowrule = tag +gamestore, title:^([Ll]utris)$ -windowrule = tag +gamestore, class:^(com.heroicgameslauncher.hgl)$ - -# file-manager tags -windowrule = tag +file-manager, class:^([Tt]hunar|org.gnome.Nautilus|[Pp]cmanfm-qt)$ -windowrule = tag +file-manager, class:^(app.drey.Warp)$ - -# wallpaper tags -windowrule = tag +wallpaper, class:^([Ww]aytrogen)$ - -# multimedia tags -windowrule = tag +multimedia, class:^([Aa]udacious)$ - -# multimedia-video tags -windowrule = tag +multimedia_video, class:^([Mm]pv|vlc)$ - -# settings tags -windowrule = tag +settings, title:^(ROG Control)$ -windowrule = tag +settings, class:^(wihotspot(-gui)?)$ # wifi hotspot -windowrule = tag +settings, class:^([Bb]aobab|org.gnome.[Bb]aobab)$ # Disk usage analyzer -windowrule = tag +settings, class:^(gnome-disks|wihotspot(-gui)?)$ -windowrule = tag +settings, title:(Kvantum Manager) -windowrule = tag +settings, class:^(file-roller|org.gnome.FileRoller)$ # archive manager -windowrule = tag +settings, class:^(nm-applet|nm-connection-editor|blueman-manager)$ -windowrule = tag +settings, class:^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$ -windowrule = tag +settings, class:^(qt5ct|qt6ct|[Yy]ad)$ -windowrule = tag +settings, class:(xdg-desktop-portal-gtk) -windowrule = tag +settings, class:^(org.kde.polkit-kde-authentication-agent-1)$ -windowrule = tag +settings, class:^([Rr]ofi)$ - -# viewer tags -windowrule = tag +viewer, class:^(gnome-system-monitor|org.gnome.SystemMonitor|io.missioncenter.MissionCenter)$ # system monitor -windowrule = tag +viewer, class:^(evince)$ # document viewer -windowrule = tag +viewer, class:^(eog|org.gnome.Loupe)$ # image viewer - -# Some special override rules -windowrule = noblur, tag:multimedia_video* -windowrule = opacity 1.0, tag:multimedia_video* - -# POSITION -# windowrule = center,floating:1 # warning, it cause even the menu to float and center. -windowrule = center, tag:KooL_Cheat* -windowrule = center, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*) -windowrule = center, title:^(ROG Control)$ -windowrule = center, tag:KooL-Settings* -windowrule = center, title:^(Keybindings)$ -windowrule = center, class:^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$ -windowrule = center, class:^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$ -windowrule = center, class:^([Ff]erdium)$ -windowrule = move 72% 7%,title:^(Picture-in-Picture)$ -#windowrule = move 72% 7%,title:^(Firefox)$ - -# windowrule to avoid idle for fullscreen apps -#windowrule = idleinhibit fullscreen, class:^(*)$ -#windowrule = idleinhibit fullscreen, title:^(*)$ -windowrule = idleinhibit fullscreen, fullscreen:1 - -# windowrule move to workspace -#windowrule = workspace 1, tag:email* -#windowrule = workspace 2, tag:browser* -#windowrule = workspace 3, class:^([Tt]hunar)$ -#windowrule = workspace 3, tag:projects* -#windowrule = workspace 5, tag:gamestore* -#windowrule = workspace 7, tag:im* -#windowrule = workspace 8, tag:games* - -# windowrule move to workspace (silent) -#windowrule = workspace 4 silent, tag:screenshare* -#windowrule = workspace 6 silent, class:^(virt-manager)$ -#windowrule = workspace 6 silent, class:^(.virt-manager-wrapped)$ -#windowrule = workspace 9 silent, tag:multimedia* -# -# FLOAT -windowrule = float, tag:KooL_Cheat* -windowrule = float, tag:wallpaper* -windowrule = float, tag:settings* -windowrule = float, tag:viewer* -windowrule = float, tag:KooL-Settings* -windowrule = float, class:([Zz]oom|onedriver|onedriver-launcher)$ -windowrule = float, class:(org.gnome.Calculator), title:(Calculator) -windowrule = float, class:^(mpv|com.github.rafostar.Clapper)$ -windowrule = float, class:^([Qq]alculate-gtk)$ -#windowrule = float, class:^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$ -windowrule = float, class:^([Ff]erdium)$ -windowrule = float, title:^(Picture-in-Picture)$ -#windowrule = float, title:^(Firefox)$ - -# windowrule - ######### float popups and dialogue ####### -windowrule = float, title:^(Authentication Required)$ -windowrule = center, title:^(Authentication Required)$ -windowrule = float, class:(codium|codium-url-handler|VSCodium), title:negative:(.*codium.*|.*VSCodium.*) -windowrule = float, class:^(com.heroicgameslauncher.hgl)$, title:negative:(Heroic Games Launcher) -windowrule = float, class:^([Ss]team)$, title:negative:^([Ss]team)$ -windowrule = float, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*) - -windowrule = float, title:^(Add Folder to Workspace)$ -windowrule = size 70% 60%, title:^(Add Folder to Workspace)$ -windowrule = center, title:^(Add Folder to Workspace)$ - -windowrule = float, title:^(Save As)$ -windowrule = size 70% 60%, title:^(Save As)$ -windowrule = center, title:^(Save As)$ - -windowrule = float, initialTitle:(Open Files) -windowrule = size 70% 60%, initialTitle:(Open Files) - -windowrule = float, title:^(SDDM Background)$ #KooL's Dots YAD for setting SDDM background -windowrule = center, title:^(SDDM Background)$ #KooL's Dots YAD for setting SDDM background -windowrule = size 16% 12%, title:^(SDDM Background)$ #KooL's Dots YAD for setting SDDM background -# END of float popups and dialogue ####### - -# OPACITY -windowrule = opacity 0.99 0.8, tag:browser* -windowrule = opacity 0.9 0.8, tag:projects* -windowrule = opacity 0.94 0.86, tag:im* -windowrule = opacity 0.94 0.86, tag:multimedia* -windowrule = opacity 0.9 0.8, tag:file-manager* -windowrule = opacity 0.9 0.7, tag:terminal* -windowrule = opacity 0.8 0.7, tag:settings* -windowrule = opacity 0.82 0.75, tag:viewer* -windowrule = opacity 0.9 0.7, tag:wallpaper* -windowrule = opacity 0.8 0.7, class:^(gedit|org.gnome.TextEditor|mousepad)$ -windowrule = opacity 0.9 0.8, class:^(deluge)$ -windowrule = opacity 0.9 0.8, class:^(seahorse)$ # gnome-keyring gui -windowrule = opacity 0.95 0.75, title:^(Picture-in-Picture)$ -windowrule = opacity 0.9,class:^(code)$ - -# SIZE -windowrule = size 65% 90%, tag:KooL_Cheat* -windowrule = size 70% 70%, tag:wallpaper* -windowrule = size 70% 70%, tag:settings* -windowrule = size 60% 70%, class:^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$ -windowrule = size 60% 70%, class:^([Ff]erdium)$ - -#windowrule = size 25% 25%, title:^(Picture-in-Picture)$ -#windowrule = size 25% 25%, title:^(Firefox)$ - -# PINNING -windowrule = pin, title:^(Picture-in-Picture)$ -#windowrule = pin,title:^(Firefox)$ - -# windowrule - extras -windowrule = keepaspectratio, title:^(Picture-in-Picture)$ - -# BLUR & FULLSCREEN -windowrule = noblur, tag:games* -windowrule = fullscreen, tag:games* - - -#This not gonna take the focus to the window that appears when hovering over some of the parts of the IntelliJ Products -windowrule = noinitialfocus, class:^(jetbrains-*) -windowrule = noinitialfocus, title:^(wind.*)$ - -#This will gonna make the VS Code bluer like other apps -windowrule = opacity 0.8,class:^(code)$ - -#windowrule = bordercolor rgb(EE4B55) rgb(880808), fullscreen:1 -#windowrule = bordercolor rgb(282737) rgb(1E1D2D), floating:1 -#windowrule = opacity 0.8 0.8, pinned:1 - -# LAYER RULES -layerrule = blur, rofi -layerrule = ignorezero, rofi -layerrule = blur, notifications -layerrule = ignorezero, notifications -layerrule = blur, quickshell:overview -layerrule = ignorezero, quickshell:overview -layerrule = ignorealpha 0.5, quickshell:overview - -#layerrule = ignorealpha 0.5, tag:notif* - -#layerrule = ignorezero, class:^([Rr]ofi)$ -#layerrule = blur, class:^([Rr]ofi)$ -#layerrule = unset,class:^([Rr]ofi)$ -#layerrule = ignorezero, <rofi> - -#layerrule = ignorezero, overview -#layerrule = blur, overview +# This file is used to add or overwrite window rules +# This file will not be modified during dotfiles updates diff --git a/config/hypr/UserConfigs/WorkSpaceRules b/config/hypr/UserConfigs/WorkSpaceRules.conf index aa86b35c..aa86b35c 100644 --- a/config/hypr/UserConfigs/WorkSpaceRules +++ b/config/hypr/UserConfigs/WorkSpaceRules.conf diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 9e51125f..0029d3e5 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -93,7 +93,7 @@ menu() { fi printf "%s\x00icon\x1f%s\n" "$pic_name" "$cache_preview_image" else - printf "%s\x00icon\x1f%s\n" "$(echo "$pic_name" | cut -d. -f1)" "$pic_path" + printf "%s\x00icon\x1f%s\n" "$pic_name" "$pic_path" fi done } diff --git a/config/hypr/UserScripts/Weather.py b/config/hypr/UserScripts/Weather.py index a6483777..6061f696 100755 --- a/config/hypr/UserScripts/Weather.py +++ b/config/hypr/UserScripts/Weather.py @@ -224,6 +224,12 @@ def read_api_cache() -> Optional[Dict[str, Any]]: data = json.load(f) # Use ensure_dict for safety data_dict = ensure_dict(data) + + # Invalidate cache if units mismatch + if data_dict.get("units") != UNITS: + log_debug(f"Cache units '{data_dict.get('units')}' mismatch current '{UNITS}'.") + return None + timestamp_val = data_dict.get("timestamp", 0) timestamp = coerce_float(timestamp_val) or 0 if (time.time() - timestamp) <= CACHE_TTL_SECONDS: @@ -238,6 +244,7 @@ def write_api_cache(payload: Dict[str, Any]) -> None: try: ensure_cache_dir() payload["timestamp"] = time.time() + payload["units"] = UNITS with API_CACHE_PATH.open("w", encoding="utf-8") as f: json.dump(payload, f) except Exception as e: @@ -455,15 +462,15 @@ def fetch_aqi(lat: float, lon: float) -> Optional[Dict[str, Any]]: def extract_place_parts_nominatim(data_dict: JSONDict) -> List[str]: address = ensure_dict(data_dict.get("address")) candidates = [data_dict.get("name"), address.get("city"), address.get("town"), address.get("village"), address.get("hamlet")] - name = cast(Optional[str], next((c for c in candidates if c is not None), None)) + name = cast(Optional[str], next((c for c in candidates if c is not None and c != ""), None)) admin1 = cast(Optional[str], address.get("state")) country = cast(Optional[str], address.get("country")) parts: List[str] = [] - if name is not None: + if name is not None and name != "": parts.append(name) - if admin1 is not None: + if admin1 is not None and admin1 != "": parts.append(admin1) - if country is not None: + if country is not None and country != "": parts.append(country) return parts @@ -691,7 +698,7 @@ def build_aqi_info(aqi: Optional[Dict[str, Any]]) -> str: def build_place_str(lat: float, lon: float, place: Optional[str]) -> str: effective_place = MANUAL_PLACE or ENV_PLACE or place if effective_place: - return f"{effective_place} ({lat:.3f}, {lon:.3f})" + return effective_place return f"{lat:.3f}, {lon:.3f}" diff --git a/config/hypr/configs/ENVariables.conf b/config/hypr/configs/ENVariables.conf new file mode 100644 index 00000000..d38c2d36 --- /dev/null +++ b/config/hypr/configs/ENVariables.conf @@ -0,0 +1,92 @@ +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # +# Environment variables. See https://wiki.hyprland.org/Configuring/Environment-variables/ + +# Set your defaults editor through ENV in ~/.config/hypr/UserConfigs/01-UserDefaults.conf + +# environment-variables +# Current Version of JakooLit Dotfiles: +env = DOTS_VERSION,2.3.18 + +### Toolkit Backend Variables ### +env = GDK_BACKEND,wayland,x11,* +env = QT_QPA_PLATFORM,wayland;xcb +env = CLUTTER_BACKEND,wayland + +#Run SDL2 applications on Wayland. +#Remove or set to x11 if games that provide older versions of SDL cause compatibility issues +#env = SDL_VIDEODRIVER,wayland + +### XDG Specifications ### +env = XDG_CURRENT_DESKTOP,Hyprland +env = XDG_SESSION_DESKTOP,Hyprland +env = XDG_SESSION_TYPE,wayland + +### QT Variables ### +env = QT_AUTO_SCREEN_SCALE_FACTOR,1 +env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 +env = QT_QPA_PLATFORMTHEME,qt5ct +env = QT_QPA_PLATFORMTHEME,qt6ct + +### hyprland-qt-support ### +env = QT_QUICK_CONTROLS_STYLE,org.hyprland.style + +### xwayland apps scale fix (useful if you are use monitor scaling) ### +# Set same value if you use scaling in Monitors.conf +# 1 is 100% 1.5 is 150% +# see https://wiki.hyprland.org/Configuring/XWayland/ +env = GDK_SCALE,1 +env = QT_SCALE_FACTOR,1 + +# Bibata-Modern-Ice-Cursor +# NOTE! You must have the hyprcursor version to activate this. +# https://wiki.hyprland.org/Hypr-Ecosystem/hyprcursor/ +#env = HYPRCURSOR_THEME,Bibata-Modern-Ice +#env = HYPRCURSOR_SIZE,24 + +### firefox ### +env = MOZ_ENABLE_WAYLAND,1 + +### electron >28 apps (may help) ### +# https://www.electronjs.org/docs/latest/api/environment-variables +env = ELECTRON_OZONE_PLATFORM_HINT,auto # auto selects Wayland if possible, X11 otherwise + +### NVIDIA ### +# This is from Hyprland Wiki. Below will be activated nvidia gpu detected +# See hyprland wiki https://wiki.hyprland.org/Nvidia/#environment-variables + +#env = LIBVA_DRIVER_NAME,nvidia +#env = __GLX_VENDOR_LIBRARY_NAME,nvidia +#env = NVD_BACKEND,direct +#env = GSK_RENDERER,ngl + +### additional ENV's for nvidia. Caution, activate with care ### +#env = GBM_BACKEND,nvidia-drm + +#env = __GL_GSYNC_ALLOWED,1 #adaptive Vsync +#env = __NV_PRIME_RENDER_OFFLOAD,1 +#env = __VK_LAYER_NV_optimus,NVIDIA_only +#env = WLR_DRM_NO_ATOMIC,1 + +### FOR VM and POSSIBLY NVIDIA ### +# LIBGL_ALWAYS_SOFTWARE software mesa rendering +#env = LIBGL_ALWAYS_SOFTWARE,1 # Warning. May cause hyprland to crash +#env = WLR_RENDERER_ALLOW_SOFTWARE,1 + +### nvidia firefox ### +# check this post https://github.com/elFarto/nvidia-vaapi-driver#configuration +#env = MOZ_DISABLE_RDD_SANDBOX,1 +#env = EGL_PLATFORM,wayland + +### Aquamarine Environment Variables (Hyprland > 0.45) ### +# https://wiki.hyprland.org/Configuring/Environment-variables/#aquamarine-environment-variables----ref-httpsgithubcomhyprwmaquamarineblobmaindocsenvmd--- +# env = AQ_TRACE,1 # Enables more verbose logging. +# env = AQ_DRM_DEVICES,/dev/dri/card1:/dev/dri/card0 # Set an explicit list of DRM devices (GPUs) to use. It’s a colon-separated list of paths, with the first being the primary. E.g. /dev/dri/card1:/dev/dri/card0 +# env = AQ_MGPU_NO_EXPLICIT,1 # Disables explicit syncing on mgpu buffers +# env = AQ_NO_MODIFIERS,1 # Disables modifiers for DRM buffers + +#### Hyprland Environment Variables #### +# https://wiki.hyprland.org/Configuring/Environment-variables/#hyprland-environment-variables +# env = HYPRLAND_TRACE,1 # Enables more verbose logging. +# env = HYPRLAND_NO_RT,1 # Disables realtime priority setting by Hyprland. +# env = HYPRLAND_NO_SD_NOTIFY,1 # If systemd, disables the 'sd_notify' calls. +# env = HYPRLAND_NO_SD_VARS,1 # Disables management of variables in systemd and dbus activation environments. diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf index fbe3bfe5..1ddbc81a 100644 --- a/config/hypr/configs/Keybinds.conf +++ b/config/hypr/configs/Keybinds.conf @@ -8,6 +8,72 @@ $scriptsDir = $HOME/.config/hypr/scripts $UserConfigs = $HOME/.config/hypr/UserConfigs $UserScripts = $HOME/.config/hypr/UserScripts +# settings for User defaults apps - set your default terminal and file manager on this file +source= $UserConfigs/01-UserDefaults.conf + +#### STANDAR #### +# Common shortcuts +#bindr = $mainMod, $mainMod_L, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window # Super Key to Launch rofi menu +bindd = $mainMod, D, app launcher, exec, pkill rofi || true && rofi -show drun -modi drun,filebrowser,run,window +bindd = $mainMod, B, open default browser, exec, xdg-open "https://" +bindd = $mainMod, A, desktop overview, exec, $scriptsDir/OverviewToggle.sh # toggles quickshell or ags overview (tries QS first, falls back to AGS) +#bindd = $mainMod, A, ags overview, exec, pkill rofi || true && ags -t 'overview' # desktop overview (if installed) +#bindd = $mainMod, A, Quickshell overview, global, quickshell:overviewToggle # desktop overview (if installed) +bindd = $mainMod, Return, Open terminal, exec, $term +bindd = $mainMod, E, file manager, exec, $files + +# FEATURES / EXTRAS +bindd = $mainMod, H, help / cheat sheet, exec, $scriptsDir/KeyHints.sh +bindd = $mainMod ALT, R, refresh bar and menus, exec, $scriptsDir/Refresh.sh +bindd = $mainMod ALT, E, emoji menu, exec, $scriptsDir/RofiEmoji.sh +bindd = $mainMod, S, web search, exec, $scriptsDir/RofiSearch.sh +bindd = $mainMod CTRL, S, window switcher, exec, rofi -show window +bindd = $mainMod ALT, O, toggle blur, exec, $scriptsDir/ChangeBlur.sh +bindd = $mainMod SHIFT, G, toggle game mode, exec, $scriptsDir/GameMode.sh +bindd = $mainMod ALT, L, toggle master/dwindle layout, exec, $scriptsDir/ChangeLayout.sh +bindd = $mainMod ALT, V, clipboard manager, exec, $scriptsDir/ClipManager.sh +bindd = $mainMod CTRL, R, rofi theme selector, exec, $scriptsDir/RofiThemeSelector.sh +bindd = $mainMod CTRL SHIFT, R, rofi theme selector (modified), exec, pkill rofi || true && $scriptsDir/RofiThemeSelector-modified.sh + +bindd = $mainMod SHIFT, F, fullscreen, fullscreen +bindd = $mainMod CTRL, F, maximize window, fullscreen, 1 +bindd = $mainMod, SPACE, Float current window, togglefloating, +bindd = $mainMod ALT, SPACE, Float all windows, exec, hyprctl dispatch workspaceopt allfloat +bindd = $mainMod SHIFT, Return, DropDown terminal, exec, $scriptsDir/Dropterminal.sh $term + +# Desktop zooming or magnifier +bindd = $mainMod ALT, mouse_down, zoom in, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor * 2.0}')" +bindd = $mainMod ALT, mouse_up, zoom out, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor / 2.0}')" + +# Waybar / Bar related +bindd = $mainMod CTRL ALT, B, toggle waybar on/off, exec, pkill -SIGUSR1 waybar +bindd = $mainMod CTRL, B, waybar styles menu, exec, $scriptsDir/WaybarStyles.sh +bindd = $mainMod ALT, B, waybar layout menu, exec, $scriptsDir/WaybarLayout.sh + +# Night light toggle (Hyprsunset) +bindd = $mainMod, N, toggle night light, exec, $scriptsDir/Hyprsunset.sh toggle + +# FEATURES / EXTRAS (UserScripts) +bindd = $mainMod SHIFT, M, online music, exec, $UserScripts/RofiBeats.sh +bindd = $mainMod, W, select wallpaper, exec, $UserScripts/WallpaperSelect.sh +bindd = $mainMod SHIFT, W, wallpaper effects, exec, $UserScripts/WallpaperEffects.sh +bindd = CTRL ALT, W, random wallpaper, exec, $UserScripts/WallpaperRandom.sh +bindd = $mainMod CTRL, O, toggle active window opacity, exec, hyprctl setprop active opaque toggle +bindd = $mainMod SHIFT, K, search keybinds, exec, $scriptsDir/KeyBinds.sh +bindd = $mainMod SHIFT, A, animations menu, exec, $scriptsDir/Animations.sh +bindd = $mainMod SHIFT, O, change oh-my-zsh theme, exec, $UserScripts/ZshChangeTheme.sh +bindlnd = ALT_L, SHIFT_L, switch keyboard layout globally, exec, $scriptsDir/SwitchKeyboardLayout.sh +bindlnd = SHIFT_L, ALT_L, switch keyboard layout per-window, exec, $scriptsDir/Tak0-Per-Window-Switch.sh +bindd = $mainMod ALT, C, calculator, exec, $UserScripts/RofiCalc.sh + +# Move current workspaces to monitors (left right up or down) +bindd = $mainMod CTRL, F9, move workspace to left monitor, movecurrentworkspacetomonitor, l +bindd = $mainMod CTRL, F10, move workspace to right monitor, movecurrentworkspacetomonitor, r +bindd = $mainMod CTRL, F11, move workspace to up monitor, movecurrentworkspacetomonitor, u +bindd = $mainMod CTRL, F12, move workspace to down monitor, movecurrentworkspacetomonitor, d + + +#### SYSTEM #### bindd = CTRL ALT, Delete, exit Hyprland, exec, hyprctl dispatch exit 0 bindd = $mainMod, Q, close active window, killactive, bindd = $mainMod SHIFT, Q, Terminate active process, exec, $scriptsDir/KillActiveProcess.sh @@ -32,9 +98,6 @@ bindd = $mainMod, P, toggle pseudo (dwindle), pseudo, # Works on either layout (Master or Dwindle) bindd = $mainMod, M, set split ratio 0.3, exec, hyprctl dispatch splitratio 0.3 -# group -bindd = $mainMod, G, toggle group, togglegroup -bindd = $mainMod CTRL, tab, change active in group, changegroupactive # Cycle windows; if floating bring to top bindd = ALT, tab, cycle next window, cyclenext @@ -84,6 +147,24 @@ bindd = $mainMod ALT, right, swap window right, swapwindow, r bindd = $mainMod ALT, up, swap window up, swapwindow, u bindd = $mainMod ALT, down, swap window down, swapwindow, d +# group +bindd = $mainMod, G, toggle group, togglegroup + +# Navigate within a group +bindd = $mainMod, Tab, Change Group Forward, changegroupactive, f +bindd = $mainMod CTRL, tab, change active in group, changegroupactive +bindd = $mainMod SHIFT, Tab, Change Group Back, changegroupactive, b + +# Move window into/out of group +bindd = $mainMod CTRL, K, Move left into group, moveintogroup, l # Move active window left into a group A +bindd = $mainMod CTRL, L, Move Right into group, moveintogroup, r # Move active window right into a group +bindd = $mainMod CTRL, H, Move active out of group, moveoutofgroup # Move active window out of group + +# Try to dynamically move in grouped window and when ungrouped +# Not working for me DW 11/26/25 PR: https://github.com/JaKooLit/Hyprland-Dots/pull/872 +#bindd = $mainMod, right, focus right, exec, bash -c 'if hyprctl activewindow -j | jq -e "((.grouped | type) == \"boolean\") or (.address == (.grouped[-1] // empty))" >/dev/null 2>&1; then hyprctl dispatch movefocus r; else hyprctl dispatch changegroupactive f; fi' +#bindd = $mainMod, left, focus left, exec, bash -c 'if hyprctl activewindow -j | jq -e "((.grouped | type) == \"boolean\") or (.address == (.grouped[0] // empty))" >/dev/null 2>&1; then hyprctl dispatch movefocus l; else hyprctl dispatch changegroupactive b; fi' + # Move focus with mainMod + arrow keys bindd = $mainMod, left, focus left, movefocus, l bindd = $mainMod, right, focus right, movefocus, r diff --git a/config/hypr/configs/Laptops.conf b/config/hypr/configs/Laptops.conf new file mode 100644 index 00000000..d6addb1d --- /dev/null +++ b/config/hypr/configs/Laptops.conf @@ -0,0 +1,33 @@ +# /* ---- 💫 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 + +$mainMod = SUPER +$scriptsDir = $HOME/.config/hypr/scripts +$UserConfigs = $HOME/.config/hypr/UserConfigs + +# for disabling Touchpad. hyprctl devices to get device name. +$Touchpad_Device=asue1209:00-04f3:319f-touchpad + +binde = , xf86KbdBrightnessDown, exec, $scriptsDir/BrightnessKbd.sh --dec # decrease keyboard brightness +binde = , xf86KbdBrightnessUp, exec, $scriptsDir/BrightnessKbd.sh --inc # increase keyboard brightness +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) +binde = , xf86MonBrightnessDown, exec, $scriptsDir/Brightness.sh --dec # decrease monitor brightness +binde = , xf86MonBrightnessUp, exec, $scriptsDir/Brightness.sh --inc # increase monitor brightness +bind = , xf86TouchpadToggle, exec, $scriptsDir/TouchPad.sh # disable touchpad + +# Screenshot keybindings using F6 (no PrinSrc button) +bind = $mainMod, F6, exec, $scriptsDir/ScreenShot.sh --now # screenshot +bind = $mainMod SHIFT, F6, exec, $scriptsDir/ScreenShot.sh --area # screenshot (area) +bind = $mainMod CTRL, F6, exec, $scriptsDir/ScreenShot.sh --in5 # # screenshot (5 secs delay) +bind = $mainMod ALT, F6, exec, $scriptsDir/ScreenShot.sh --in10 # screenshot (10 secs delay) +bind = ALT, F6, exec, $scriptsDir/ScreenShot.sh --active # screenshot (active window only) + +$TOUCHPAD_ENABLED = true +device { + name = $Touchpad_Device + enabled = $TOUCHPAD_ENABLED +} + diff --git a/config/hypr/configs/Startup_Apps.conf b/config/hypr/configs/Startup_Apps.conf index c1670595..0cfb6427 100644 --- a/config/hypr/configs/Startup_Apps.conf +++ b/config/hypr/configs/Startup_Apps.conf @@ -9,19 +9,20 @@ $lock = $scriptsDir/LockScreen.sh $SwwwRandom = $UserScripts/WallpaperAutoChange.sh $livewallpaper="" -# wallpaper stuff +### wallpaper stuff ### exec-once = swww-daemon --format xrgb #exec-once = mpvpaper '*' -o "load-scripts=no no-audio --loop" $livewallpaper # wallpaper random #exec-once = $SwwwRandom $wallDIR # random wallpaper switcher every 30 minutes -# Startup +### Startup ### exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = $scriptsDir/KeybindsLayoutInit.sh -# Initialize Drop Down terminal - See Bug#810 https://github.com/JaKooLit/Hyprland-Dots/issues/810#issuecomment-3351947644 +# Drop Down terminal +# See Bug#810 https://github.com/JaKooLit/Hyprland-Dots/issues/810#issuecomment-3351947644 exec-once = $HOME/.config/hypr/scripts/Dropterminal.sh kitty & @@ -36,26 +37,27 @@ exec-once = swaync #exec-once = blueman-applet #exec-once = rog-control-center exec-once = waybar -exec-once = qs # quickshell AGS Desktop Overview alternative +exec-once = qs -c overview # Quickshell Overview -#clipboard manager +# Clipboard manager exec-once = wl-paste --type text --watch cliphist store exec-once = wl-paste --type image --watch cliphist store # Rainbow borders exec-once = $UserScripts/RainbowBorders.sh -# Starting hypridle to start hyprlock +# hypridle for hyprlock exec-once = hypridle # Resume Hyprsunset if state is "on" from previous session exec-once = $scriptsDir/Hyprsunset.sh init # Here are list of features available but disabled by default -# exec-once = swww-daemon --format xrgb && swww img $HOME/Pictures/wallpapers/mecha-nostalgia.png # persistent wallpaper +# Persistent wallpaper +# exec-once = swww-daemon --format xrgb && swww img $HOME/Pictures/wallpapers/mecha-nostalgia.png -#gnome polkit for nixos +# 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
\ No newline at end of file +#exec-once = $scriptsDir/PortalHyprland.sh diff --git a/config/hypr/configs/SystemSettings.conf b/config/hypr/configs/SystemSettings.conf new file mode 100644 index 00000000..44521156 --- /dev/null +++ b/config/hypr/configs/SystemSettings.conf @@ -0,0 +1,124 @@ +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # +# Default settings +# This is where you put your own settings as this will not be touched during update +# if the upgrade.sh is used. + +# refer to Hyprland wiki for more info https://wiki.hyprland.org/Configuring/Variables/ +# NOTE: some settings are in ~/.config/hypr/UserConfigs/UserDecorAnimations.conf + +$scriptsDir = $HOME/.config/hypr/scripts + +dwindle { + pseudotile = true + preserve_split = true + #smart_split = true + special_scale_factor = 0.8 +} + +master { + new_status = master + new_on_top = 1 + mfact = 0.5 +} + +general { + resize_on_border = true + layout = dwindle +} + +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = + kb_rules = + repeat_rate = 50 + repeat_delay = 300 + + sensitivity = 0 #mouse sensitivity + #accel_profile = # flat or adaptive or blank or EMPTY means libinput’s default mode + numlock_by_default = true + left_handed = false + follow_mouse = 1 + float_switch_override_focus = false + + touchpad { + disable_while_typing = true + natural_scroll = true + clickfinger_behavior = false + middle_button_emulation = false + tap-to-click = true + drag_lock = false + } + + # below for devices with touchdevice ie. touchscreen + touchdevice { + enabled = true + } + + # below is for table see link above for proper variables + tablet { + transform = 0 + left_handed = 0 + } +} + + +gestures { + gesture = 3, horizontal, workspace + workspace_swipe_distance = 500 + workspace_swipe_invert = true + workspace_swipe_min_speed_to_force = 30 + workspace_swipe_cancel_ratio = 0.5 + workspace_swipe_create_new = true + workspace_swipe_forever = true + #workspace_swipe_use_r = true #uncomment if wanted a forever create a new workspace with swipe right + + gesture = 4, up, dispatcher, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor * 1.5}')" + gesture = 4, down, dispatcher, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor / 1.5}')" + gesture = 3, up, dispatcher, exec, $scriptsDir/OverviewToggle.sh +} + +misc { + disable_hyprland_logo = true + disable_splash_rendering = true + vfr = true + vrr = 2 + mouse_move_enables_dpms = true + enable_swallow = off + swallow_regex = ^(kitty)$ + focus_on_activate = false + initial_workspace_tracking = 0 + middle_click_paste = false + enable_anr_dialog = true # Application not Responding (ANR) + anr_missed_pings = 15 # ANR Threshold default 1 is too low + allow_session_lock_restore = true # Prevent lockscreen crash when resume from suspend +} + +#opengl { +# nvidia_anti_flicker = true +#} + +binds { + workspace_back_and_forth = true + allow_workspace_cycles = true + pass_mouse_when_bound = false +} + +#Could help when scaling and not pixelating +xwayland { + enabled = true + force_zero_scaling = true +} + +render { + direct_scanout = 0 +} + +cursor { + sync_gsettings_theme = true + no_hardware_cursors = 2 # change to 1 if want to disable + enable_hyprcursor = true + warp_on_change_workspace = 2 + no_warps = true +} diff --git a/config/hypr/configs/WindowRules-config-v3.conf b/config/hypr/configs/WindowRules-config-v3.conf index b54c6a85..c4a8a624 100644 --- a/config/hypr/configs/WindowRules-config-v3.conf +++ b/config/hypr/configs/WindowRules-config-v3.conf @@ -1,53 +1,96 @@ # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # -# Vendor defaults for window rules and layerrules +# For window rules and layerrules # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more -# NOTES: This is only for Hyprland > 0.48 - -# note for ja: This should NOT be implemented on Debian and Ubuntu +# NOTES: This is only for Hyprland > 0.52.1 +# note: This should NOT be implemented on Debian and Ubuntu +# Vendor defaults for window rules and layerrules # windowrule - tags - add apps under appropriate tag to use the same settings -# browser tags - -# notif tags +windowrule = match:class ^([Ff]irefox|org.mozilla.firefox|[Ff]irefox-esr|[Ff]irefox-bin)$, tag +browser +windowrule = match:class ^([Gg]oogle-chrome(-beta|-dev|-unstable)?)$, tag +browser +windowrule = match:class ^(chrome-.+-Default)$ # Chrome PWAs, tag +browser +windowrule = match:class ^([Cc]hromium)$, tag +browser +windowrule = match:class ^([Mm]icrosoft-edge(-stable|-beta|-dev|-unstable))$, tag +browser +windowrule = match:class ^(Brave-browser(-beta|-dev|-unstable)?)$, tag +browser +windowrule = match:class ^([Tt]horium-browser|[Cc]achy-browser)$, tag +browser +windowrule = match:class ^(zen-alpha|zen)$, tag +browser -# KooL settings tag +windowrule = match:class ^(swaync-control-center|swaync-notification-window|swaync-client|class)$, tag +notif -# terminal tags +windowrule = match:title ^(KooL Quick Cheat Sheet)$, tag +KooL_Cheat +windowrule = match:title ^(KooL Hyprland Settings)$, tag +KooL_Settings +windowrule = match:class ^(nwg-displays|nwg-look)$, tag +KooL-Settings -# email tags +windowrule = match:class ^(Alacritty|kitty|kitty-dropterm)$, tag +terminal -# project tags +windowrule = match:class ^([Tt]hunderbird|org.gnome.Evolution)$, tag +email +windowrule = match:class ^(eu.betterbird.Betterbird)$, tag +email -# screenshare tags +windowrule = match:class ^(codium|codium-url-handler|VSCodium)$, tag +projects +windowrule = match:class ^(VSCode|code|code-url-handler)$, tag +projects +windowrule = match:class ^(jetbrains-.+)$ # JetBrains IDEs, tag +projects -# IM tags +windowrule = match:class ^(com.obsproject.Studio)$, tag +screenshare -# game tags +windowrule = match:class ^([Dd]iscord|[Ww]ebCord|[Vv]esktop)$, tag +im +windowrule = match:class ^([Ff]erdium)$, tag +im +windowrule = match:class ^([Ww]hatsapp-for-linux)$, tag +im +windowrule = match:class ^(ZapZap|com.rtosta.zapzap)$, tag +im +windowrule = match:class ^(org.telegram.desktop|io.github.tdesktop_x64.TDesktop)$, tag +im +windowrule = match:class ^(teams-for-linux)$, tag +im +windowrule = match:class ^(im.riot.Riot|Element)$ # Element Matrix client, tag +im -# gamestore tags +windowrule = match:class ^(gamescope)$, tag +games +windowrule = match:class ^(steam_app_\d+)$, tag +games -# file-manager tags +windowrule = match:class ^([Ss]team)$, tag +gamestore +windowrule = match:title ^([Ll]utris)$, tag +gamestore +windowrule = match:class ^(com.heroicgameslauncher.hgl)$, tag +gamestore -# wallpaper tags +windowrule = match:class ^([Tt]hunar|org.gnome.Nautilus|[Pp]cmanfm-qt)$, tag +file-manager +windowrule = match:class ^(app.drey.Warp)$, tag +file-manager -# multimedia tags +windowrule = match:class ^([Ww]aytrogen)$, tag +wallpaper +windowrule = match:class ^([Aa]udacious)$, tag +multimedia +windowrule = match:class ^([Mm]pv|vlc)$, tag +multimedia_video -# multimedia-video tags +windowrule = match:title ^(ROG Control)$, tag +settings +windowrule = match:class ^(wihotspot(-gui)?)$ # wifi hotspot, tag +settings +windowrule = match:class ^([Bb]aobab|org.gnome.[Bb]aobab)$ # Disk usage analyzer, tag +settings +windowrule = match:class ^(gnome-disks|wihotspot(-gui)?)$, tag +settings +windowrule = match:title (Kvantum Manager), tag +settings +windowrule = match:class ^(file-roller|org.gnome.FileRoller)$ # archive manager, tag +settings +windowrule = match:class ^(nm-applet|nm-connection-editor|blueman-manager)$, tag +settings +windowrule = match:class ^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$, tag +settings +windowrule = match:class ^(qt5ct|qt6ct|[Yy]ad)$, tag +settings +windowrule = match:class (xdg-desktop-portal-gtk), tag +settings +windowrule = match:class ^(org.kde.polkit-kde-authentication-agent-1)$, tag +settings +windowrule = match:class ^([Rr]ofi)$, tag +settings -# settings tags +windowrule = match:class ^(gnome-system-monitor|org.gnome.SystemMonitor|io.missioncenter.MissionCenter)$ # system monitor, tag +viewer +windowrule = match:class ^(evince)$ # document viewer, tag +viewer +windowrule = match:class ^(eog|org.gnome.Loupe)$ # image viewer, tag +viewer -# viewer tags +windowrule = match:tag multimedia_video*, noblur +windowrule = match:tag multimedia_video*, opacity 1.0 -# Some special override rules - # POSITION -# windowrule = center,floating:1 # warning, it cause even the menu to float and center. -#windowrule = move 72% 7%,title:^(Firefox)$ +windowrule = match:tag KooL_Cheat*, center +windowrule = match:class ([Tt]hunar) title negative:(.*[Tt]hunar.*), center +windowrule = match:title ^(ROG Control)$, center +windowrule = match:tag KooL-Settings*, center +windowrule = match:title ^(Keybindings)$, center +windowrule = match:class ^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$, center +windowrule = match:class ^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$, center +windowrule = match:class ^([Ff]erdium)$, center +windowrule = match:title ^(Picture-in-Picture)$, move 72% 7% +#windowrule = move 72% 7%,title:^(Firefox)$ # windowrule to avoid idle for fullscreen apps #windowrule = idleinhibit fullscreen, class:^(*)$ #windowrule = idleinhibit fullscreen, title:^(*)$ +windowrule = match:fullscreen 1, idleinhibit fullscreen # windowrule move to workspace #windowrule = workspace 1, tag:email* @@ -63,628 +106,99 @@ #windowrule = workspace 6 silent, class:^(virt-manager)$ #windowrule = workspace 6 silent, class:^(.virt-manager-wrapped)$ #windowrule = workspace 9 silent, tag:multimedia* -# + # FLOAT +windowrule = match:tag KooL_Cheat*, float +windowrule = match:tag wallpaper*, float +windowrule = match:tag settings*, float +windowrule = match:tag viewer*, float +windowrule = match:tag KooL-Settings*, float +windowrule = match:class ([Zz]oom|onedriver|onedriver-launcher)$, float +windowrule = match:class (org.gnome.Calculator) title (Calculator), float +windowrule = match:class ^(mpv|com.github.rafostar.Clapper)$, float +windowrule = match:class ^([Qq]alculate-gtk)$, float #windowrule = float, class:^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$ +windowrule = match:class ^([Ff]erdium)$, float +windowrule = match:title ^(Picture-in-Picture)$, float #windowrule = float, title:^(Firefox)$ # windowrule - ######### float popups and dialogue ####### - - - - +windowrule = match:title ^(Authentication Required)$, float +windowrule = match:title ^(Authentication Required)$, center +windowrule = match:class (codium|codium-url-handler|VSCodium) title negative:(.*codium.*|.*VSCodium.*), float +windowrule = match:class ^(com.heroicgameslauncher.hgl)$ title negative:(Heroic Games Launcher), float +windowrule = match:class ^([Ss]team)$ title negative:^([Ss]team)$, float +windowrule = match:class ([Tt]hunar) title negative:(.*[Tt]hunar.*), float +windowrule = match:title ^(Add Folder to Workspace)$, float +windowrule = match:title ^(Add Folder to Workspace)$, size 70% 60% +windowrule = match:title ^(Add Folder to Workspace)$, center +windowrule = match:title ^(Save As)$, float +windowrule = match:title ^(Save As)$, size 70% 60% +windowrule = match:title ^(Save As)$, center +windowrule = match:initialTitle (Open Files), float +windowrule = match:initialTitle (Open Files), size 70% 60% +windowrule = match:title ^(SDDM Background)$ #KooL's Dots YAD for setting SDDM background, float +windowrule = match:title ^(SDDM Background)$ #KooL's Dots YAD for setting SDDM background, center +windowrule = match:title ^(SDDM Background)$ #KooL's Dots YAD for setting SDDM background, size 16% 12% # END of float popups and dialogue ####### # OPACITY +windowrule = match:tag browser*, opacity 0.99 0.8 +windowrule = match:tag projects*, opacity 0.9 0.8 +windowrule = match:tag im*, opacity 0.94 0.86 +windowrule = match:tag multimedia*, opacity 0.94 0.86 +windowrule = match:tag file-manager*, opacity 0.9 0.8 +windowrule = match:tag terminal*, opacity 0.9 0.7 +windowrule = match:tag settings*, opacity 0.8 0.7 +windowrule = match:tag viewer*, opacity 0.82 0.75 +windowrule = match:tag wallpaper*, opacity 0.9 0.7 +windowrule = match:class ^(gedit|org.gnome.TextEditor|mousepad)$, opacity 0.8 0.7 +windowrule = match:class ^(deluge)$, opacity 0.9 0.8 +windowrule = match:class ^(seahorse)$ # gnome-keyring gui, opacity 0.9 0.8 +windowrule = match:title ^(Picture-in-Picture)$, opacity 0.95 0.75 # SIZE +windowrule = match:tag KooL_Cheat*, size 65% 90% +windowrule = match:tag wallpaper*, size 70% 70% +windowrule = match:tag settings*, size 70% 70% +windowrule = match:class ^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$, size 60% 70% +windowrule = match:class ^([Ff]erdium)$, size 60% 70% -#windowrule = size 25% 25%, title:^(Picture-in-Picture)$ -#windowrule = size 25% 25%, title:^(Firefox)$ +#windowrule = size 25% 25%, title:^(Picture-in-Picture)$ +#windowrule = size 25% 25%, title:^(Firefox)$ # PINNING -#windowrule = pin,title:^(Firefox)$ +windowrule = match:title ^(Picture-in-Picture)$, pin +#windowrule = pin,title:^(Firefox)$ # windowrule - extras +windowrule = match:title ^(Picture-in-Picture)$, keepaspectratio # BLUR & FULLSCREEN +windowrule = match:tag games*, noblur +windowrule = match:tag games*, fullscreen - -#This not gonna take the focus to the window that appears when hovering over some of the parts of the IntelliJ Products - -#This will gonna make the VS Code bluer like other apps +#This not gonna take the focus to the window that appears when hovering over some of the parts of the IntelliJ Products +windowrule = match:class ^(jetbrains-*), noinitialfocus +windowrule = match:title ^(wind.*)$, noinitialfocus #windowrule = bordercolor rgb(EE4B55) rgb(880808), fullscreen:1 #windowrule = bordercolor rgb(282737) rgb(1E1D2D), floating:1 #windowrule = opacity 0.8 0.8, pinned:1 # LAYER RULES +layerrule = blur, rofi +layerrule = ignorezero, rofi +layerrule = blur, notifications +layerrule = ignorezero, notifications +layerrule = blur, quickshell:overview +layerrule = ignorezero, quickshell:overview +layerrule = ignorealpha 0.5, quickshell:overview #layerrule = ignorealpha 0.5, tag:notif* - #layerrule = ignorezero, class:^([Rr]ofi)$ #layerrule = blur, class:^([Rr]ofi)$ #layerrule = unset,class:^([Rr]ofi)$ #layerrule = ignorezero, <rofi> - #layerrule = ignorezero, overview #layerrule = blur, overview -# --- Auto-generated window rules --- -windowrule { - name = windowrule-1 - match:class = ^([Ff]irefox|org.mozilla.firefox|[Ff]irefox-esr|[Ff]irefox-bin)$ - tag = +browser -} - -windowrule { - name = windowrule-2 - match:class = ^([Gg]oogle-chrome(-beta|-dev|-unstable)?)$ - tag = +browser -} - -windowrule { - name = windowrule-3 - match:class = ^(chrome-.+-Default)$ # Chrome PWAs - tag = +browser -} - -windowrule { - name = windowrule-4 - match:class = ^([Cc]hromium)$ - tag = +browser -} - -windowrule { - name = windowrule-5 - match:class = ^([Mm]icrosoft-edge(-stable|-beta|-dev|-unstable))$ - tag = +browser -} - -windowrule { - name = windowrule-6 - match:class = ^(Brave-browser(-beta|-dev|-unstable)?)$ - tag = +browser -} - -windowrule { - name = windowrule-7 - match:class = ^([Tt]horium-browser|[Cc]achy-browser)$ - tag = +browser -} - -windowrule { - name = windowrule-8 - match:class = ^(zen-alpha|zen)$ - tag = +browser -} - -windowrule { - name = windowrule-9 - match:class = ^(swaync-control-center|swaync-notification-window|swaync-client|class)$ - tag = +notif -} - -windowrule { - name = windowrule-10 - match:title = ^(KooL Quick Cheat Sheet)$ - tag = +KooL_Cheat -} - -windowrule { - name = windowrule-11 - match:title = ^(KooL Hyprland Settings)$ - tag = +KooL_Settings -} - -windowrule { - name = windowrule-12 - match:class = ^(nwg-displays|nwg-look)$ - tag = +KooL-Settings -} - -windowrule { - name = windowrule-13 - match:class = ^(Alacritty|kitty|kitty-dropterm)$ - tag = +terminal -} - -windowrule { - name = windowrule-14 - match:class = ^([Tt]hunderbird|org.gnome.Evolution)$ - tag = +email -} - -windowrule { - name = windowrule-15 - match:class = ^(eu.betterbird.Betterbird)$ - tag = +email -} - -windowrule { - name = windowrule-16 - match:class = ^(codium|codium-url-handler|VSCodium)$ - tag = +projects -} - -windowrule { - name = windowrule-17 - match:class = ^(VSCode|code-url-handler)$ - tag = +projects -} - -windowrule { - name = windowrule-18 - match:class = ^(jetbrains-.+)$ # JetBrains IDEs - tag = +projects -} - -windowrule { - name = windowrule-19 - match:class = ^(com.obsproject.Studio)$ - tag = +screenshare -} - -windowrule { - name = windowrule-20 - match:class = ^([Dd]iscord|[Ww]ebCord|[Vv]esktop)$ - tag = +im -} - -windowrule { - name = windowrule-21 - match:class = ^([Ff]erdium)$ - center = on - float = on - size = 60% = 70% - tag = +im -} - -windowrule { - name = windowrule-22 - match:class = ^([Ww]hatsapp-for-linux)$ - tag = +im -} - -windowrule { - name = windowrule-23 - match:class = ^(ZapZap|com.rtosta.zapzap)$ - tag = +im -} - -windowrule { - name = windowrule-24 - match:class = ^(org.telegram.desktop|io.github.tdesktop_x64.TDesktop)$ - tag = +im -} - -windowrule { - name = windowrule-25 - match:class = ^(teams-for-linux)$ - tag = +im -} - -windowrule { - name = windowrule-26 - match:class = ^(im.riot.Riot|Element)$ # Element Matrix client - tag = +im -} - -windowrule { - name = windowrule-27 - match:class = ^(gamescope)$ - tag = +games -} - -windowrule { - name = windowrule-28 - match:class = ^(steam_app_\d+)$ - tag = +games -} - -windowrule { - name = windowrule-29 - match:class = ^([Ss]team)$ - tag = +gamestore -} - -windowrule { - name = windowrule-30 - match:title = ^([Ll]utris)$ - tag = +gamestore -} - -windowrule { - name = windowrule-31 - match:class = ^(com.heroicgameslauncher.hgl)$ - tag = +gamestore -} - -windowrule { - name = windowrule-32 - match:class = ^([Tt]hunar|org.gnome.Nautilus|[Pp]cmanfm-qt)$ - tag = +file-manager -} - -windowrule { - name = windowrule-33 - match:class = ^(app.drey.Warp)$ - tag = +file-manager -} - -windowrule { - name = windowrule-34 - match:class = ^([Ww]aytrogen)$ - tag = +wallpaper -} - -windowrule { - name = windowrule-35 - match:class = ^([Aa]udacious)$ - tag = +multimedia -} - -windowrule { - name = windowrule-36 - match:class = ^([Mm]pv|vlc)$ - tag = +multimedia_video -} - -windowrule { - name = windowrule-37 - match:title = ^(ROG Control)$ - center = on - tag = +settings -} - -windowrule { - name = windowrule-38 - match:class = ^(wihotspot(-gui)?)$ # wifi hotspot - tag = +settings -} - -windowrule { - name = windowrule-39 - match:class = ^([Bb]aobab|org.gnome.[Bb]aobab)$ # Disk usage analyzer - tag = +settings -} - -windowrule { - name = windowrule-40 - match:class = ^(gnome-disks|wihotspot(-gui)?)$ - tag = +settings -} - -windowrule { - name = windowrule-41 - match:title = (Kvantum Manager) - tag = +settings -} - -windowrule { - name = windowrule-42 - match:class = ^(file-roller|org.gnome.FileRoller)$ # archive manager - tag = +settings -} - -windowrule { - name = windowrule-43 - match:class = ^(nm-applet|nm-connection-editor|blueman-manager)$ - tag = +settings -} - -windowrule { - name = windowrule-44 - match:class = ^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$ - center = on - tag = +settings -} - -windowrule { - name = windowrule-45 - match:class = ^(qt5ct|qt6ct|[Yy]ad)$ - tag = +settings -} - -windowrule { - name = windowrule-46 - match:class = (xdg-desktop-portal-gtk) - tag = +settings -} - -windowrule { - name = windowrule-47 - match:class = ^(org.kde.polkit-kde-authentication-agent-1)$ - tag = +settings -} - -windowrule { - name = windowrule-48 - match:class = ^([Rr]ofi)$ - tag = +settings -} - -windowrule { - name = windowrule-49 - match:class = ^(gnome-system-monitor|org.gnome.SystemMonitor|io.missioncenter.MissionCenter)$ # system monitor - tag = +viewer -} - -windowrule { - name = windowrule-50 - match:class = ^(evince)$ # document viewer - tag = +viewer -} - -windowrule { - name = windowrule-51 - match:class = ^(eog|org.gnome.Loupe)$ # image viewer - tag = +viewer -} - -windowrule { - name = windowrule-52 - match:tag = multimedia_video* - no_blur = on - opacity = 1.0 -} - -windowrule { - name = windowrule-53 - match:tag = KooL_Cheat* - center = on - float = on - size = 65% = 90% -} - -windowrule { - name = windowrule-54 - match:class = ([Tt]hunar) - match:title = negative:(.*[Tt]hunar.*) - center = on - float = on -} - -windowrule { - name = windowrule-55 - match:tag = KooL-Settings* - center = on - float = on -} - -windowrule { - name = windowrule-56 - match:title = ^(Keybindings)$ - center = on -} - -windowrule { - name = windowrule-57 - match:class = ^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$ - center = on - size = 60% = 70% -} - -windowrule { - name = windowrule-58 - match:title = ^(Picture-in-Picture)$ - float = on - move = 72% = 7% - opacity = 0.95 = 0.75 - pin = 0 -} - -windowrule { - name = windowrule-59 - match:fullscreen = 1 - idle_inhibit = fullscreen -} - -windowrule { - name = windowrule-60 - match:tag = wallpaper* - float = on - opacity = 0.9 = 0.7 - size = 70% = 70% -} - -windowrule { - name = windowrule-61 - match:tag = settings* - float = on - opacity = 0.8 = 0.7 - size = 70% = 70% -} - -windowrule { - name = windowrule-62 - match:tag = viewer* - float = on - opacity = 0.82 = 0.75 -} - -windowrule { - name = windowrule-63 - match:class = ([Zz]oom|onedriver|onedriver-launcher)$ - float = on -} - -windowrule { - name = windowrule-64 - match:class = (org.gnome.Calculator) - match:title = (Calculator) - float = on -} - -windowrule { - name = windowrule-65 - match:class = ^(mpv|com.github.rafostar.Clapper)$ - float = on -} - -windowrule { - name = windowrule-66 - match:class = ^([Qq]alculate-gtk)$ - float = on -} - -windowrule { - name = windowrule-67 - match:title = ^(Authentication Required)$ - center = on - float = on -} - -windowrule { - name = windowrule-68 - match:class = (codium|codium-url-handler|VSCodium) - match:title = negative:(.*codium.*|.*VSCodium.*) - float = on -} - -windowrule { - name = windowrule-69 - match:class = ^(com.heroicgameslauncher.hgl)$ - match:title = negative:(Heroic Games Launcher) - float = on -} - -windowrule { - name = windowrule-70 - match:class = ^([Ss]team)$ - match:title = negative:^([Ss]team)$ - float = on -} - -windowrule { - name = windowrule-71 - match:title = ^(Add Folder to Workspace)$ - center = on - float = on - size = 70% = 60% -} - -windowrule { - name = windowrule-72 - match:title = ^(Save As)$ - center = on - float = on - size = 70% = 60% -} - -windowrule { - name = windowrule-73 - match:initial_title = (Open Files) - float = on - size = 70% = 60% -} - -windowrule { - name = windowrule-74 - match:title = ^(SDDM Background)$ #KooL's Dots YAD for setting SDDM background - center = on - float = on - size = 16% = 12% -} - -windowrule { - name = windowrule-75 - match:tag = browser* - opacity = 0.99 = 0.8 -} - -windowrule { - name = windowrule-76 - match:tag = projects* - opacity = 0.9 = 0.8 -} - -windowrule { - name = windowrule-77 - match:tag = im* - opacity = 0.94 = 0.86 -} - -windowrule { - name = windowrule-78 - match:tag = multimedia* - opacity = 0.94 = 0.86 -} - -windowrule { - name = windowrule-79 - match:tag = file-manager* - opacity = 0.9 = 0.8 -} - -windowrule { - name = windowrule-80 - match:tag = terminal* - opacity = 0.9 = 0.7 -} - -windowrule { - name = windowrule-81 - match:class = ^(gedit|org.gnome.TextEditor|mousepad)$ - opacity = 0.8 = 0.7 -} - -windowrule { - name = windowrule-82 - match:class = ^(deluge)$ - opacity = 0.9 = 0.8 -} - -windowrule { - name = windowrule-83 - match:class = ^(seahorse)$ # gnome-keyring gui - opacity = 0.9 = 0.8 -} - -windowrule { - name = windowrule-84 - match:class = ^(code)$ - opacity = 0.8 - opacity = 0.9 -} - -windowrule { - name = windowrule-85 - match:tag = games* - fullscreen = 0 - no_blur = on -} - -windowrule { - name = windowrule-86 - match:class = ^(jetbrains-*) - no_initial_focus = on -} - -windowrule { - name = windowrule-87 - match:title = ^(wind.*)$ - no_initial_focus = on -} - -# --- Auto-generated layer rules --- -layerrule { - name = layerrule-1 - match:namespace = rofi - blur = on - ignore_alpha = 0 -} - -layerrule { - name = layerrule-2 - match:namespace = notifications - blur = on - ignore_alpha = 0 -} - -layerrule { - name = layerrule-3 - match:namespace = quickshell:overview - blur = on - ignore_alpha = 0 - ignore_alpha = 0.5 -} diff --git a/config/hypr/configs/WindowRules.conf b/config/hypr/configs/WindowRules.conf index f02c5d29..d1fb9315 100644 --- a/config/hypr/configs/WindowRules.conf +++ b/config/hypr/configs/WindowRules.conf @@ -34,7 +34,7 @@ windowrule = tag +email, class:^(eu.betterbird.Betterbird)$ # project tags windowrule = tag +projects, class:^(codium|codium-url-handler|VSCodium)$ -windowrule = tag +projects, class:^(VSCode|code-url-handler)$ +windowrule = tag +projects, class:^(VSCode|code|code-url-handler)$ windowrule = tag +projects, class:^(jetbrains-.+)$ # JetBrains IDEs # screenshare tags @@ -180,7 +180,6 @@ windowrule = opacity 0.8 0.7, class:^(gedit|org.gnome.TextEditor|mousepad)$ windowrule = opacity 0.9 0.8, class:^(deluge)$ windowrule = opacity 0.9 0.8, class:^(seahorse)$ # gnome-keyring gui windowrule = opacity 0.95 0.75, title:^(Picture-in-Picture)$ -windowrule = opacity 0.9,class:^(code)$ # SIZE windowrule = size 65% 90%, tag:KooL_Cheat* @@ -208,9 +207,6 @@ windowrule = fullscreen, tag:games* windowrule = noinitialfocus, class:^(jetbrains-*) windowrule = noinitialfocus, title:^(wind.*)$ -#This will gonna make the VS Code bluer like other apps -windowrule = opacity 0.8,class:^(code)$ - #windowrule = bordercolor rgb(EE4B55) rgb(880808), fullscreen:1 #windowrule = bordercolor rgb(282737) rgb(1E1D2D), floating:1 #windowrule = opacity 0.8 0.8, pinned:1 diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index f509a76d..7119b3df 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -1,5 +1,5 @@ # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # -# always refer to Hyprland wiki +# Always refer to Hyprland wiki # https://wiki.hyprland.org/ # Initial boot script enable to apply initial wallpapers, theming, new settings etc. @@ -7,25 +7,29 @@ # as long as the referrence file is present, this initial-boot.sh will not execute exec-once = $HOME/.config/hypr/initial-boot.sh -# Sourcing external config files +### Sourcing external config files ### $configs = $HOME/.config/hypr/configs # Default Configs directory path -# ## This is where you want to start tinkering $UserConfigs = $HOME/.config/hypr/UserConfigs # User Configs directory path source=$configs/Keybinds.conf # Pre-configured keybinds -# Load vendor defaults, then user additions/overrides -source= $configs/Startup_Apps.conf +# Load defaults, then user additions/overrides +source= $configs/Startup_Apps.conf source= $UserConfigs/Startup_Apps.conf -source= $UserConfigs/ENVariables.conf # Environment variables to load +source= $configs/ENVariables.conf # Environment variables (defaults) +source= $UserConfigs/ENVariables.conf # Environment variables (user) -source= $UserConfigs/Laptops.conf # For laptop related -source= $UserConfigs/LaptopDisplay.conf # Laptop display related. You need to read the comment on this file +# For laptop related +source= $configs/Laptops.conf +source= $UserConfigs/Laptops.conf +source= $UserConfigs/LaptopDisplay.conf -# Load vendor defaults, then user additions -source= $configs/WindowRules.conf # all about Hyprland Window Rules and Layer Rules (defaults) -source= $UserConfigs/WindowRules.conf # Window Rules and Layer Rules user configs +# Load defaults, then user additions +source= $configs/WindowRules.conf # Window Rules and Layer Rules (defaults) +source= $UserConfigs/WindowRules.conf # Window Rules and Layer Rules (user) + +source= $configs/SystemSettings.conf # Default config for hypr source= $UserConfigs/UserDecorations.conf # Decorations config file source= $UserConfigs/UserAnimations.conf # Animation config file diff --git a/config/hypr/scripts/KeyBinds.sh b/config/hypr/scripts/KeyBinds.sh index 46953cc5..4158b762 100755 --- a/config/hypr/scripts/KeyBinds.sh +++ b/config/hypr/scripts/KeyBinds.sh @@ -21,9 +21,87 @@ msg='☣️ NOTE ☣️: Clicking with Mouse or Pressing ENTER will have NO func files=("$keybinds_conf" "$user_keybinds_conf") [[ -f "$laptop_conf" ]] && files+=("$laptop_conf") -raw_keybinds=$(cat "${files[@]}" 2>/dev/null \ - | grep -E '^[[:space:]]*bind' \ - | sed -E 's/[[:space:]]+#.*$//') +# Parse binds/unbinds from files, detect overrides, and keep unique effective binds +declare -A binding_map # combo -> bind line (effective) +declare -A source_map # combo -> source file +declare -A user_bind_map # combo -> user bind line +declare -A unbound_user # combo -> 1 if explicitly unbound in user file +declare -A seen_any_bind # combo -> 1 if any bind seen (for iteration) +declare -A default_seen # combo -> 1 if default bind exists +declare -a missing_unbind_suggestions_arr + +normalize_combo() { echo "$1" | sed -E 's/[[:space:]]//g'; } + +extract_combo() { + # arg: a bind/unbind line; returns "mods,key" via echo + local s="$1" + s="$(echo "$s" | sed -E 's/[[:space:]]+#.*$//')" + if [[ "$s" =~ = ]]; then + local rhs="${s#*=}" + local mods="$(echo "$rhs" | awk -F',' '{gsub(/^[ \t]+|[ \t]+$/,"",$1); print $1}')" + local key="$(echo "$rhs" | awk -F',' '{gsub(/^[ \t]+|[ \t]+$/,"",$2); print $2}')" + echo "${mods},${key}" + fi +} + +for file in "${files[@]}"; do + [[ ! -f "$file" ]] && continue + while IFS= read -r line; do + [[ -z "$line" || "$line" =~ ^[[:space:]]*# ]] && continue + + if [[ "$line" =~ ^[[:space:]]*bind[a-z]*[[:space:]]*= ]]; then + combo_raw="$(extract_combo "$line")" + [[ -z "$combo_raw" ]] && continue + combo="$(normalize_combo "$combo_raw")" + seen_any_bind["$combo"]=1 + + if [[ "$file" != "$user_keybinds_conf" ]]; then + default_seen["$combo"]=1 + fi + + # prefer user bind, else first seen + if [[ -z "${source_map[$combo]}" ]]; then + binding_map["$combo"]="$line" + source_map["$combo"]="$file" + fi + if [[ "$file" == "$user_keybinds_conf" ]]; then + user_bind_map["$combo"]="$line" + binding_map["$combo"]="$line" + source_map["$combo"]="$file" + fi + + elif [[ "$line" =~ ^[[:space:]]*unbind[[:space:]]*= ]]; then + combo_raw="$(extract_combo "$line")" + [[ -z "$combo_raw" ]] && continue + combo="$(normalize_combo "$combo_raw")" + if [[ "$file" == "$user_keybinds_conf" ]]; then + unbound_user["$combo"]=1 + fi + fi + done < "$file" +done + +# Build raw_keybinds for display and collect missing unbind suggestions +raw_keybinds="" +for combo in "${!seen_any_bind[@]}"; do + eff_line="${binding_map[$combo]}" + src="${source_map[$combo]}" + [[ -z "$eff_line" ]] && continue + raw_keybinds+="$eff_line"$'\n' + + # If user overrides a default but didn't unbind in user file, suggest unbind + if [[ "$src" == "$user_keybinds_conf" && -n "${default_seen[$combo]}" && -z "${unbound_user[$combo]}" ]]; then + suggest="$(echo "$eff_line" | sed -E 's/^[[:space:]]*bind[a-z]*/unbind/')" + missing_unbind_suggestions_arr+=("$suggest") + fi +done + +# If there are missing unbinds, write suggestions to a temp file and note in message +if (( ${#missing_unbind_suggestions_arr[@]} > 0 )); then + suggestions_file="$(mktemp -t hypr-unbind-suggestions.XXXX.conf)" + printf '%s\n' "${missing_unbind_suggestions_arr[@]}" > "$suggestions_file" + msg="$msg | Overrides missing unbind: ${#missing_unbind_suggestions_arr[@]} (suggestions: $suggestions_file)" +fi # check for any keybinds to display if [[ -z "$raw_keybinds" ]]; then @@ -31,7 +109,7 @@ if [[ -z "$raw_keybinds" ]]; then exit 1 fi -# transform into a readable list: MODS+KEY — DESCRIPTION — DISPATCHER [PARAMS] +# transform into a readable list: MODS+KEY — DESCRIPTION (for bindd) or DISPATCHER [PARAMS] (for bind) display_keybinds=$(echo "$raw_keybinds" | awk -F'=' ' function trim(s){ gsub(/^[ \t]+|[ \t]+$/,"",s); return s } /^[[:space:]]*bind/ { @@ -60,13 +138,8 @@ display_keybinds=$(echo "$raw_keybinds" | awk -F'=' ' combo = (mods && key) ? mods "+" key : (key?key:mods); - if (desc != "") { - if (dispatcher != "" && params != "") - print combo, " — ", desc, " — ", dispatcher, " ", params; - else if (dispatcher != "") - print combo, " — ", desc, " — ", dispatcher; - else - print combo, " — ", desc; + if (hasdesc && desc != "") { + print combo, " — ", desc; } else { if (dispatcher != "" && params != "") print combo, " — ", dispatcher, " ", params; diff --git a/config/hypr/scripts/Kool_Quick_Settings.sh b/config/hypr/scripts/Kool_Quick_Settings.sh index 16742492..8ab71ba2 100755 --- a/config/hypr/scripts/Kool_Quick_Settings.sh +++ b/config/hypr/scripts/Kool_Quick_Settings.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Rofi menu for KooL Hyprland Quick Settings (SUPER SHIFT E) +# Updated for UserConfigs/configs separation # Modify this config file for default terminal and EDITOR config_file="$HOME/.config/hypr/UserConfigs/01-UserDefaults.conf" @@ -19,19 +20,30 @@ iDIR="$HOME/.config/swaync/images" scriptsDir="$HOME/.config/hypr/scripts" UserScripts="$HOME/.config/hypr/UserScripts" +# Function to show info notification +show_info() { + notify-send -i "$iDIR/info.png" "Info" "$1" +} + # Function to display the menu options without numbers menu() { cat <<EOF -view/edit User Defaults -view/edit ENV variables -view/edit Window Rules -view/edit User Keybinds -view/edit User Settings -view/edit Startup Apps -view/edit Decorations -view/edit Animations -view/edit Laptop Keybinds -view/edit Default Keybinds +--- USER CUSTOMIZATIONS --- +Edit User Defaults +Edit User Keybinds +Edit User ENV variables +Edit User Startup Apps (overlay) +Edit User Window Rules (overlay) +Edit User Settings +Edit User Decorations +Edit User Animations +Edit User Laptop Settings +--- SYSTEM DEFAULTS --- +Edit System Default Keybinds +Edit System Default Startup Apps +Edit System Default Window Rules +Edit System Default Settings +--- UTILITIES --- Choose Kitty Terminal Theme Configure Monitors (nwg-displays) Configure Workspace Rules (nwg-displays) @@ -53,16 +65,19 @@ main() { # Map choices to corresponding files case "$choice" in - "view/edit User Defaults") file="$UserConfigs/01-UserDefaults.conf" ;; - "view/edit ENV variables") file="$UserConfigs/ENVariables.conf" ;; - "view/edit Window Rules") file="$configs/WindowRules.conf" ;; - "view/edit User Keybinds") file="$UserConfigs/UserKeybinds.conf" ;; - "view/edit User Settings") file="$UserConfigs/UserSettings.conf" ;; - "view/edit Startup Apps") file="$configs/Startup_Apps.conf" ;; - "view/edit Decorations") file="$UserConfigs/UserDecorations.conf" ;; - "view/edit Animations") file="$UserConfigs/UserAnimations.conf" ;; - "view/edit Laptop Keybinds") file="$UserConfigs/Laptops.conf" ;; - "view/edit Default Keybinds") file="$configs/Keybinds.conf" ;; + "Edit User Defaults") file="$UserConfigs/01-UserDefaults.conf" ;; + "Edit User ENV variables") file="$UserConfigs/ENVariables.conf" ;; + "Edit User Keybinds") file="$UserConfigs/UserKeybinds.conf" ;; + "Edit User Startup Apps (overlay)") file="$UserConfigs/Startup_Apps.conf" ;; + "Edit User Window Rules (overlay)") file="$UserConfigs/WindowRules.conf" ;; + "Edit User Settings") file="$configs/SystemSettings.conf"; show_info "Editing default settings. Copy to UserConfigs/UserSettings.conf to override." ;; + "Edit User Decorations") file="$UserConfigs/UserDecorations.conf" ;; + "Edit User Animations") file="$UserConfigs/UserAnimations.conf" ;; + "Edit User Laptop Settings") file="$UserConfigs/Laptops.conf" ;; + "Edit System Default Keybinds") file="$configs/Keybinds.conf" ;; + "Edit System Default Startup Apps") file="$configs/Startup_Apps.conf" ;; + "Edit System Default Window Rules") file="$configs/WindowRules.conf" ;; + "Edit System Default Settings") file="$configs/SystemSettings.conf" ;; "Choose Kitty Terminal Theme") $scriptsDir/Kitty_themes.sh ;; "Configure Monitors (nwg-displays)") if ! command -v nwg-displays &>/dev/null; then @@ -114,4 +129,4 @@ if pidof rofi > /dev/null; then pkill rofi fi -main
\ No newline at end of file +main diff --git a/config/hypr/scripts/OverviewToggle.sh b/config/hypr/scripts/OverviewToggle.sh index 2737234c..8d4b285f 100755 --- a/config/hypr/scripts/OverviewToggle.sh +++ b/config/hypr/scripts/OverviewToggle.sh @@ -4,20 +4,18 @@ set -euo pipefail -# 1) Try Quickshell via Hyprland global dispatch (works if QS is running and listening) -# Only attempt this if a Quickshell process is running; otherwise Hyprland will -# still return success for the dispatch and we'll never fall back to AGS. +# 1) Try Quickshell via IPC (works if QS is running and listening) if pgrep -x quickshell >/dev/null 2>&1; then - if hyprctl dispatch global quickshell:overviewToggle >/dev/null 2>&1; then + if qs ipc -c overview call overview toggle >/dev/null 2>&1; then exit 0 fi fi # If QS isn't running, but the CLI exists, try starting it and retry once if command -v qs >/dev/null 2>&1; then - qs >/dev/null 2>&1 & + qs -c overview >/dev/null 2>&1 & sleep 0.6 - if hyprctl dispatch global quickshell:overviewToggle >/dev/null 2>&1; then + if qs ipc -c overview call overview toggle >/dev/null 2>&1; then exit 0 fi fi diff --git a/config/hypr/scripts/UserConfigsSwitcher.sh b/config/hypr/scripts/UserConfigsSwitcher.sh new file mode 100755 index 00000000..ad1d4e63 --- /dev/null +++ b/config/hypr/scripts/UserConfigsSwitcher.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Script to manage UserConfigs and UserConfigsBak + +HYPR_CONFIG_DIR="$HOME/.config/hypr" +USER_CONFIGS="$HYPR_CONFIG_DIR/UserConfigs" +USER_CONFIGS_BAK="$HYPR_CONFIG_DIR/UserConfigsBak" + +if [ -d "$USER_CONFIGS" ] && [ ! -d "$USER_CONFIGS_BAK" ]; then + echo "Moving UserConfigs to UserConfigsBak..." + mv "$USER_CONFIGS" "$USER_CONFIGS_BAK" + echo "Done. Your UserConfigs are now in UserConfigsBak." +elif [ ! -d "$USER_CONFIGS" ] && [ -d "$USER_CONFIGS_BAK" ]; then + echo "Moving UserConfigsBak to UserConfigs..." + mv "$USER_CONFIGS_BAK" "$USER_CONFIGS" + echo "Done. Your backup has been restored to UserConfigs." +elif [ -d "$USER_CONFIGS" ] && [ -d "$USER_CONFIGS_BAK" ]; then + echo "Both UserConfigs and UserConfigsBak exist." + echo "Please choose what to do:" + PS3="Enter your choice: " + select option in "Backup current UserConfigs (move to UserConfigsBak)" "Restore backup (move UserConfigsBak to UserConfigs)" "Swap them" "Do nothing"; do + case $REPLY in + 1) + echo "Backing up UserConfigs..." + rm -rf "$USER_CONFIGS_BAK" + mv "$USER_CONFIGS" "$USER_CONFIGS_BAK" + echo "Done. UserConfigs moved to UserConfigsBak." + break + ;; + 2) + echo "Restoring backup..." + rm -rf "$USER_CONFIGS" + mv "$USER_CONFIGS_BAK" "$USER_CONFIGS" + echo "Done. UserConfigsBak moved to UserConfigs." + break + ;; + 3) + echo "Swapping..." + mv "$USER_CONFIGS" "$HYPR_CONFIG_DIR/UserConfigs.tmp" + mv "$USER_CONFIGS_BAK" "$USER_CONFIGS" + mv "$HYPR_CONFIG_DIR/UserConfigs.tmp" "$USER_CONFIGS_BAK" + echo "Done. UserConfigs and UserConfigsBak have been swapped." + break + ;; + 4) + echo "No changes made." + break + ;; + *) + echo "Invalid option. Please try again." + ;; + esac + done +else + echo "Neither UserConfigs nor UserConfigsBak directory found. Nothing to do." +fi diff --git a/config/quickshell/overview/README.md b/config/quickshell/overview/README.md new file mode 100644 index 00000000..c32e7ac5 --- /dev/null +++ b/config/quickshell/overview/README.md @@ -0,0 +1,214 @@ +# Quickshell Overview for Hyprland + +<div align="center"> + +A standalone workspace overview module for Hyprland using Quickshell - shows all workspaces with live window previews, drag-and-drop support, and Super+Tab keybind. + + + + + + +</div> + +--- + +## 📸 Preview + + + +https://github.com/user-attachments/assets/79ceb141-6b9e-4956-8e09-aaf72b66550c + +> *Workspace overview showing live window previews with drag-and-drop support* + +--- + +## ✨ Features + +- 🖼️ Visual workspace overview showing all workspaces and windows +- 🎯 Click windows to focus them +- 🖱️ Middle-click windows to close them +- 🔄 Drag and drop windows between workspaces +- ⌨️ Keyboard navigation (Arrow keys to switch workspaces, Escape/Enter to close) +- 💡 Hover tooltips showing window information +- 🎨 Material Design 3 theming +- ⚡ Smooth animations and transitions + +## 📦 Installation + +### Prerequisites + +- **Hyprland** compositor +- **Quickshell** ([installation guide](https://quickshell.org/docs/v0.1.0/guide/install-setup/)) +- **Qt 6** with modules: QtQuick, QtQuick.Controls, Qt5Compat.GraphicalEffects + +### Setup + +1. **Clone this repository** to your Quickshell config directory: + ```bash + git clone https://github.com/Shanu-Kumawat/quickshell-overview ~/.config/quickshell/overview + ``` + +2. **Add keybind** to your Hyprland config (`~/.config/hypr/hyprland.conf`): + ```conf + bind = Super, TAB, exec, qs ipc -c overview call overview toggle + ``` + +3. **Auto-start** the overview (add to Hyprland config): + ```conf + exec-once = qs -c overview + ``` + +4. **Reload Hyprland**: + ```bash + hyprctl reload + ``` + +### Manual Start (if needed) + +```bash +qs -c overview & +``` + +## 🎮 Usage + +| Action | Description | +|--------|-------------| +| **Super + Tab** | Toggle the overview | +| **Left/Right Arrow Keys** | Navigate between workspaces horizontally | +| **Up/Down Arrow Keys** | Navigate between workspace rows | +| **Escape / Enter** | Close the overview | +| **Click workspace** | Switch to that workspace | +| **Click window** | Focus that window | +| **Middle-click window** | Close that window | +| **Drag window** | Move window to different workspace | + +--- + +## ⚙️ Configuration + +> **⚠️ Want to change the size, position, or number of workspaces?** +> Edit `~/.config/quickshell/overview/common/Config.qml` - it's all there! + +### Workspace Grid + +Edit `~/.config/quickshell/overview/common/Config.qml`: + +```qml +property QtObject overview: QtObject { + property int rows: 2 // Number of workspace rows + property int columns: 5 // Number of workspace columns (10 total workspaces) + property real scale: 0.16 // Overview scale factor (0.1-0.3, smaller = more compact) + property bool enable: true +} +``` + +**Common adjustments:** +- **Too small?** Increase `scale` (try 0.20 or 0.25) +- **Too big?** Decrease `scale` (try 0.12 or 0.14) +- **More workspaces?** Change `rows` and `columns` (e.g., 3 rows × 4 columns = 12 workspaces) + +### Position + +Edit `~/.config/quickshell/overview/modules/overview/Overview.qml` (line ~111): + +```qml +anchors { + horizontalCenter: parent.horizontalCenter + top: parent.top + topMargin: 100 // Change this value to move up/down +} +``` + +### Theme & Colors + +Edit `~/.config/quickshell/overview/common/Appearance.qml` to customize: +- Colors (m3colors and colors objects) +- Font families and sizes +- Animation curves and durations +- Border radius values + +--- + +## 📋 Requirements + +- **Hyprland** compositor (tested on latest versions) +- **Quickshell** (Qt6-based shell framework) +- **Qt 6** with the following modules: + - QtQuick + - QtQuick.Controls + - QtQuick.Layouts + - Qt5Compat.GraphicalEffects + - Quickshell.Wayland + - Quickshell.Hyprland + +## 🚫 Removed Features (from original illogical-impulse) + +The following features were removed to make it standalone: + +- App search functionality +- Emoji picker +- Clipboard history integration +- Search widget +- Integration with the full illogical-impulse shell ecosystem + +## 📁 File Structure + +``` +~/.config/quickshell/overview/ +├── shell.qml # Main entry point +├── README.md # This file +├── hyprland-config.conf # Configuration reference +├── common/ +│ ├── Appearance.qml # Theme and styling +│ ├── Config.qml # Configuration options +│ ├── functions/ +│ │ └── ColorUtils.qml # Color manipulation utilities +│ └── widgets/ +│ ├── StyledText.qml # Styled text component +│ ├── StyledRectangularShadow.qml +│ ├── StyledToolTip.qml +│ └── StyledToolTipContent.qml +├── services/ +│ ├── GlobalStates.qml # Global state management +│ └── HyprlandData.qml # Hyprland data provider +└── modules/ + └── overview/ + ├── Overview.qml # Main overview component + ├── OverviewWidget.qml # Workspace grid widget + └── OverviewWindow.qml # Individual window preview +``` + +## 🎯 IPC Commands + +```bash +# Toggle overview +qs ipc -c overview call overview toggle + +# Open overview +qs ipc -c overview call overview open + +# Close overview +qs ipc -c overview call overview close +``` + +## 🐛 Known Issues + +- Window icons may fallback to generic icon if app class name doesn't match icon theme +- Potential crashes during rapid window state changes due to Wayland screencopy buffer management + +## Credits + +Extracted from the overview feature in [illogical-impulse](https://github.com/end-4/dots-hyprland) by [end-4](https://github.com/end-4). + +Adapted as a standalone component for Hyprland + Quickshell users who want just the overview functionality. + +--- + +<div align="center"> + +**Note:** Maintenance will be limited due to time constraints, but **PRs and code improvements are welcome!** Feel free to contribute or fork for your own needs. + +Made with ❤️ for the Hyprland community + +</div> diff --git a/config/quickshell/overview/assets/image.png b/config/quickshell/overview/assets/image.png Binary files differnew file mode 100644 index 00000000..91db17cb --- /dev/null +++ b/config/quickshell/overview/assets/image.png diff --git a/config/quickshell/overview/common/Appearance.qml b/config/quickshell/overview/common/Appearance.qml new file mode 100644 index 00000000..79a30b44 --- /dev/null +++ b/config/quickshell/overview/common/Appearance.qml @@ -0,0 +1,148 @@ +pragma Singleton +pragma ComponentBehavior: Bound + +import QtQuick +import Quickshell +import "functions" + +Singleton { + id: root + property QtObject m3colors + property QtObject animation + property QtObject animationCurves + property QtObject colors + property QtObject rounding + property QtObject font + property QtObject sizes + + m3colors: QtObject { + property bool darkmode: true + property color m3primary: "#E5B6F2" + property color m3onPrimary: "#452152" + property color m3primaryContainer: "#5D386A" + property color m3onPrimaryContainer: "#F9D8FF" + property color m3secondary: "#D5C0D7" + property color m3onSecondary: "#392C3D" + property color m3secondaryContainer: "#534457" + property color m3onSecondaryContainer: "#F2DCF3" + property color m3background: "#161217" + property color m3onBackground: "#EAE0E7" + property color m3surface: "#161217" + property color m3surfaceContainerLow: "#1F1A1F" + property color m3surfaceContainer: "#231E23" + property color m3surfaceContainerHigh: "#2D282E" + property color m3surfaceContainerHighest: "#383339" + property color m3onSurface: "#EAE0E7" + property color m3surfaceVariant: "#4C444D" + property color m3onSurfaceVariant: "#CFC3CD" + property color m3inverseSurface: "#EAE0E7" + property color m3inverseOnSurface: "#342F34" + property color m3outline: "#988E97" + property color m3outlineVariant: "#4C444D" + property color m3shadow: "#000000" + } + + colors: QtObject { + property color colSubtext: m3colors.m3outline + property color colLayer0: m3colors.m3background + property color colOnLayer0: m3colors.m3onBackground + property color colLayer0Border: ColorUtils.mix(root.m3colors.m3outlineVariant, colLayer0, 0.4) + property color colLayer1: m3colors.m3surfaceContainerLow + property color colOnLayer1: m3colors.m3onSurfaceVariant + property color colOnLayer1Inactive: ColorUtils.mix(colOnLayer1, colLayer1, 0.45) + property color colLayer1Hover: ColorUtils.mix(colLayer1, colOnLayer1, 0.92) + property color colLayer1Active: ColorUtils.mix(colLayer1, colOnLayer1, 0.85) + property color colLayer2: m3colors.m3surfaceContainer + property color colOnLayer2: m3colors.m3onSurface + property color colLayer2Hover: ColorUtils.mix(colLayer2, colOnLayer2, 0.90) + property color colLayer2Active: ColorUtils.mix(colLayer2, colOnLayer2, 0.80) + property color colPrimary: m3colors.m3primary + property color colOnPrimary: m3colors.m3onPrimary + property color colSecondary: m3colors.m3secondary + property color colSecondaryContainer: m3colors.m3secondaryContainer + property color colOnSecondaryContainer: m3colors.m3onSecondaryContainer + property color colTooltip: m3colors.m3inverseSurface + property color colOnTooltip: m3colors.m3inverseOnSurface + property color colShadow: ColorUtils.transparentize(m3colors.m3shadow, 0.7) + property color colOutline: m3colors.m3outline + } + + rounding: QtObject { + property int unsharpen: 2 + property int verysmall: 8 + property int small: 12 + property int normal: 17 + property int large: 23 + property int full: 9999 + property int screenRounding: large + property int windowRounding: 18 + } + + font: QtObject { + property QtObject family: QtObject { + property string main: "sans-serif" + property string title: "sans-serif" + property string expressive: "sans-serif" + } + property QtObject pixelSize: QtObject { + property int smaller: 12 + property int small: 15 + property int normal: 16 + property int larger: 19 + property int huge: 22 + } + } + + animationCurves: QtObject { + readonly property list<real> expressiveDefaultSpatial: [0.38, 1.21, 0.22, 1.00, 1, 1] + readonly property list<real> expressiveEffects: [0.34, 0.80, 0.34, 1.00, 1, 1] + readonly property list<real> emphasizedDecel: [0.05, 0.7, 0.1, 1, 1, 1] + readonly property real expressiveDefaultSpatialDuration: 500 + readonly property real expressiveEffectsDuration: 200 + } + + animation: QtObject { + property QtObject elementMove: QtObject { + property int duration: animationCurves.expressiveDefaultSpatialDuration + property int type: Easing.BezierSpline + property list<real> bezierCurve: animationCurves.expressiveDefaultSpatial + property Component numberAnimation: Component { + NumberAnimation { + duration: root.animation.elementMove.duration + easing.type: root.animation.elementMove.type + easing.bezierCurve: root.animation.elementMove.bezierCurve + } + } + } + + property QtObject elementMoveEnter: QtObject { + property int duration: 400 + property int type: Easing.BezierSpline + property list<real> bezierCurve: animationCurves.emphasizedDecel + property Component numberAnimation: Component { + NumberAnimation { + duration: root.animation.elementMoveEnter.duration + easing.type: root.animation.elementMoveEnter.type + easing.bezierCurve: root.animation.elementMoveEnter.bezierCurve + } + } + } + + property QtObject elementMoveFast: QtObject { + property int duration: animationCurves.expressiveEffectsDuration + property int type: Easing.BezierSpline + property list<real> bezierCurve: animationCurves.expressiveEffects + property Component numberAnimation: Component { + NumberAnimation { + duration: root.animation.elementMoveFast.duration + easing.type: root.animation.elementMoveFast.type + easing.bezierCurve: root.animation.elementMoveFast.bezierCurve + } + } + } + } + + sizes: QtObject { + property real elevationMargin: 10 + } +} diff --git a/config/quickshell/overview/common/Config.qml b/config/quickshell/overview/common/Config.qml new file mode 100644 index 00000000..48601dd3 --- /dev/null +++ b/config/quickshell/overview/common/Config.qml @@ -0,0 +1,22 @@ +pragma Singleton +pragma ComponentBehavior: Bound + +import QtQuick +import Quickshell + +Singleton { + id: root + + property QtObject options: QtObject { + property QtObject overview: QtObject { + property int rows: 2 + property int columns: 5 + property real scale: 0.16 + property bool enable: true + } + + property QtObject hacks: QtObject { + property int arbitraryRaceConditionDelay: 150 + } + } +} diff --git a/config/quickshell/overview/common/functions/ColorUtils.qml b/config/quickshell/overview/common/functions/ColorUtils.qml new file mode 100644 index 00000000..6162df18 --- /dev/null +++ b/config/quickshell/overview/common/functions/ColorUtils.qml @@ -0,0 +1,68 @@ +pragma Singleton +import Quickshell + +Singleton { + id: root + + function colorWithHueOf(color1, color2) { + var c1 = Qt.color(color1); + var c2 = Qt.color(color2); + var hue = c2.hsvHue; + var sat = c1.hsvSaturation; + var val = c1.hsvValue; + var alpha = c1.a; + return Qt.hsva(hue, sat, val, alpha); + } + + function colorWithSaturationOf(color1, color2) { + var c1 = Qt.color(color1); + var c2 = Qt.color(color2); + var hue = c1.hsvHue; + var sat = c2.hsvSaturation; + var val = c1.hsvValue; + var alpha = c1.a; + return Qt.hsva(hue, sat, val, alpha); + } + + function colorWithLightness(color, lightness) { + var c = Qt.color(color); + return Qt.hsla(c.hslHue, c.hslSaturation, lightness, c.a); + } + + function colorWithLightnessOf(color1, color2) { + var c2 = Qt.color(color2); + return colorWithLightness(color1, c2.hslLightness); + } + + function adaptToAccent(color1, color2) { + var c1 = Qt.color(color1); + var c2 = Qt.color(color2); + var hue = c2.hslHue; + var sat = c2.hslSaturation; + var light = c1.hslLightness; + var alpha = c1.a; + return Qt.hsla(hue, sat, light, alpha); + } + + function mix(color1, color2, percentage = 0.5) { + var c1 = Qt.color(color1); + var c2 = Qt.color(color2); + return Qt.rgba( + percentage * c1.r + (1 - percentage) * c2.r, + percentage * c1.g + (1 - percentage) * c2.g, + percentage * c1.b + (1 - percentage) * c2.b, + percentage * c1.a + (1 - percentage) * c2.a + ); + } + + function transparentize(color, percentage = 1) { + var c = Qt.color(color); + return Qt.rgba(c.r, c.g, c.b, c.a * (1 - percentage)); + } + + function applyAlpha(color, alpha) { + var c = Qt.color(color); + var a = Math.max(0, Math.min(1, alpha)); + return Qt.rgba(c.r, c.g, c.b, a); + } +} diff --git a/config/quickshell/overview/common/functions/qmldir b/config/quickshell/overview/common/functions/qmldir new file mode 100644 index 00000000..4c648e7e --- /dev/null +++ b/config/quickshell/overview/common/functions/qmldir @@ -0,0 +1 @@ +singleton ColorUtils 1.0 ColorUtils.qml diff --git a/config/quickshell/overview/common/qmldir b/config/quickshell/overview/common/qmldir new file mode 100644 index 00000000..a8485188 --- /dev/null +++ b/config/quickshell/overview/common/qmldir @@ -0,0 +1,7 @@ +singleton Appearance 1.0 Appearance.qml +singleton Config 1.0 Config.qml +singleton ColorUtils 1.0 functions/ColorUtils.qml +StyledText 1.0 widgets/StyledText.qml +StyledRectangularShadow 1.0 widgets/StyledRectangularShadow.qml +StyledToolTip 1.0 widgets/StyledToolTip.qml +StyledToolTipContent 1.0 widgets/StyledToolTipContent.qml diff --git a/config/quickshell/overview/common/widgets/StyledRectangularShadow.qml b/config/quickshell/overview/common/widgets/StyledRectangularShadow.qml new file mode 100644 index 00000000..ccdff1ac --- /dev/null +++ b/config/quickshell/overview/common/widgets/StyledRectangularShadow.qml @@ -0,0 +1,14 @@ +import QtQuick +import QtQuick.Effects +import ".." + +RectangularShadow { + required property var target + anchors.fill: target + radius: 20 + blur: 0.9 * Appearance.sizes.elevationMargin + offset: Qt.vector2d(0.0, 1.0) + spread: 1 + color: Appearance.colors.colShadow + cached: true +} diff --git a/config/quickshell/overview/common/widgets/StyledText.qml b/config/quickshell/overview/common/widgets/StyledText.qml new file mode 100644 index 00000000..abfcefae --- /dev/null +++ b/config/quickshell/overview/common/widgets/StyledText.qml @@ -0,0 +1,16 @@ +import QtQuick +import ".." + +Text { + id: root + property bool animateChange: false + + renderType: Text.NativeRendering + verticalAlignment: Text.AlignVCenter + font { + hintingPreference: Font.PreferFullHinting + family: Appearance?.font.family.main ?? "sans-serif" + pixelSize: Appearance?.font.pixelSize.small ?? 15 + } + color: Appearance?.m3colors.m3onBackground ?? "white" +} diff --git a/config/quickshell/overview/common/widgets/StyledToolTip.qml b/config/quickshell/overview/common/widgets/StyledToolTip.qml new file mode 100644 index 00000000..4d4678c8 --- /dev/null +++ b/config/quickshell/overview/common/widgets/StyledToolTip.qml @@ -0,0 +1,23 @@ +import QtQuick +import QtQuick.Controls +import "." + +ToolTip { + id: root + property bool extraVisibleCondition: true + property bool alternativeVisibleCondition: false + readonly property bool internalVisibleCondition: (extraVisibleCondition && (parent.hovered === undefined || parent?.hovered)) || alternativeVisibleCondition + verticalPadding: 5 + horizontalPadding: 10 + background: null + + visible: internalVisibleCondition + + contentItem: StyledToolTipContent { + id: contentItem + text: root.text + shown: root.internalVisibleCondition + horizontalPadding: root.horizontalPadding + verticalPadding: root.verticalPadding + } +} diff --git a/config/quickshell/overview/common/widgets/StyledToolTipContent.qml b/config/quickshell/overview/common/widgets/StyledToolTipContent.qml new file mode 100644 index 00000000..b8c29c1a --- /dev/null +++ b/config/quickshell/overview/common/widgets/StyledToolTipContent.qml @@ -0,0 +1,49 @@ +import QtQuick +import "." +import "../" + +Item { + id: root + required property string text + property bool shown: false + property real horizontalPadding: 10 + property real verticalPadding: 5 + implicitWidth: tooltipTextObject.implicitWidth + 2 * root.horizontalPadding + implicitHeight: tooltipTextObject.implicitHeight + 2 * root.verticalPadding + + property bool isVisible: backgroundRectangle.implicitHeight > 0 + + Rectangle { + id: backgroundRectangle + anchors { + bottom: root.bottom + horizontalCenter: root.horizontalCenter + } + color: Appearance?.colors.colTooltip ?? "#3C4043" + radius: Appearance?.rounding.verysmall ?? 7 + opacity: shown ? 1 : 0 + implicitWidth: shown ? (tooltipTextObject.implicitWidth + 2 * root.horizontalPadding) : 0 + implicitHeight: shown ? (tooltipTextObject.implicitHeight + 2 * root.verticalPadding) : 0 + clip: true + + Behavior on implicitWidth { + animation: Appearance?.animation.elementMoveFast.numberAnimation.createObject(this) + } + Behavior on implicitHeight { + animation: Appearance?.animation.elementMoveFast.numberAnimation.createObject(this) + } + Behavior on opacity { + animation: Appearance?.animation.elementMoveFast.numberAnimation.createObject(this) + } + + StyledText { + id: tooltipTextObject + anchors.centerIn: parent + text: root.text + font.pixelSize: Appearance?.font.pixelSize.smaller ?? 14 + font.hintingPreference: Font.PreferNoHinting + color: Appearance?.colors.colOnTooltip ?? "#FFFFFF" + wrapMode: Text.Wrap + } + } +} diff --git a/config/quickshell/overview/common/widgets/qmldir b/config/quickshell/overview/common/widgets/qmldir new file mode 100644 index 00000000..0efe1360 --- /dev/null +++ b/config/quickshell/overview/common/widgets/qmldir @@ -0,0 +1,4 @@ +StyledText 1.0 StyledText.qml +StyledRectangularShadow 1.0 StyledRectangularShadow.qml +StyledToolTip 1.0 StyledToolTip.qml +StyledToolTipContent 1.0 StyledToolTipContent.qml diff --git a/config/quickshell/overview/modules/overview/Overview.qml b/config/quickshell/overview/modules/overview/Overview.qml new file mode 100644 index 00000000..b3a299cb --- /dev/null +++ b/config/quickshell/overview/modules/overview/Overview.qml @@ -0,0 +1,147 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Quickshell +import Quickshell.Io +import Quickshell.Wayland +import Quickshell.Hyprland +import "../../common" +import "../../services" +import "." + +Scope { + id: overviewScope + Variants { + id: overviewVariants + model: Quickshell.screens + PanelWindow { + id: root + required property var modelData + readonly property HyprlandMonitor monitor: Hyprland.monitorFor(root.screen) + property bool monitorIsFocused: (Hyprland.focusedMonitor?.id == monitor?.id) + screen: modelData + visible: GlobalStates.overviewOpen + + WlrLayershell.namespace: "quickshell:overview" + WlrLayershell.layer: WlrLayer.Overlay + WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive + color: "transparent" + + mask: Region { + item: GlobalStates.overviewOpen ? keyHandler : null + } + + anchors { + top: true + bottom: true + left: !(Config?.options.overview.enable ?? true) + right: !(Config?.options.overview.enable ?? true) + } + + HyprlandFocusGrab { + id: grab + windows: [root] + property bool canBeActive: root.monitorIsFocused + active: false + onCleared: () => { + if (!active) + GlobalStates.overviewOpen = false; + } + } + + Connections { + target: GlobalStates + function onOverviewOpenChanged() { + if (GlobalStates.overviewOpen) { + delayedGrabTimer.start(); + } + } + } + + Timer { + id: delayedGrabTimer + interval: Config.options.hacks.arbitraryRaceConditionDelay + repeat: false + onTriggered: { + if (!grab.canBeActive) + return; + grab.active = GlobalStates.overviewOpen; + } + } + + implicitWidth: columnLayout.implicitWidth + implicitHeight: columnLayout.implicitHeight + + Item { + id: keyHandler + anchors.fill: parent + visible: GlobalStates.overviewOpen + focus: GlobalStates.overviewOpen + + Keys.onPressed: event => { + if (event.key === Qt.Key_Escape || event.key === Qt.Key_Return) { + GlobalStates.overviewOpen = false; + event.accepted = true; + } else if (event.key === Qt.Key_Left || event.key === Qt.Key_Right || event.key === Qt.Key_Up || event.key === Qt.Key_Down) { + const workspacesPerGroup = Config.options.overview.rows * Config.options.overview.columns; + const currentId = Hyprland.focusedMonitor?.activeWorkspace?.id ?? 1; + const currentGroup = Math.floor((currentId - 1) / workspacesPerGroup); + const minWorkspaceId = currentGroup * workspacesPerGroup + 1; + const maxWorkspaceId = minWorkspaceId + workspacesPerGroup - 1; + + let targetId; + if (event.key === Qt.Key_Left) { + targetId = currentId - 1; + if (targetId < minWorkspaceId) targetId = maxWorkspaceId; + } else if (event.key === Qt.Key_Right) { + targetId = currentId + 1; + if (targetId > maxWorkspaceId) targetId = minWorkspaceId; + } else if (event.key === Qt.Key_Up) { + targetId = currentId - Config.options.overview.columns; + if (targetId < minWorkspaceId) targetId += workspacesPerGroup; + } else { + targetId = currentId + Config.options.overview.columns; + if (targetId > maxWorkspaceId) targetId -= workspacesPerGroup; + } + + Hyprland.dispatch("workspace " + targetId); + event.accepted = true; + } + } + } + + ColumnLayout { + id: columnLayout + visible: GlobalStates.overviewOpen + anchors { + horizontalCenter: parent.horizontalCenter + top: parent.top + topMargin: 100 + } + + Loader { + id: overviewLoader + active: GlobalStates.overviewOpen && (Config?.options.overview.enable ?? true) + sourceComponent: OverviewWidget { + panelWindow: root + visible: true + } + } + } + } + } + + IpcHandler { + target: "overview" + + function toggle() { + GlobalStates.overviewOpen = !GlobalStates.overviewOpen; + } + function close() { + GlobalStates.overviewOpen = false; + } + function open() { + GlobalStates.overviewOpen = true; + } + } +} diff --git a/config/quickshell/overview/modules/overview/OverviewWidget.qml b/config/quickshell/overview/modules/overview/OverviewWidget.qml new file mode 100644 index 00000000..7defa64d --- /dev/null +++ b/config/quickshell/overview/modules/overview/OverviewWidget.qml @@ -0,0 +1,303 @@ +import QtQuick +import QtQuick.Layouts +import Quickshell +import Quickshell.Wayland +import Quickshell.Hyprland +import "../../common" +import "../../common/functions" +import "../../common/widgets" +import "../../services" +import "." + +Item { + id: root + required property var panelWindow + readonly property HyprlandMonitor monitor: Hyprland.monitorFor(panelWindow.screen) + readonly property var toplevels: ToplevelManager.toplevels + readonly property int workspacesShown: Config.options.overview.rows * Config.options.overview.columns + readonly property int workspaceGroup: Math.floor((monitor.activeWorkspace?.id - 1) / workspacesShown) + property bool monitorIsFocused: (Hyprland.focusedMonitor?.name == monitor.name) + property var windows: HyprlandData.windowList + property var windowByAddress: HyprlandData.windowByAddress + property var windowAddresses: HyprlandData.addresses + property var monitorData: HyprlandData.monitors.find(m => m.id === root.monitor?.id) + property real scale: Config.options.overview.scale + property color activeBorderColor: Appearance.colors.colSecondary + + property real workspaceImplicitWidth: (monitorData?.transform % 2 === 1) ? + ((monitor.height / monitor.scale - (monitorData?.reserved?.[0] ?? 0) - (monitorData?.reserved?.[2] ?? 0)) * root.scale) : + ((monitor.width / monitor.scale - (monitorData?.reserved?.[0] ?? 0) - (monitorData?.reserved?.[2] ?? 0)) * root.scale) + property real workspaceImplicitHeight: (monitorData?.transform % 2 === 1) ? + ((monitor.width / monitor.scale - (monitorData?.reserved?.[1] ?? 0) - (monitorData?.reserved?.[3] ?? 0)) * root.scale) : + ((monitor.height / monitor.scale - (monitorData?.reserved?.[1] ?? 0) - (monitorData?.reserved?.[3] ?? 0)) * root.scale) + + property real workspaceNumberMargin: 80 + property real workspaceNumberSize: 250 * monitor.scale + property int workspaceZ: 0 + property int windowZ: 1 + property int windowDraggingZ: 99999 + property real workspaceSpacing: 5 + + property int draggingFromWorkspace: -1 + property int draggingTargetWorkspace: -1 + + implicitWidth: overviewBackground.implicitWidth + Appearance.sizes.elevationMargin * 2 + implicitHeight: overviewBackground.implicitHeight + Appearance.sizes.elevationMargin * 2 + + property Component windowComponent: OverviewWindow {} + property list<OverviewWindow> windowWidgets: [] + + StyledRectangularShadow { + target: overviewBackground + } + Rectangle { // Background + id: overviewBackground + property real padding: 10 + anchors.fill: parent + anchors.margins: Appearance.sizes.elevationMargin + + implicitWidth: workspaceColumnLayout.implicitWidth + padding * 2 + implicitHeight: workspaceColumnLayout.implicitHeight + padding * 2 + radius: Appearance.rounding.screenRounding * root.scale + padding + color: Appearance.colors.colLayer0 + border.width: 1 + border.color: Appearance.colors.colLayer0Border + + ColumnLayout { // Workspaces + id: workspaceColumnLayout + + z: root.workspaceZ + anchors.centerIn: parent + spacing: workspaceSpacing + Repeater { + model: Config.options.overview.rows + delegate: RowLayout { + id: row + property int rowIndex: index + spacing: workspaceSpacing + + Repeater { // Workspace repeater + model: Config.options.overview.columns + Rectangle { // Workspace + id: workspace + property int colIndex: index + property int workspaceValue: root.workspaceGroup * workspacesShown + rowIndex * Config.options.overview.columns + colIndex + 1 + property color defaultWorkspaceColor: Appearance.colors.colLayer1 + property color hoveredWorkspaceColor: ColorUtils.mix(defaultWorkspaceColor, Appearance.colors.colLayer1Hover, 0.1) + property color hoveredBorderColor: Appearance.colors.colLayer2Hover + property bool hoveredWhileDragging: false + + implicitWidth: root.workspaceImplicitWidth + implicitHeight: root.workspaceImplicitHeight + color: hoveredWhileDragging ? hoveredWorkspaceColor : defaultWorkspaceColor + radius: Appearance.rounding.screenRounding * root.scale + border.width: 2 + border.color: hoveredWhileDragging ? hoveredBorderColor : "transparent" + + StyledText { + anchors.centerIn: parent + text: workspaceValue + font { + pixelSize: root.workspaceNumberSize * root.scale + weight: Font.DemiBold + family: Appearance.font.family.expressive + } + color: ColorUtils.transparentize(Appearance.colors.colOnLayer1, 0.8) + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + + MouseArea { + id: workspaceArea + anchors.fill: parent + acceptedButtons: Qt.LeftButton + onClicked: { + if (root.draggingTargetWorkspace === -1) { + GlobalStates.overviewOpen = false + Hyprland.dispatch(`workspace ${workspaceValue}`) + } + } + } + + DropArea { + anchors.fill: parent + onEntered: { + root.draggingTargetWorkspace = workspaceValue + if (root.draggingFromWorkspace == root.draggingTargetWorkspace) return; + hoveredWhileDragging = true + } + onExited: { + hoveredWhileDragging = false + if (root.draggingTargetWorkspace == workspaceValue) root.draggingTargetWorkspace = -1 + } + } + + } + } + } + } + } + + Item { // Windows & focused workspace indicator + id: windowSpace + anchors.centerIn: parent + implicitWidth: workspaceColumnLayout.implicitWidth + implicitHeight: workspaceColumnLayout.implicitHeight + + Repeater { // Window repeater + model: ScriptModel { + values: { + return ToplevelManager.toplevels.values.filter((toplevel) => { + const address = `0x${toplevel.HyprlandToplevel.address}` + var win = windowByAddress[address] + const inWorkspaceGroup = (root.workspaceGroup * root.workspacesShown < win?.workspace?.id && win?.workspace?.id <= (root.workspaceGroup + 1) * root.workspacesShown) + return inWorkspaceGroup; + }).sort((a, b) => { + // Proper stacking order based on Hyprland's window properties + const addrA = `0x${a.HyprlandToplevel.address}` + const addrB = `0x${b.HyprlandToplevel.address}` + const winA = windowByAddress[addrA] + const winB = windowByAddress[addrB] + + // 1. Pinned windows are always on top + if (winA?.pinned !== winB?.pinned) { + return winA?.pinned ? 1 : -1 + } + + // 2. Floating windows above tiled windows + if (winA?.floating !== winB?.floating) { + return winA?.floating ? 1 : -1 + } + + // 3. Within same category, sort by focus history + // Lower focusHistoryID = more recently focused = higher in stack + return (winB?.focusHistoryID ?? 0) - (winA?.focusHistoryID ?? 0) + }) + } + } + delegate: OverviewWindow { + id: window + required property var modelData + required property int index + property int monitorId: windowData?.monitor + property var monitor: HyprlandData.monitors.find(m => m.id === monitorId) + property var address: `0x${modelData.HyprlandToplevel.address}` + windowData: windowByAddress[address] + toplevel: modelData + monitorData: monitor + + // Calculate scale relative to window's source monitor + property real sourceMonitorWidth: (monitor?.transform % 2 === 1) ? + (monitor?.height ?? 1920) / (monitor?.scale ?? 1) - (monitor?.reserved?.[0] ?? 0) - (monitor?.reserved?.[2] ?? 0) : + (monitor?.width ?? 1920) / (monitor?.scale ?? 1) - (monitor?.reserved?.[0] ?? 0) - (monitor?.reserved?.[2] ?? 0) + property real sourceMonitorHeight: (monitor?.transform % 2 === 1) ? + (monitor?.width ?? 1080) / (monitor?.scale ?? 1) - (monitor?.reserved?.[1] ?? 0) - (monitor?.reserved?.[3] ?? 0) : + (monitor?.height ?? 1080) / (monitor?.scale ?? 1) - (monitor?.reserved?.[1] ?? 0) - (monitor?.reserved?.[3] ?? 0) + + // Scale windows to fit the workspace size, accounting for different monitor sizes + scale: Math.min( + root.workspaceImplicitWidth / sourceMonitorWidth, + root.workspaceImplicitHeight / sourceMonitorHeight + ) + + availableWorkspaceWidth: root.workspaceImplicitWidth + availableWorkspaceHeight: root.workspaceImplicitHeight + widgetMonitorId: root.monitor.id + + property bool atInitPosition: (initX == x && initY == y) + + property int workspaceColIndex: (windowData?.workspace.id - 1) % Config.options.overview.columns + property int workspaceRowIndex: Math.floor((windowData?.workspace.id - 1) % root.workspacesShown / Config.options.overview.columns) + xOffset: (root.workspaceImplicitWidth + workspaceSpacing) * workspaceColIndex + yOffset: (root.workspaceImplicitHeight + workspaceSpacing) * workspaceRowIndex + + Timer { + id: updateWindowPosition + interval: Config.options.hacks.arbitraryRaceConditionDelay + repeat: false + running: false + onTriggered: { + window.x = Math.round(Math.max((windowData?.at[0] - (monitor?.x ?? 0) - (monitorData?.reserved?.[0] ?? 0)) * root.scale, 0) + xOffset) + window.y = Math.round(Math.max((windowData?.at[1] - (monitor?.y ?? 0) - (monitorData?.reserved?.[1] ?? 0)) * root.scale, 0) + yOffset) + } + } + + z: atInitPosition ? (root.windowZ + index) : root.windowDraggingZ + Drag.hotSpot.x: targetWindowWidth / 2 + Drag.hotSpot.y: targetWindowHeight / 2 + MouseArea { + id: dragArea + anchors.fill: parent + hoverEnabled: true + onEntered: hovered = true + onExited: hovered = false + acceptedButtons: Qt.LeftButton | Qt.MiddleButton + drag.target: parent + onPressed: (mouse) => { + root.draggingFromWorkspace = windowData?.workspace.id + window.pressed = true + window.Drag.active = true + window.Drag.source = window + window.Drag.hotSpot.x = mouse.x + window.Drag.hotSpot.y = mouse.y + } + onReleased: { + const targetWorkspace = root.draggingTargetWorkspace + window.pressed = false + window.Drag.active = false + root.draggingFromWorkspace = -1 + if (targetWorkspace !== -1 && targetWorkspace !== windowData?.workspace.id) { + Hyprland.dispatch(`movetoworkspacesilent ${targetWorkspace}, address:${window.windowData?.address}`) + updateWindowPosition.restart() + } + else { + window.x = window.initX + window.y = window.initY + } + } + onClicked: (event) => { + if (!windowData) return; + + if (event.button === Qt.LeftButton) { + GlobalStates.overviewOpen = false + Hyprland.dispatch(`focuswindow address:${windowData.address}`) + event.accepted = true + } else if (event.button === Qt.MiddleButton) { + Hyprland.dispatch(`closewindow address:${windowData.address}`) + event.accepted = true + } + } + + StyledToolTip { + extraVisibleCondition: false + alternativeVisibleCondition: dragArea.containsMouse && !window.Drag.active + text: `${windowData?.title ?? "Unknown"}\n[${windowData?.class ?? "unknown"}] ${windowData?.xwayland ? "[XWayland] " : ""}` + } + } + } + } + + Rectangle { // Focused workspace indicator + id: focusedWorkspaceIndicator + property int activeWorkspaceInGroup: monitor.activeWorkspace?.id - (root.workspaceGroup * root.workspacesShown) + property int activeWorkspaceRowIndex: Math.floor((activeWorkspaceInGroup - 1) / Config.options.overview.columns) + property int activeWorkspaceColIndex: (activeWorkspaceInGroup - 1) % Config.options.overview.columns + x: (root.workspaceImplicitWidth + workspaceSpacing) * activeWorkspaceColIndex + y: (root.workspaceImplicitHeight + workspaceSpacing) * activeWorkspaceRowIndex + z: root.windowZ + width: root.workspaceImplicitWidth + height: root.workspaceImplicitHeight + color: "transparent" + radius: Appearance.rounding.screenRounding * root.scale + border.width: 2 + border.color: root.activeBorderColor + Behavior on x { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + Behavior on y { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + } + } + } +} diff --git a/config/quickshell/overview/modules/overview/OverviewWindow.qml b/config/quickshell/overview/modules/overview/OverviewWindow.qml new file mode 100644 index 00000000..fac3e22e --- /dev/null +++ b/config/quickshell/overview/modules/overview/OverviewWindow.qml @@ -0,0 +1,112 @@ +import QtQuick.Effects +import QtQuick +import QtQuick.Layouts +import Quickshell +import Quickshell.Wayland +import "../../common" +import "../../common/functions" +import "../../services" + +Item { // Window + id: root + property var toplevel + property var windowData + property var monitorData + property var scale + property var availableWorkspaceWidth + property var availableWorkspaceHeight + property bool restrictToWorkspace: true + property real initX: Math.max(((windowData?.at[0] ?? 0) - (monitorData?.x ?? 0) - (monitorData?.reserved?.[0] ?? 0)) * root.scale, 0) + xOffset + property real initY: Math.max(((windowData?.at[1] ?? 0) - (monitorData?.y ?? 0) - (monitorData?.reserved?.[1] ?? 0)) * root.scale, 0) + yOffset + property real xOffset: 0 + property real yOffset: 0 + property int widgetMonitorId: 0 + + property var targetWindowWidth: (windowData?.size[0] ?? 100) * scale + property var targetWindowHeight: (windowData?.size[1] ?? 100) * scale + property bool hovered: false + property bool pressed: false + + property var iconToWindowRatio: 0.25 + property var xwaylandIndicatorToIconRatio: 0.35 + property var iconToWindowRatioCompact: 0.45 + property var entry: DesktopEntries.heuristicLookup(windowData?.class) + property var iconPath: Quickshell.iconPath(entry?.icon ?? windowData?.class ?? "application-x-executable", "image-missing") + property bool compactMode: Appearance.font.pixelSize.smaller * 4 > targetWindowHeight || Appearance.font.pixelSize.smaller * 4 > targetWindowWidth + + property bool indicateXWayland: windowData?.xwayland ?? false + + x: initX + y: initY + width: Math.min((windowData?.size[0] ?? 100) * root.scale, availableWorkspaceWidth) + height: Math.min((windowData?.size[1] ?? 100) * root.scale, availableWorkspaceHeight) + opacity: (windowData?.monitor ?? -1) == widgetMonitorId ? 1 : 0.4 + + layer.enabled: true + layer.smooth: true + layer.mipmap: true + + Behavior on x { + animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this) + } + Behavior on y { + animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this) + } + Behavior on width { + animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this) + } + Behavior on height { + animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this) + } + + Rectangle { + id: clipContainer + anchors.fill: parent + radius: Appearance.rounding.windowRounding * root.scale + clip: true + color: "transparent" + + ScreencopyView { + id: windowPreview + anchors.fill: parent + captureSource: GlobalStates.overviewOpen ? root.toplevel : null + live: true + + Rectangle { + anchors.fill: parent + radius: Appearance.rounding.windowRounding * root.scale + color: pressed ? ColorUtils.transparentize(Appearance.colors.colLayer2Active, 0.5) : + hovered ? ColorUtils.transparentize(Appearance.colors.colLayer2Hover, 0.7) : + ColorUtils.transparentize(Appearance.colors.colLayer2) + border.color : ColorUtils.transparentize(Appearance.m3colors.m3outline, 0.7) + border.width : 1 + } + + ColumnLayout { + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.right: parent.right + spacing: Appearance.font.pixelSize.smaller * 0.5 + + Image { + id: windowIcon + property var iconSize: { + return Math.min(targetWindowWidth, targetWindowHeight) * (root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio) / (root.monitorData?.scale ?? 1); + } + Layout.alignment: Qt.AlignHCenter + source: root.iconPath + width: iconSize + height: iconSize + sourceSize: Qt.size(iconSize, iconSize) + + Behavior on width { + animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this) + } + Behavior on height { + animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this) + } + } + } + } + } +} diff --git a/config/quickshell/overview/modules/overview/qmldir b/config/quickshell/overview/modules/overview/qmldir new file mode 100644 index 00000000..9b15b45b --- /dev/null +++ b/config/quickshell/overview/modules/overview/qmldir @@ -0,0 +1,3 @@ +Overview 1.0 Overview.qml +OverviewWidget 1.0 OverviewWidget.qml +OverviewWindow 1.0 OverviewWindow.qml diff --git a/config/quickshell/overview/services/GlobalStates.qml b/config/quickshell/overview/services/GlobalStates.qml new file mode 100644 index 00000000..7644e385 --- /dev/null +++ b/config/quickshell/overview/services/GlobalStates.qml @@ -0,0 +1,11 @@ +pragma Singleton +pragma ComponentBehavior: Bound + +import QtQuick +import Quickshell + +Singleton { + id: root + property bool overviewOpen: false + property bool superReleaseMightTrigger: true +} diff --git a/config/quickshell/overview/services/HyprlandData.qml b/config/quickshell/overview/services/HyprlandData.qml new file mode 100644 index 00000000..e23472d0 --- /dev/null +++ b/config/quickshell/overview/services/HyprlandData.qml @@ -0,0 +1,137 @@ +pragma Singleton +pragma ComponentBehavior: Bound + +import QtQuick +import Quickshell +import Quickshell.Io +import Quickshell.Hyprland + +/** + * Provides access to some Hyprland data not available in Quickshell.Hyprland. + */ +Singleton { + id: root + property var windowList: [] + property var addresses: [] + property var windowByAddress: ({}) + property var workspaces: [] + property var workspaceIds: [] + property var workspaceById: ({}) + property var activeWorkspace: null + property var monitors: [] + property var layers: ({}) + + function updateWindowList() { + getClients.running = true; + } + + function updateLayers() { + getLayers.running = true; + } + + function updateMonitors() { + getMonitors.running = true; + } + + function updateWorkspaces() { + getWorkspaces.running = true; + getActiveWorkspace.running = true; + } + + function updateAll() { + updateWindowList(); + updateMonitors(); + updateLayers(); + updateWorkspaces(); + } + + function biggestWindowForWorkspace(workspaceId) { + const windowsInThisWorkspace = HyprlandData.windowList.filter(w => w.workspace.id == workspaceId); + return windowsInThisWorkspace.reduce((maxWin, win) => { + const maxArea = (maxWin?.size?.[0] ?? 0) * (maxWin?.size?.[1] ?? 0); + const winArea = (win?.size?.[0] ?? 0) * (win?.size?.[1] ?? 0); + return winArea > maxArea ? win : maxWin; + }, null); + } + + Component.onCompleted: { + updateAll(); + } + + Connections { + target: Hyprland + + function onRawEvent(event) { + updateAll() + } + } + + Process { + id: getClients + command: ["hyprctl", "clients", "-j"] + stdout: StdioCollector { + id: clientsCollector + onStreamFinished: { + root.windowList = JSON.parse(clientsCollector.text) + let tempWinByAddress = {}; + for (var i = 0; i < root.windowList.length; ++i) { + var win = root.windowList[i]; + tempWinByAddress[win.address] = win; + } + root.windowByAddress = tempWinByAddress; + root.addresses = root.windowList.map(win => win.address); + } + } + } + + Process { + id: getMonitors + command: ["hyprctl", "monitors", "-j"] + stdout: StdioCollector { + id: monitorsCollector + onStreamFinished: { + root.monitors = JSON.parse(monitorsCollector.text); + } + } + } + + Process { + id: getLayers + command: ["hyprctl", "layers", "-j"] + stdout: StdioCollector { + id: layersCollector + onStreamFinished: { + root.layers = JSON.parse(layersCollector.text); + } + } + } + + Process { + id: getWorkspaces + command: ["hyprctl", "workspaces", "-j"] + stdout: StdioCollector { + id: workspacesCollector + onStreamFinished: { + root.workspaces = JSON.parse(workspacesCollector.text); + let tempWorkspaceById = {}; + for (var i = 0; i < root.workspaces.length; ++i) { + var ws = root.workspaces[i]; + tempWorkspaceById[ws.id] = ws; + } + root.workspaceById = tempWorkspaceById; + root.workspaceIds = root.workspaces.map(ws => ws.id); + } + } + } + + Process { + id: getActiveWorkspace + command: ["hyprctl", "activeworkspace", "-j"] + stdout: StdioCollector { + id: activeWorkspaceCollector + onStreamFinished: { + root.activeWorkspace = JSON.parse(activeWorkspaceCollector.text); + } + } + } +} diff --git a/config/quickshell/overview/services/qmldir b/config/quickshell/overview/services/qmldir new file mode 100644 index 00000000..b9008641 --- /dev/null +++ b/config/quickshell/overview/services/qmldir @@ -0,0 +1,2 @@ +singleton HyprlandData 1.0 HyprlandData.qml +singleton GlobalStates 1.0 GlobalStates.qml diff --git a/config/quickshell/overview/shell.qml b/config/quickshell/overview/shell.qml new file mode 100644 index 00000000..e92b4eb7 --- /dev/null +++ b/config/quickshell/overview/shell.qml @@ -0,0 +1,16 @@ +//@ pragma UseQApplication +//@ pragma Env QT_QUICK_CONTROLS_STYLE=Basic + +import "./modules/overview/" +import "./services/" +import "./common/" +import "./common/functions/" +import "./common/widgets/" + +import QtQuick +import Quickshell +import Quickshell.Hyprland + +ShellRoot { + Overview {} +} diff --git a/config/waybar/Modules b/config/waybar/Modules index de5c7c3b..c6dc3786 100644 --- a/config/waybar/Modules +++ b/config/waybar/Modules @@ -99,7 +99,7 @@ "interval": 1, //"format": " {:%I:%M %p}", // AM PM format "format": " {:%H:%M:%S}", // 24H - "format-alt": " {:%H:%M %Y, %d %B, %A}", + "format-alt": " {:L%H:%M %Y, %d %B, %A}", "tooltip-format": "<tt><small>{calendar}</small></tt>", "calendar": { "mode": "year", @@ -127,28 +127,28 @@ "clock#2": { //"format": " {:%I:%M %p}", // AM PM format "format": " {:%H:%M}", // 24H - "format-alt": "{:%A | %H:%M | %e %B}", + "format-alt": "{:L%A | %H:%M | %e %B}", "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>" }, "clock#3": { - //"format": "{:%I:%M %p - %d/%b}", //for AM/PM - "format": "{:%H:%M - %d/%b}", // 24H + //"format": "{:L%I:%M %p - %d/%b}", //for AM/PM + "format": "{:L%H:%M - %d/%b}", // 24H "tooltip": false }, "clock#4": { "interval": 60, - //"format": "{:%B | %a %d, %Y | %I:%M %p}", // AM PM format - "format": "{:%B | %a %d, %Y | %H:%M}", // 24H - "format-alt": "{:%a %b %d, %G}", + //"format": "{:L%B | %a %d, %Y | %I:%M %p}", // AM PM format + "format": "{:L%B | %a %d, %Y | %H:%M}", // 24H + "format-alt": "{:L%a %b %d, %G}", "tooltip-format": "<big>{:%B %Y}</big>\n<tt><small>{calendar}</small></tt>", }, "clock#5": { //"format": "{:%A, %I:%M %P}", // AM PM format "format": "{:%a %d | %H:%M}", // 24H - "format-alt": "{:%A, %d %B, %Y (%R)}", + "format-alt": "{:L%A, %d %B, %Y (%R)}", "tooltip-format": "<big>{:%B %Y}</big>\n<tt><small>{calendar}</small></tt>", }, diff --git a/config/waybar/configs/[TOP] Default b/config/waybar/configs/[TOP] Default index 8628754a..62f78927 100644 --- a/config/waybar/configs/[TOP] Default +++ b/config/waybar/configs/[TOP] Default @@ -52,6 +52,8 @@ "custom/separator#line", "group/audio", "custom/separator#dot-line", + "custom/nightlight", + "custom/separator#dot-line", "group/status", ], -}
\ No newline at end of file +} diff --git a/config/waybar/configs/[TOP] Default (old v1) b/config/waybar/configs/[TOP] Default (old v1) index 85822b2d..f9c34df4 100644 --- a/config/waybar/configs/[TOP] Default (old v1) +++ b/config/waybar/configs/[TOP] Default (old v1) @@ -67,6 +67,8 @@ "custom/separator#dot-line", "custom/keyboard", "custom/separator#dot-line", + "custom/nightlight", + "custom/separator#dot-line", "custom/power", ], -}
\ No newline at end of file +} diff --git a/config/waybar/configs/[TOP] Default (old v2) b/config/waybar/configs/[TOP] Default (old v2) index d6bb1c4e..ec82135d 100644 --- a/config/waybar/configs/[TOP] Default (old v2) +++ b/config/waybar/configs/[TOP] Default (old v2) @@ -52,7 +52,8 @@ "keyboard-state", "custom/keyboard", "custom/lock", + "custom/nightlight", "custom/separator#dot-line", "custom/power", ], -}
\ No newline at end of file +} diff --git a/config/waybar/configs/[TOP] Default (old v3) b/config/waybar/configs/[TOP] Default (old v3) index 86221245..d12688c2 100644 --- a/config/waybar/configs/[TOP] Default (old v3) +++ b/config/waybar/configs/[TOP] Default (old v3) @@ -55,7 +55,8 @@ "custom/separator#line", "keyboard-state", "custom/keyboard", + "custom/nightlight", "custom/lock", "custom/power", ], -}
\ No newline at end of file +} diff --git a/config/waybar/configs/[TOP] Default (old v4) b/config/waybar/configs/[TOP] Default (old v4) index 3495e823..6ea42d75 100644 --- a/config/waybar/configs/[TOP] Default (old v4) +++ b/config/waybar/configs/[TOP] Default (old v4) @@ -48,7 +48,8 @@ "tray", "mpris", "group/audio", + "custom/nightlight", "custom/separator#dot-line", "group/status", ], -}
\ No newline at end of file +} diff --git a/config/waybar/configs/[TOP] Default Laptop (old v1) b/config/waybar/configs/[TOP] Default Laptop (old v1) index f3935dc9..881240aa 100644 --- a/config/waybar/configs/[TOP] Default Laptop (old v1) +++ b/config/waybar/configs/[TOP] Default Laptop (old v1) @@ -69,8 +69,10 @@ "custom/separator#dot-line", "keyboard-state", "custom/separator#dot-line", + "custom/nightlight", + "custom/separator#dot-line", "custom/keyboard", "custom/separator#dot-line", "custom/power", ], -}
\ No newline at end of file +} diff --git a/config/waybar/configs/[TOP] Default Laptop (old v2) b/config/waybar/configs/[TOP] Default Laptop (old v2) index 49d1637c..af952891 100644 --- a/config/waybar/configs/[TOP] Default Laptop (old v2) +++ b/config/waybar/configs/[TOP] Default Laptop (old v2) @@ -53,9 +53,10 @@ "mpris", "group/audio", "custom/separator#line", + "custom/nightlight", "keyboard-state", "custom/keyboard", "custom/lock", "custom/power", ], -}
\ No newline at end of file +} diff --git a/config/waybar/configs/[TOP] Default Laptop (old v3) b/config/waybar/configs/[TOP] Default Laptop (old v3) index 4754fe46..f6fd5dc0 100644 --- a/config/waybar/configs/[TOP] Default Laptop (old v3) +++ b/config/waybar/configs/[TOP] Default Laptop (old v3) @@ -53,9 +53,10 @@ "mpris", "group/audio", "custom/separator#line", + "custom/nightlight", "keyboard-state", "custom/keyboard", "custom/lock", "custom/power", ], -}
\ No newline at end of file +} diff --git a/config/waybar/configs/[TOP] Default Laptop (old v4) b/config/waybar/configs/[TOP] Default Laptop (old v4) index 178f87aa..3627213c 100644 --- a/config/waybar/configs/[TOP] Default Laptop (old v4) +++ b/config/waybar/configs/[TOP] Default Laptop (old v4) @@ -50,7 +50,8 @@ "tray", "mpris", "group/audio", + "custom/nightlight", "custom/separator#dot-line", "group/status", ], -}
\ No newline at end of file +} diff --git a/config/waybar/configs/[TOP] Everforest b/config/waybar/configs/[TOP] Everforest index 7b007f78..db49b7ed 100644 --- a/config/waybar/configs/[TOP] Everforest +++ b/config/waybar/configs/[TOP] Everforest @@ -55,7 +55,7 @@ "on-click": "rofi -show drun" }, "clock#forest": { - "format": "{:%A %d.%m.%Y - %H:%M}", + "format": "{:L%A %d.%m.%Y - %H:%M}", "tooltip-format": "<span color='#D3C6AA' size='larger'>{:%Y %B}</span>\n<tt>{calendar}</tt>", "calendar-weeks-pos": "right", "today-format": "<span color='#E67E80' weight='ultrabold'>{}</span>", diff --git a/config/waybar/configs/[TOP] Simple b/config/waybar/configs/[TOP] Simple index abc61195..dd080560 100644 --- a/config/waybar/configs/[TOP] Simple +++ b/config/waybar/configs/[TOP] Simple @@ -36,6 +36,7 @@ "hyprland/window", "battery", "group/audio", + "custom/nightlight", "custom/power", ], } diff --git a/config/waybar/configs/[TOP] Simpliest b/config/waybar/configs/[TOP] Simpliest index 4c2d3c9e..c32a27a9 100644 --- a/config/waybar/configs/[TOP] Simpliest +++ b/config/waybar/configs/[TOP] Simpliest @@ -31,6 +31,7 @@ "modules-right": [ "idle_inhibitor", + "custom/nightlight", "group/notify", ], } |
