From 072df039890c660135ce23bd2e88f752339a4b08 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Mon, 16 Jun 2025 14:24:05 +0545 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(gui):=20add=20application=20sw?= =?UTF-8?q?itcher=20items=20scale=20and=20bindings=20in=20settings=20GUI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/data.py | 3 ++- config/hypr/colors.conf | 34 +++++++++++++++++----------------- config/settings/constants.py | 3 +++ config/settings/gui.py | 32 ++++++++++++++++++++++++++++++-- config/settings/utils.py | 2 ++ 5 files changed, 54 insertions(+), 20 deletions(-) diff --git a/config/data.py b/config/data.py index dbb4b08..cec9739 100644 --- a/config/data.py +++ b/config/data.py @@ -68,6 +68,7 @@ if os.path.exists(CONFIG_FILE): WORKSPACE_NUMS = config.get("workspace_nums", False) WORKSPACE_USE_CHINESE_NUMERAL = config.get("workspace_use_chinese_numerals", False) WORKSPACE_DOTS = config.get("workspace_dots", False) + WINDOW_SWITCHER_ITEMS_PER_ROW = config.get("window_switcher_items_per_row", 13) NOTIF_POS = config.get(NOTIF_POS_KEY, NOTIF_POS_DEFAULT) @@ -98,7 +99,7 @@ else: TERMINAL_COMMAND = "kitty -e" DOCK_THEME = "Pills" DOCK_ICON_SIZE = 20 - + WINDOW_SWITCHER_ITEMS_PER_ROW = 13 NOTIF_POS = NOTIF_POS_DEFAULT DOCK_COMPONENTS_VISIBILITY = { diff --git a/config/hypr/colors.conf b/config/hypr/colors.conf index 1dce2f8..ff92bcb 100644 --- a/config/hypr/colors.conf +++ b/config/hypr/colors.conf @@ -1,27 +1,27 @@ -$wallpaper = /home/sankalp/Pictures/wallpapers/179.png -$background = 101417 -$foreground = e0e3e8 +$wallpaper = /home/sankalp/Pictures/wallpapers/-13.webp +$background = 191114 +$foreground = eedfe3 -$primary = 96ccf8 -$secondary = b7c9d9 -$tertiary = d0c0e8 -$surface = 101417 -$surface_bright = 363a3e -$outline = 8b9198 +$primary = fdb0d4 +$secondary = e0bdcb +$tertiary = f2bb9a +$surface = 191114 +$surface_bright = 40373a +$outline = 9d8d92 $error = ff5945 $shadow = 000000 $red = ffb2b9 -$green = 95d5a7 -$yellow = b8cf84 -$blue = afc6ff -$magenta = e4b7f3 +$green = b7d085 +$yellow = dec56e +$blue = cebdfe +$magenta = f7b1de $cyan = 82d3e2 $white = 82d3e0 $red_dim = ff4c5c -$green_dim = 4cb86a -$yellow_dim = 8baa43 -$blue_dim = 497dff -$magenta_dim = c360e4 +$green_dim = 89ad42 +$yellow_dim = bb9b2b +$blue_dim = 8359fc +$magenta_dim = ee54b7 $cyan_dim = 30b5ce diff --git a/config/settings/constants.py b/config/settings/constants.py index dd2753f..b569bda 100644 --- a/config/settings/constants.py +++ b/config/settings/constants.py @@ -16,6 +16,8 @@ DEFAULTS = { "suffix_restart": "B", "prefix_axmsg": "SUPER", "suffix_axmsg": "A", + "prefix_application_switcher": "ALT", + "suffix_application_switcher": "TAB", "prefix_dash": "SUPER", "suffix_dash": "D", "prefix_bluetooth": "SUPER SHIFT", @@ -71,6 +73,7 @@ DEFAULTS = { "workspace_use_chinese_numerals": False, "workspace_dots": False, "dock_music_player": True, + "window_switcher_items_per_row": 13, "metrics_visible": { "cpu": True, "ram": True, diff --git a/config/settings/gui.py b/config/settings/gui.py index 941b405..edc30a3 100644 --- a/config/settings/gui.py +++ b/config/settings/gui.py @@ -124,6 +124,7 @@ class HyprConfGUI(Window): bindings = [ (f"Reload {APP_NAME_CAP}", "prefix_restart", "suffix_restart"), ("Message", "prefix_axmsg", "suffix_axmsg"), + ("Application Switcher", "prefix_application_switcher", "suffix_application_switcher"), ("Dashboard", "prefix_dash", "suffix_dash"), ("Bluetooth", "prefix_bluetooth", "suffix_bluetooth"), ("Pins", "prefix_pins", "suffix_pins"), @@ -341,7 +342,7 @@ class HyprConfGUI(Window): layout_grid.attach(dock_theme_combo_container, 3, 1, 1, 1) # Add icon size scale - icon_size_label = Label(label="Icon Size", h_align="start", v_align="center") + icon_size_label = Label(label="Taskbar Icon Size", h_align="start", v_align="center") layout_grid.attach(icon_size_label, 0, 4, 1, 1) icon_size_scale_container = Gtk.Box( @@ -361,7 +362,30 @@ class HyprConfGUI(Window): self.icon_size_scale.set_tooltip_text("Adjust the size of dock icons") icon_size_scale_container.add(self.icon_size_scale) - layout_grid.attach(icon_size_scale_container, 1, 4, 3, 1) + layout_grid.attach(icon_size_scale_container, 1, 4, 1, 1) + + # Add application switcher items scale + application_switcher_label = Label(label="Application Switcher Items", h_align="start", v_align="center") + layout_grid.attach(application_switcher_label, 2, 4, 1, 1) + + application_switcher_scale_container = Gtk.Box( + orientation=Gtk.Orientation.HORIZONTAL, + halign=Gtk.Align.START, + valign=Gtk.Align.CENTER, + hexpand=True, + ) + + self.application_switcher_scale = Gtk.Scale.new_with_range( + Gtk.Orientation.HORIZONTAL, 5, 20, 1 + ) + self.application_switcher_scale.set_value(bind_vars.get("window_switcher_items_per_row", 13)) + self.application_switcher_scale.set_size_request(150, -1) + self.application_switcher_scale.set_draw_value(True) + self.application_switcher_scale.set_value_pos(Gtk.PositionType.RIGHT) + self.application_switcher_scale.set_tooltip_text("Adjust the number of items per row in the application switcher") + + application_switcher_scale_container.add(self.application_switcher_scale) + layout_grid.attach(application_switcher_scale_container, 3, 4, 1, 1) dock_label = Label(label="Show Dock", h_align="start", v_align="center") layout_grid.attach(dock_label, 0, 2, 1, 1) @@ -817,6 +841,9 @@ class HyprConfGUI(Window): current_bind_vars_snapshot["dock_icon_size"] = int( self.icon_size_scale.get_value() ) + current_bind_vars_snapshot["window_switcher_items_per_row"] = int( + self.window_switcher_scale.get_value() + ) current_bind_vars_snapshot["terminal_command"] = self.terminal_entry.get_text() current_bind_vars_snapshot["corners_visible"] = self.corners_switch.get_active() current_bind_vars_snapshot["dock_theme"] = ( @@ -1137,6 +1164,7 @@ class HyprConfGUI(Window): self.idle_switch.set_active(False) # Add reset for icon size scale self.icon_size_scale.set_value(utils.bind_vars.get("dock_icon_size", 20)) + self.application_switcher_scale.set_value(utils.bind_vars.get("window_switcher_items_per_row", 13)) print("Settings reset to defaults.") def on_close(self, widget): diff --git a/config/settings/utils.py b/config/settings/utils.py index 3edd67e..ab3eca6 100644 --- a/config/settings/utils.py +++ b/config/settings/utils.py @@ -259,6 +259,8 @@ $axMessage = notify-send "Axenide" "FIRE IN THE HOLE‼️🗣️🔥🕳️" -i bind = {bind_vars.get("prefix_restart", "SUPER ALT")}, {bind_vars.get("suffix_restart", "B")}, exec, killall {APP_NAME}; uwsm-app $(python {home}/.config/{APP_NAME_CAP}/main.py) # Message bind = {bind_vars.get("prefix_axmsg", "SUPER")}, {bind_vars.get("suffix_axmsg", "A")}, exec, $axMessage +# Application Switcher +bind = {bind_vars.get("prefix_application_switcher", "ALT")}, {bind_vars.get("suffix_application_switcher", "TAB")}, exec, $fabricSend 'switcher.show_switcher()' # Dashboard bind = {bind_vars.get("prefix_dash", "SUPER")}, {bind_vars.get("suffix_dash", "D")}, exec, $fabricSend 'notch.open_notch("dashboard")' # Bluetooth