updates
This commit is contained in:
19 files changed
+16034
-149
No files matched your search
+68
-63
@@ -1,64 +1,69 @@
|
||||
{
|
||||
"prefix_restart": "SUPER ALT",
|
||||
"suffix_restart": "B",
|
||||
"prefix_axmsg": "SUPER",
|
||||
"suffix_axmsg": "A",
|
||||
"prefix_dash": "SUPER",
|
||||
"suffix_dash": "D",
|
||||
"prefix_bluetooth": "SUPER SHIFT",
|
||||
"suffix_bluetooth": "B",
|
||||
"prefix_pins": "SUPER",
|
||||
"suffix_pins": "Q",
|
||||
"prefix_kanban": "SUPER",
|
||||
"suffix_kanban": "N",
|
||||
"prefix_launcher": "SUPER",
|
||||
"suffix_launcher": "R",
|
||||
"prefix_tmux": "SUPER",
|
||||
"suffix_tmux": "T",
|
||||
"prefix_cliphist": "SUPER",
|
||||
"suffix_cliphist": "V",
|
||||
"prefix_toolbox": "SUPER",
|
||||
"suffix_toolbox": "S",
|
||||
"prefix_overview": "SUPER",
|
||||
"suffix_overview": "TAB",
|
||||
"prefix_wallpapers": "SUPER",
|
||||
"suffix_wallpapers": "COMMA",
|
||||
"prefix_randwall": "SUPER SHIFT",
|
||||
"suffix_randwall": "COMMA",
|
||||
"prefix_emoji": "SUPER",
|
||||
"suffix_emoji": "PERIOD",
|
||||
"prefix_power": "SUPER",
|
||||
"suffix_power": "ESCAPE",
|
||||
"prefix_caffeine": "SUPER SHIFT",
|
||||
"suffix_caffeine": "M",
|
||||
"prefix_css": "SUPER SHIFT",
|
||||
"suffix_css": "B",
|
||||
"prefix_restart_inspector": "SUPER CTRL ALT",
|
||||
"suffix_restart_inspector": "B",
|
||||
"wallpapers_dir": "/home/sankalp/Pictures/wallpapers",
|
||||
"dock_position": "Bottom",
|
||||
"vertical": false,
|
||||
"dock_enabled": true,
|
||||
"dock_auto_hide": true,
|
||||
"dock_always_occluded": false,
|
||||
"dock_icon_size": 20,
|
||||
"terminal_command": "kitty -e",
|
||||
"corners_visible": true,
|
||||
"dock_theme": "Pills",
|
||||
"notif_pos": "Top",
|
||||
"dock_workspace_visible": true,
|
||||
"dock_metrics_visible": true,
|
||||
"dock_date_time_visible": true,
|
||||
"dock_battery_visible": true,
|
||||
"dock_controls_visible": true,
|
||||
"dock_indicators_visible": true,
|
||||
"dock_applications_visible": true,
|
||||
"metrics_visible": {
|
||||
"cpu": true,
|
||||
"ram": true,
|
||||
"swap": true,
|
||||
"disk": false,
|
||||
"gpu": false
|
||||
},
|
||||
"metrics_disks": ["/"]
|
||||
}
|
||||
"prefix_restart": "SUPER ALT",
|
||||
"suffix_restart": "B",
|
||||
"prefix_axmsg": "SUPER",
|
||||
"suffix_axmsg": "A",
|
||||
"prefix_dash": "SUPER",
|
||||
"suffix_dash": "D",
|
||||
"prefix_bluetooth": "SUPER SHIFT",
|
||||
"suffix_bluetooth": "B",
|
||||
"prefix_pins": "SUPER",
|
||||
"suffix_pins": "Q",
|
||||
"prefix_kanban": "SUPER",
|
||||
"suffix_kanban": "N",
|
||||
"prefix_launcher": "SUPER",
|
||||
"suffix_launcher": "R",
|
||||
"prefix_tmux": "SUPER",
|
||||
"suffix_tmux": "T",
|
||||
"prefix_cliphist": "SUPER",
|
||||
"suffix_cliphist": "V",
|
||||
"prefix_toolbox": "SUPER",
|
||||
"suffix_toolbox": "S",
|
||||
"prefix_overview": "SUPER",
|
||||
"suffix_overview": "TAB",
|
||||
"prefix_wallpapers": "SUPER",
|
||||
"suffix_wallpapers": "COMMA",
|
||||
"prefix_randwall": "SUPER SHIFT",
|
||||
"suffix_randwall": "COMMA",
|
||||
"prefix_emoji": "SUPER",
|
||||
"suffix_emoji": "PERIOD",
|
||||
"prefix_power": "SUPER",
|
||||
"suffix_power": "ESCAPE",
|
||||
"prefix_caffeine": "SUPER SHIFT",
|
||||
"suffix_caffeine": "M",
|
||||
"prefix_css": "SUPER SHIFT",
|
||||
"suffix_css": "B",
|
||||
"prefix_restart_inspector": "SUPER CTRL ALT",
|
||||
"suffix_restart_inspector": "B",
|
||||
"wallpapers_dir": "/home/sankalp/Pictures/wallpapers",
|
||||
"dock_position": "Bottom",
|
||||
"vertical": false,
|
||||
"dock_enabled": true,
|
||||
"dock_auto_hide": true,
|
||||
"dock_always_occluded": false,
|
||||
"dock_icon_size": 20,
|
||||
"terminal_command": "kitty -e",
|
||||
"corners_visible": true,
|
||||
"dock_theme": "Pills",
|
||||
"notif_pos": "Top",
|
||||
"dock_workspace_visible": true,
|
||||
"dock_metrics_visible": true,
|
||||
"dock_date_time_visible": true,
|
||||
"dock_battery_visible": true,
|
||||
"dock_controls_visible": true,
|
||||
"dock_indicators_visible": true,
|
||||
"dock_applications_visible": true,
|
||||
"workspace_dots": false,
|
||||
"workspace_nums": false,
|
||||
"workspace_use_chinese_numerals": false,
|
||||
"metrics_visible": {
|
||||
"cpu": true,
|
||||
"ram": true,
|
||||
"swap": true,
|
||||
"disk": false,
|
||||
"gpu": false
|
||||
},
|
||||
"metrics_disks": [
|
||||
"/"
|
||||
]
|
||||
}
|
||||
@@ -31,6 +31,10 @@ WALLPAPERS_DIR_DEFAULT = get_relative_path("../assets/wallpapers_example")
|
||||
CONFIG_FILE = get_relative_path("../config/config.json")
|
||||
MATUGEN_STATE_FILE = os.path.join(CONFIG_DIR, "matugen")
|
||||
|
||||
WORKSPACE_NUMS = False
|
||||
WORKSPACE_USE_CHINESE_NUMERAL = False
|
||||
WORKSPACE_DOTS = False
|
||||
|
||||
DOCK_THEME = "Pills"
|
||||
|
||||
|
||||
@@ -61,6 +65,9 @@ if os.path.exists(CONFIG_FILE):
|
||||
DOCK_ALWAYS_OCCLUDED = config.get("dock_always_occluded", False)
|
||||
DOCK_THEME = config.get("dock_theme", "Pills")
|
||||
DOCK_ICON_SIZE = config.get("dock_icon_size", 20)
|
||||
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)
|
||||
|
||||
NOTIF_POS = config.get(NOTIF_POS_KEY, NOTIF_POS_DEFAULT)
|
||||
|
||||
|
||||
+15509
File diff suppressed because it is too large.
Load diff
@@ -66,6 +66,9 @@ DEFAULTS = {
|
||||
"dock_controls_visible": True,
|
||||
"dock_indicators_visible": True,
|
||||
"dock_applications_visible": True,
|
||||
"workspace_nums": False,
|
||||
"workspace_use_chinese_numerals": False,
|
||||
"workspace_dots": False,
|
||||
"metrics_visible": {
|
||||
"cpu": True,
|
||||
"ram": True,
|
||||
|
||||
+102
-14
@@ -246,8 +246,58 @@ class HyprConfGUI(Window):
|
||||
layout_grid.set_margin_top(5)
|
||||
vbox.add(layout_grid)
|
||||
|
||||
# Workspace mode
|
||||
ws_mode_label = Label(label="Workspace Mode", h_align="start", v_align="center")
|
||||
layout_grid.attach(ws_mode_label, 0, 0, 1, 1)
|
||||
|
||||
ws_mode_combo_container = Gtk.Box(
|
||||
orientation=Gtk.Orientation.HORIZONTAL,
|
||||
halign=Gtk.Align.START,
|
||||
valign=Gtk.Align.CENTER,
|
||||
)
|
||||
self.ws_mode_combo = Gtk.ComboBoxText()
|
||||
self.ws_mode_combo.set_tooltip_text("Select how workspaces are displayed")
|
||||
ws_modes = ["Dots", "Numbers", "Single Button"]
|
||||
for mode in ws_modes:
|
||||
self.ws_mode_combo.append_text(mode)
|
||||
|
||||
# Set current mode based on config
|
||||
current_dots = bind_vars.get("workspace_dots", True)
|
||||
current_nums = bind_vars.get("workspace_nums", False)
|
||||
if current_dots:
|
||||
current_mode = "Dots"
|
||||
elif current_nums:
|
||||
current_mode = "Numbers"
|
||||
else:
|
||||
current_mode = "Single Button"
|
||||
|
||||
try:
|
||||
self.ws_mode_combo.set_active(ws_modes.index(current_mode))
|
||||
except ValueError:
|
||||
self.ws_mode_combo.set_active(0)
|
||||
|
||||
self.ws_mode_combo.connect("changed", self.on_ws_mode_changed)
|
||||
ws_mode_combo_container.add(self.ws_mode_combo)
|
||||
layout_grid.attach(ws_mode_combo_container, 1, 0, 1, 1)
|
||||
|
||||
# Chinese numerals option
|
||||
ws_chinese_label = Label(label="Use Chinese Numerals", h_align="start", v_align="center")
|
||||
layout_grid.attach(ws_chinese_label, 2, 0, 1, 1)
|
||||
ws_chinese_switch_container = Gtk.Box(
|
||||
orientation=Gtk.Orientation.HORIZONTAL,
|
||||
halign=Gtk.Align.START,
|
||||
valign=Gtk.Align.CENTER,
|
||||
)
|
||||
self.ws_chinese_switch = Gtk.Switch(
|
||||
active=bind_vars.get("workspace_use_chinese_numerals", False),
|
||||
sensitive=current_nums # Only enabled when numbers mode is selected
|
||||
)
|
||||
self.ws_chinese_switch.set_tooltip_text("Use Chinese numerals (一, 二, 三...) instead of Arabic numbers")
|
||||
ws_chinese_switch_container.add(self.ws_chinese_switch)
|
||||
layout_grid.attach(ws_chinese_switch_container, 3, 0, 1, 1)
|
||||
|
||||
position_label = Label(label="Dock Position", h_align="start", v_align="center")
|
||||
layout_grid.attach(position_label, 0, 0, 1, 1)
|
||||
layout_grid.attach(position_label, 0, 1, 1, 1)
|
||||
position_combo_container = Gtk.Box(
|
||||
orientation=Gtk.Orientation.HORIZONTAL,
|
||||
halign=Gtk.Align.START,
|
||||
@@ -265,10 +315,10 @@ class HyprConfGUI(Window):
|
||||
self.position_combo.set_active(0)
|
||||
self.position_combo.connect("changed", self.on_position_changed)
|
||||
position_combo_container.add(self.position_combo)
|
||||
layout_grid.attach(position_combo_container, 1, 0, 1, 1)
|
||||
layout_grid.attach(position_combo_container, 1, 1, 1, 1)
|
||||
|
||||
dock_theme_label = Label(label="Dock Theme", h_align="start", v_align="center")
|
||||
layout_grid.attach(dock_theme_label, 2, 0, 1, 1)
|
||||
layout_grid.attach(dock_theme_label, 2, 1, 1, 1)
|
||||
dock_theme_combo_container = Gtk.Box(
|
||||
orientation=Gtk.Orientation.HORIZONTAL,
|
||||
halign=Gtk.Align.START,
|
||||
@@ -284,11 +334,11 @@ class HyprConfGUI(Window):
|
||||
except ValueError:
|
||||
self.dock_theme_combo.set_active(0)
|
||||
dock_theme_combo_container.add(self.dock_theme_combo)
|
||||
layout_grid.attach(dock_theme_combo_container, 3, 0, 1, 1)
|
||||
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")
|
||||
layout_grid.attach(icon_size_label, 0, 3, 1, 1)
|
||||
layout_grid.attach(icon_size_label, 0, 4, 1, 1)
|
||||
|
||||
icon_size_scale_container = Gtk.Box(
|
||||
orientation=Gtk.Orientation.HORIZONTAL,
|
||||
@@ -307,10 +357,10 @@ 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, 3, 3, 1)
|
||||
layout_grid.attach(icon_size_scale_container, 1, 4, 3, 1)
|
||||
|
||||
dock_label = Label(label="Show Dock", h_align="start", v_align="center")
|
||||
layout_grid.attach(dock_label, 0, 1, 1, 1)
|
||||
layout_grid.attach(dock_label, 0, 2, 1, 1)
|
||||
dock_switch_container = Gtk.Box(
|
||||
orientation=Gtk.Orientation.HORIZONTAL,
|
||||
halign=Gtk.Align.START,
|
||||
@@ -319,12 +369,12 @@ class HyprConfGUI(Window):
|
||||
self.dock_switch = Gtk.Switch(active=bind_vars.get("dock_enabled", True))
|
||||
self.dock_switch.connect("notify::active", self.on_dock_enabled_changed)
|
||||
dock_switch_container.add(self.dock_switch)
|
||||
layout_grid.attach(dock_switch_container, 1, 1, 1, 1)
|
||||
layout_grid.attach(dock_switch_container, 1, 2, 1, 1)
|
||||
|
||||
dock_auto_hide_label = Label(
|
||||
label="Auto-hide Dock", h_align="start", v_align="center"
|
||||
)
|
||||
layout_grid.attach(dock_auto_hide_label, 0, 2, 1, 1)
|
||||
layout_grid.attach(dock_auto_hide_label, 0, 3, 1, 1)
|
||||
dock_auto_hide_switch_container = Gtk.Box(
|
||||
orientation=Gtk.Orientation.HORIZONTAL,
|
||||
halign=Gtk.Align.START,
|
||||
@@ -335,12 +385,12 @@ class HyprConfGUI(Window):
|
||||
sensitive=self.dock_switch.get_active(),
|
||||
)
|
||||
dock_auto_hide_switch_container.add(self.dock_auto_hide_switch)
|
||||
layout_grid.attach(dock_auto_hide_switch_container, 1, 2, 1, 1)
|
||||
layout_grid.attach(dock_auto_hide_switch_container, 1, 3, 1, 1)
|
||||
|
||||
dock_hover_label = Label(
|
||||
label="Show Dock Only on Hover", h_align="start", v_align="center"
|
||||
)
|
||||
layout_grid.attach(dock_hover_label, 2, 1, 1, 1)
|
||||
layout_grid.attach(dock_hover_label, 2, 2, 1, 1)
|
||||
dock_hover_switch_container = Gtk.Box(
|
||||
orientation=Gtk.Orientation.HORIZONTAL,
|
||||
halign=Gtk.Align.START,
|
||||
@@ -351,12 +401,12 @@ class HyprConfGUI(Window):
|
||||
sensitive=self.dock_switch.get_active(),
|
||||
)
|
||||
dock_hover_switch_container.add(self.dock_hover_switch)
|
||||
layout_grid.attach(dock_hover_switch_container, 3, 1, 1, 1)
|
||||
layout_grid.attach(dock_hover_switch_container, 3, 2, 1, 1)
|
||||
|
||||
notification_pos_label = Label(
|
||||
label="Notification Position", h_align="start", v_align="center"
|
||||
)
|
||||
layout_grid.attach(notification_pos_label, 0, 7, 1, 1)
|
||||
layout_grid.attach(notification_pos_label, 0, 8, 1, 1)
|
||||
|
||||
notification_pos_combo_container = Box(
|
||||
orientation=Gtk.Orientation.HORIZONTAL,
|
||||
@@ -386,7 +436,7 @@ class HyprConfGUI(Window):
|
||||
)
|
||||
|
||||
notification_pos_combo_container.add(self.notification_pos_combo)
|
||||
layout_grid.attach(notification_pos_combo_container, 1, 7, 3, 1)
|
||||
layout_grid.attach(notification_pos_combo_container, 1, 8, 3, 1)
|
||||
|
||||
separator2 = Box(
|
||||
style="min-height: 1px; background-color: alpha(@fg_color, 0.2); margin: 5px 0px;",
|
||||
@@ -457,6 +507,8 @@ class HyprConfGUI(Window):
|
||||
self.component_switches[name] = component_switch
|
||||
item_idx += 1
|
||||
|
||||
|
||||
|
||||
return scrolled_window
|
||||
|
||||
def on_notification_position_changed(self, combo: Gtk.ComboBoxText):
|
||||
@@ -672,6 +724,13 @@ class HyprConfGUI(Window):
|
||||
vbox.add(Box(v_expand=True))
|
||||
return vbox
|
||||
|
||||
def on_ws_mode_changed(self, combo):
|
||||
mode = combo.get_active_text()
|
||||
is_numbers_mode = mode == "Numbers"
|
||||
self.ws_chinese_switch.set_sensitive(is_numbers_mode)
|
||||
if not is_numbers_mode:
|
||||
self.ws_chinese_switch.set_active(False)
|
||||
|
||||
def on_ws_num_changed(self, switch, gparam):
|
||||
is_active = switch.get_active()
|
||||
self.ws_chinese_switch.set_sensitive(is_active)
|
||||
@@ -769,6 +828,14 @@ class HyprConfGUI(Window):
|
||||
switch.get_active()
|
||||
)
|
||||
|
||||
# Save workspace settings
|
||||
ws_mode = self.ws_mode_combo.get_active_text()
|
||||
current_bind_vars_snapshot["workspace_dots"] = ws_mode == "Dots"
|
||||
current_bind_vars_snapshot["workspace_nums"] = ws_mode == "Numbers"
|
||||
current_bind_vars_snapshot["workspace_use_chinese_numerals"] = (
|
||||
self.ws_chinese_switch.get_active()
|
||||
)
|
||||
|
||||
current_bind_vars_snapshot["metrics_visible"] = {
|
||||
k: s.get_active() for k, s in self.metrics_switches.items()
|
||||
}
|
||||
@@ -997,6 +1064,27 @@ class HyprConfGUI(Window):
|
||||
|
||||
for name, switch in self.component_switches.items():
|
||||
switch.set_active(utils.bind_vars.get(f"dock_{name}_visible", True))
|
||||
|
||||
# Reset workspace settings
|
||||
default_dots = DEFAULTS.get("workspace_dots", True)
|
||||
default_nums = DEFAULTS.get("workspace_nums", False)
|
||||
if default_dots:
|
||||
default_mode = "Dots"
|
||||
elif default_nums:
|
||||
default_mode = "Numbers"
|
||||
else:
|
||||
default_mode = "Single Button"
|
||||
|
||||
ws_modes = ["Dots", "Numbers", "Single Button"]
|
||||
try:
|
||||
self.ws_mode_combo.set_active(ws_modes.index(default_mode))
|
||||
except ValueError:
|
||||
self.ws_mode_combo.set_active(0)
|
||||
|
||||
self.ws_chinese_switch.set_active(
|
||||
utils.bind_vars.get("workspace_use_chinese_numerals", False)
|
||||
)
|
||||
self.ws_chinese_switch.set_sensitive(default_nums)
|
||||
self.corners_switch.set_active(utils.bind_vars.get("corners_visible", True))
|
||||
|
||||
metrics_vis_defaults = DEFAULTS.get("metrics_visible", {})
|
||||
|
||||
Reference in new issue
Block a user