diff --git a/nwg_shell_config/langs/en_US.json b/nwg_shell_config/langs/en_US.json index fd382fd..75a4c01 100644 --- a/nwg_shell_config/langs/en_US.json +++ b/nwg_shell_config/langs/en_US.json @@ -11,6 +11,8 @@ "all-of-type": "All of this type", "allow-small-split": "Allow small split", "allow-small-split-tooltip": "Enable adding additional master windows in a horizontal split style.", + "allow-tearing": "Allow tearing", + "allow-tearing-tooltip": "Master switch for allowing tearing to occur.", "always-center-master": "Always center master", "always-center-master-tooltip": "When using orientation=center, keep the master window centered, even when it is the only window in the workspace.", "always-show": "Always show", @@ -44,6 +46,7 @@ "backgrounds": "Backgrounds", "before-sleep": "Before sleep", "before-sleep-tooltip": "Command to execute before systemd puts the computer to sleep.", + "blur-background": "Blur background", "bottom": "Bottom", "bottom-center": "Bottom Center", "bottom-left": "Bottom Left", @@ -55,6 +58,8 @@ "check-updates": "Check updates", "clickfinger-behavior": "Clickfinger behavior", "clickfinger-behavior-tooltip": "Button presses with 1, 2, or 3 fingers will be mapped to LMB, RMB, and MMB respectively.\nThis disables interpretation of clicks based on location on the touchpad.", + "click-method": "Click method", + "click-method-tooltip": "button_areas (default) - left/middle/right button click when pressing down the touchpad in specific areas (bottom left, middle and right by default)\nclickfinger - left/middle/right button click when pressing down the touchpad with 1, 2 or 3 fingers", "clipboard-history": "Clipboard history", "clipboard-history-tooltip": "Determines whether to store clipboard history to cliphist (add commands to autostart).", "close": "Close", @@ -194,6 +199,8 @@ "keywords-tooltip": "Comma-separated list of keywords", "latitude": "Latitude", "latitude-tooltip": "your location latitude: `wlsunset -l", + "launcher-at-start": "Launcher at start", + "launcher-at-start-tooltip": "Show launcher button at the beginning of the dock", "leave-blank-to-use-above": "Leave blank to use the above.", "layers-hog-keyboard-focus": "Layers hog keyboard focus", "layers-hog-keyboard-focus-tooltip": "If true, will make keyboard-interactive layers keep their focus on mouse move (e.g. panel, launchers)", diff --git a/nwg_shell_config/langs/pl_PL.json b/nwg_shell_config/langs/pl_PL.json index 2d1c754..ec1cc40 100644 --- a/nwg_shell_config/langs/pl_PL.json +++ b/nwg_shell_config/langs/pl_PL.json @@ -11,6 +11,8 @@ "all-of-type": "Wszystkie tego typu", "allow-small-split": "Zezwól na mały podział", "allow-small-split-tooltip": "Umożliwia dodawanie dodatkowych okien Master w stylu podziału poziomego.", + "allow-tearing": "Zezwalaj na tearing", + "allow-tearing-tooltip": "Główny przełącznik dla ustawień tearingu.", "always-center-master": "Zawsze centruj master", "always-center-master-tooltip": "Gdy użyto orientacji 'środek', trzymaj okno master wycentrowane, nawet gdy jest jedynym w tym obszarze roboczym.", "always-show": "Zawsze wyświetlaj", @@ -24,7 +26,7 @@ "applications": "Aplikacje", "apply": "Zastosuj", "apply-tooltip": "Zastosuj zmiany, wyeksportuj pliki, przeładuj sway.", - "auto-show-hide": "Automatyczne wyświetlanie/ukrywanie", + "auto-show-hide": "Auto-wyświetlanie/ukrywanie", "auto-show-hide-tooltip": "Automatycznie ukrywaj, wyświetl po wskazaniu hotspota myszą.", "autotiling": "Autotiling", "autotiling-tooltip": "Automatyzuje zmianę poziom/pion orientacji podziału okna.", @@ -44,6 +46,7 @@ "backgrounds": "Tapety", "before-sleep": "Przed uśpieniem", "before-sleep-tooltip": "Komenda do wykonania zanim `systemd` uśpi komputer.", + "blur-background": "Rozmyj tło", "bottom": "Dół", "bottom-center": "Dół Środek", "bottom-left": "Dół Lewo", @@ -55,6 +58,8 @@ "check-updates": "Sprawdź aktualizacje", "clickfinger-behavior": "Zachowanie palca klikającego", "clickfinger-behavior-tooltip": "Button presses with 1, 2, or 3 fingers will be mapped to LMB, RMB, and MMB respectively.\nThis disables interpretation of clicks based on location on the touchpad.", + "click-method": "Metoda kliknięcia", + "click-method-tooltip": "button_areas (domyślne) - kliknięcie lewym/środkowym/prawym przyciskiem po naciśnięciu touchpada w określonych obszarach (domyślnie w lewym dolnym, środkowym i prawym dolnym rogu)\nclickfinger - kliknięcie lewym/środkowym/prawym przyciskiem po naciśnięciu touchpada 1, 2 lub 3 palcami", "clipboard-history": "Historia schowka", "clipboard-history-tooltip": "Określa czy zapisywać historię schowka w cliphist (dodaje komendy do autostart).", "close": "Zamknij", @@ -194,6 +199,8 @@ "keywords-tooltip": "Lista słów kluczowych, rozdzielonych przecinkiem.", "latitude": "Szerokość", "latitude-tooltip": "Twoja szerokość geograficzna: `wlsunset -l`", + "launcher-at-start": "Launcher na początku", + "launcher-at-start-tooltip": "Wyświetla przycisk launchera na początku doku", "leave-blank-to-use-above": "Zostać puste by użyć powyższych.", "layers-hog-keyboard-focus": "Żarłoczny fokus klawiatury na warstwach", "layers-hog-keyboard-focus-tooltip": "Jeśli włączony, warstwy używające klawiatury zachowają fokus przy ruchu myszy (n.p. panel, szuflada aplikacji)", diff --git a/nwg_shell_config/main_hyprland.py b/nwg_shell_config/main_hyprland.py index 579c7d4..513585d 100644 --- a/nwg_shell_config/main_hyprland.py +++ b/nwg_shell_config/main_hyprland.py @@ -243,9 +243,9 @@ def preset_menu(preset_id): row.eb.connect("button-press-event", set_up_dock_tab, preset, preset_name) list_box.add(row) - row = SideMenuRow(voc["exit-menu"], margin_start=18) - row.eb.connect("button-press-event", set_up_bar_tab, preset, preset_name) - list_box.add(row) + # row = SideMenuRow(voc["exit-menu"], margin_start=18) + # row.eb.connect("button-press-event", set_up_bar_tab, preset, preset_name) + # list_box.add(row) row = SideMenuRow(voc["notifications"], margin_start=18) row.eb.connect("button-press-event", set_up_notification_tab, preset, preset_name) @@ -389,12 +389,12 @@ def set_up_dock_tab(event_box, event_button, preset, preset_name): grid.attach(content, 1, 0, 1, 1) -def set_up_bar_tab(event_box, event_button, preset, preset_name): - hide_submenus() - global content - content.destroy() - content = bar_tab(preset, preset_name, voc) - grid.attach(content, 1, 0, 1, 1) +# def set_up_bar_tab(event_box, event_button, preset, preset_name): +# hide_submenus() +# global content +# content.destroy() +# content = bar_tab(preset, preset_name, voc) +# grid.attach(content, 1, 0, 1, 1) def set_up_notification_tab(event_box, event_button, preset, preset_name): @@ -709,6 +709,9 @@ def save_includes(): if preset["dock-exclusive"]: cmd_dock += " -x" + if preset["launcher-at-start"]: + cmd_dock += " -lp start" + if "preset-" in settings["panel-preset"]: cmd_dock += " -s {}.css".format(settings["panel-preset"]) elif preset["dock-css"]: @@ -822,6 +825,8 @@ def save_includes(): includes.append(' no_cursor_warps = {}'.format(bool2lower(settings["gen-no_cursor_warps"]))) if settings["gen-no_focus_fallback"]: includes.append(' no_focus_fallback = {}'.format(bool2lower(settings["gen-no_focus_fallback"]))) + if settings["gen-allow_tearing"]: + includes.append(' allow_tearing = {}'.format(bool2lower(settings["gen-allow_tearing"]))) if settings["gen-resize_on_border"]: includes.append(' resize_on_border = {}'.format(bool2lower(settings["gen-resize_on_border"]))) if settings["gen-extend_border_grab_area"]: @@ -943,6 +948,12 @@ def save_includes(): if preset["launcher-super-key"]: includes.append('bindr = SUPER, SUPER_L, exec, $launcher') + includes.append('\n# LAYER RULES') + if preset["launcher-blur-background"]: + includes.append("layerrule = blur, nwg-drawer") + if preset["dock-blur-background"]: + includes.append("layerrule = blur, nwg-dock") + p = os.path.join(config_home, "hypr/includes.conf") print("Saving includes to {}".format(p)) save_list_to_text_file(includes, p) @@ -1017,6 +1028,7 @@ def load_settings(): "gen-resize_on_border": False, "gen-extend_border_grab_area": 15, "gen-hover_icon_on_border": True, + "gen-allow_tearing": False, "dwindle-use-settings": True, "dwindle-pseudotile": False, @@ -1152,6 +1164,7 @@ def load_presets(): def load_preset(file_name): defaults = { "panel-css": "", + "launcher-at-start": False, "launcher-columns": 6, "launcher-icon-size": 64, "launcher-file-search-columns": 2, @@ -1167,6 +1180,7 @@ def load_preset(file_name): "launcher-run-through-compositor": False, "launcher-super-key": False, "launcher-output": "Any", + "launcher-blur-background": False, "exit-position": "center", "exit-full": False, "exit-alignment": "middle", @@ -1188,6 +1202,7 @@ def load_preset(file_name): "dock-startup-delay": 0, "dock-css": "", "dock-on": False, + "dock-blur-background": False, "swaync-positionX": "right", "swaync-positionY": "top", "swaync-control-center-width": 500, diff --git a/nwg_shell_config/main_sway.py b/nwg_shell_config/main_sway.py index 22dd116..4777325 100644 --- a/nwg_shell_config/main_sway.py +++ b/nwg_shell_config/main_sway.py @@ -678,6 +678,9 @@ def save_includes(): if preset["dock-exclusive"]: cmd_dock += " -x" + if preset["launcher-at-start"]: + cmd_dock += " -lp start" + if "preset-" in settings["panel-preset"]: cmd_dock += " -s {}.css".format(settings["panel-preset"]) elif preset["dock-css"]: @@ -820,6 +823,7 @@ def save_includes(): lines.append(' natural_scroll {}'.format(settings["touchpad-natural-scroll"])) lines.append(' scroll_factor {}'.format(settings["touchpad-scroll-factor"])) lines.append(' scroll_method {}'.format(settings["touchpad-scroll-method"])) + lines.append(' click_method {}'.format(settings["touchpad-click-method"])) lines.append(' left_handed {}'.format(settings["touchpad-left-handed"])) lines.append(' tap {}'.format(settings["touchpad-tap"])) lines.append(' tap_button_map {}'.format(settings["touchpad-tap-button-map"])) @@ -929,6 +933,7 @@ def load_settings(): "touchpad-drag-lock": "disabled", "touchpad-dwt": "enabled", "touchpad-middle-emulation": "enabled", + "touchpad-click-method": "button_areas", "touchpad-custom-name": "", "touchpad-custom-value": "", "lockscreen-use-settings": True, @@ -1000,6 +1005,7 @@ def load_presets(): def load_preset(file_name): defaults = { "panel-css": "", + "launcher-at-start": False, "launcher-columns": 6, "launcher-icon-size": 64, "launcher-file-search-columns": 2, diff --git a/nwg_shell_config/shell/hyprland-0 b/nwg_shell_config/shell/hyprland-0 index 5f0db9c..a32d4b6 100644 --- a/nwg_shell_config/shell/hyprland-0 +++ b/nwg_shell_config/shell/hyprland-0 @@ -1,5 +1,6 @@ { "panel-css": "hyprland-0.css", + "launcher-at-start": false, "launcher-columns": 6, "launcher-icon-size": 64, "launcher-file-search-columns": 2, diff --git a/nwg_shell_config/shell/hyprland-1 b/nwg_shell_config/shell/hyprland-1 index ae32d5d..95545a2 100644 --- a/nwg_shell_config/shell/hyprland-1 +++ b/nwg_shell_config/shell/hyprland-1 @@ -1,5 +1,6 @@ { "panel-css": "hyprland-1.css", + "launcher-at-start": false, "launcher-columns": 6, "launcher-icon-size": 64, "launcher-file-search-columns": 2, diff --git a/nwg_shell_config/shell/hyprland-2 b/nwg_shell_config/shell/hyprland-2 index e2fdcc0..8a0d6a9 100644 --- a/nwg_shell_config/shell/hyprland-2 +++ b/nwg_shell_config/shell/hyprland-2 @@ -1,5 +1,6 @@ { "panel-css": "hyprland-2.css", + "launcher-at-start": false, "launcher-columns": 6, "launcher-icon-size": 64, "launcher-file-search-columns": 2, diff --git a/nwg_shell_config/shell/hyprland-3 b/nwg_shell_config/shell/hyprland-3 index d1801c8..406ac50 100644 --- a/nwg_shell_config/shell/hyprland-3 +++ b/nwg_shell_config/shell/hyprland-3 @@ -1,5 +1,6 @@ { "panel-css": "hyprland-3.css", + "launcher-at-start": false, "launcher-columns": 6, "launcher-icon-size": 64, "launcher-file-search-columns": 2, diff --git a/nwg_shell_config/shell/preset-0 b/nwg_shell_config/shell/preset-0 index b39e2da..9b2fa60 100644 --- a/nwg_shell_config/shell/preset-0 +++ b/nwg_shell_config/shell/preset-0 @@ -1,5 +1,6 @@ { "panel-css": "preset-0.css", + "launcher-at-start": false, "launcher-columns": 6, "launcher-icon-size": 64, "launcher-file-search-columns": 2, diff --git a/nwg_shell_config/shell/preset-1 b/nwg_shell_config/shell/preset-1 index 9225329..67206e7 100644 --- a/nwg_shell_config/shell/preset-1 +++ b/nwg_shell_config/shell/preset-1 @@ -1,5 +1,6 @@ { "panel-css": "preset-1.css", + "launcher-at-start": false, "launcher-columns": 6, "launcher-icon-size": 64, "launcher-file-search-columns": 2, diff --git a/nwg_shell_config/shell/preset-2 b/nwg_shell_config/shell/preset-2 index 2ec2aac..7902bba 100644 --- a/nwg_shell_config/shell/preset-2 +++ b/nwg_shell_config/shell/preset-2 @@ -1,5 +1,6 @@ { "panel-css": "preset-2.css", + "launcher-at-start": false, "launcher-columns": 6, "launcher-icon-size": 64, "launcher-file-search-columns": 2, diff --git a/nwg_shell_config/shell/preset-3 b/nwg_shell_config/shell/preset-3 index 0c79419..33b1d48 100644 --- a/nwg_shell_config/shell/preset-3 +++ b/nwg_shell_config/shell/preset-3 @@ -1,5 +1,6 @@ { "panel-css": "preset-3.css", + "launcher-at-start": false, "launcher-columns": 6, "launcher-icon-size": 64, "launcher-file-search-columns": 2, diff --git a/nwg_shell_config/ui_components.py b/nwg_shell_config/ui_components.py index 12569f5..c794ed9 100644 --- a/nwg_shell_config/ui_components.py +++ b/nwg_shell_config/ui_components.py @@ -1087,6 +1087,13 @@ def h_general_tab(settings, voc): cb_no_focus_fallback.connect("toggled", set_from_checkbutton, settings, "gen-no_focus_fallback") grid.attach(cb_no_focus_fallback, 1, 6, 1, 1) + cb_allow_tearing = Gtk.CheckButton.new_with_label(voc["allow-tearing"]) + cb_allow_tearing.set_tooltip_text(voc["allow-tearing-tooltip"]) + cb_allow_tearing.set_property("halign", Gtk.Align.START) + cb_allow_tearing.set_active(settings["gen-allow_tearing"]) + cb_allow_tearing.connect("toggled", set_from_checkbutton, settings, "gen-allow_tearing") + grid.attach(cb_allow_tearing, 1, 7, 1, 1) + cb_resize_on_border = Gtk.CheckButton.new_with_label(voc["resize-on-border"]) cb_resize_on_border.set_tooltip_text(voc["resize-on-border"]) cb_resize_on_border.set_property("halign", Gtk.Align.START) @@ -1096,14 +1103,14 @@ def h_general_tab(settings, voc): lbl = Gtk.Label.new("{}:".format(voc["extend-border-grab-area"])) lbl.set_property("halign", Gtk.Align.END) - grid.attach(lbl, 1, 7, 2, 1) + grid.attach(lbl, 1, 8, 2, 1) sb_extend_grab_area = Gtk.SpinButton.new_with_range(0, 365, 1) sb_extend_grab_area.set_property("halign", Gtk.Align.START) sb_extend_grab_area.set_tooltip_text(voc["extend-border-grab-area-tooltip"]) sb_extend_grab_area.set_value(settings["gen-extend_border_grab_area"]) sb_extend_grab_area.connect("value-changed", set_int_from_spinbutton, settings, "gen-extend_border_grab_area") - grid.attach(sb_extend_grab_area, 3, 7, 1, 1) + grid.attach(sb_extend_grab_area, 3, 8, 1, 1) cb_hover = Gtk.CheckButton.new_with_label(voc["hover-icon-on-border"]) cb_hover.set_tooltip_text(voc["hover-icon-on-border-tooltip"]) @@ -1919,23 +1926,36 @@ def touchpad_tab(settings, voc): combo_dwt.connect("changed", set_dict_key_from_combo, settings, "touchpad-dwt") grid.attach(combo_dwt, 3, 7, 1, 1) - lbl = Gtk.Label.new("{}:".format(voc["custom-field"])) + lbl = Gtk.Label.new("{}:".format(voc["click-method"])) lbl.set_property("halign", Gtk.Align.END) grid.attach(lbl, 0, 8, 1, 1) + combo_click_method = Gtk.ComboBoxText() + combo_click_method.set_property("halign", Gtk.Align.START) + combo_click_method.set_tooltip_text(voc["click-method-tooltip"]) + for item in [("button_areas", "button_areas"), ("clickfinger", "clickfinger"), ("none", "None")]: + combo_click_method.append(item[0], item[1]) + combo_click_method.set_active_id(settings["touchpad-click-method"]) + combo_click_method.connect("changed", set_dict_key_from_combo, settings, "touchpad-click-method") + grid.attach(combo_click_method, 1, 8, 1, 1) + + lbl = Gtk.Label.new("{}:".format(voc["custom-field"])) + lbl.set_property("halign", Gtk.Align.END) + grid.attach(lbl, 0, 9, 1, 1) + entry_cname = Gtk.Entry() entry_cname.set_tooltip_text(voc["custom-field-name-tooltip"]) entry_cname.set_placeholder_text(voc["name"]) entry_cname.set_text(settings["touchpad-custom-name"]) entry_cname.connect("changed", set_from_entry, settings, "touchpad-custom-name") - grid.attach(entry_cname, 1, 8, 1, 1) + grid.attach(entry_cname, 1, 9, 1, 1) entry_cname = Gtk.Entry() entry_cname.set_tooltip_text(voc["custom-field-value-tooltip"]) entry_cname.set_placeholder_text(voc["value"]) entry_cname.set_text(settings["touchpad-custom-value"]) entry_cname.connect("changed", set_from_entry, settings, "touchpad-custom-value") - grid.attach(entry_cname, 2, 8, 2, 1) + grid.attach(entry_cname, 2, 9, 2, 1) frame.show_all() @@ -2582,6 +2602,12 @@ def drawer_tab(preset, preset_name, outputs, voc): cb_use_icon_theme.connect("toggled", set_from_checkbutton, preset, "pb-icon-theme") grid.attach(cb_use_icon_theme, 2, 11, 2, 1) + if os.getenv("HYPRLAND_INSTANCE_SIGNATURE"): + cb_h_drawer_blur_bg = Gtk.CheckButton.new_with_label(voc["blur-background"]) + cb_h_drawer_blur_bg.set_active(preset["launcher-blur-background"]) + cb_h_drawer_blur_bg.connect("toggled", set_from_checkbutton, preset, "launcher-blur-background") + grid.attach(cb_h_drawer_blur_bg, 0, 12, 2, 1) + frame.show_all() return frame @@ -2698,103 +2724,115 @@ def dock_tab(preset, preset_name, outputs, voc): cb_permanent.set_active(preset["dock-permanent"]) cb_permanent.connect("toggled", set_from_checkbutton, preset, "dock-permanent") cb_permanent.set_tooltip_text(voc["permanent-tooltip"]) - grid.attach(cb_permanent, 0, 9, 2, 1) + grid.attach(cb_permanent, 0, 9, 1, 1) cb_full = Gtk.CheckButton.new_with_label(voc["full-width-height"]) cb_full.set_active(preset["dock-full"]) cb_full.connect("toggled", set_from_checkbutton, preset, "dock-full") cb_full.set_tooltip_text(voc["full-width-height-tooltip"]) - grid.attach(cb_full, 0, 10, 2, 1) + grid.attach(cb_full, 0, 10, 1, 1) cb_autohide = Gtk.CheckButton.new_with_label(voc["auto-show-hide"]) cb_autohide.set_active(preset["dock-autohide"]) cb_autohide.connect("toggled", set_from_checkbutton, preset, "dock-autohide") cb_autohide.set_tooltip_text(voc["auto-show-hide-tooltip"]) - grid.attach(cb_autohide, 0, 11, 2, 1) + grid.attach(cb_autohide, 0, 11, 1, 1) cb_exclusive = Gtk.CheckButton.new_with_label(voc["exclusive-zone"]) cb_exclusive.set_active(preset["dock-exclusive"]) cb_exclusive.connect("toggled", set_from_checkbutton, preset, "dock-exclusive") cb_exclusive.set_tooltip_text(voc["exclusive-zone-tooltip"]) - grid.attach(cb_exclusive, 0, 12, 1, 1) - - frame.show_all() - - return frame - - -def bar_tab(preset, preset_name, voc): - frame = Gtk.Frame() - frame.set_label(" {}: {} ".format(preset_name, voc["exit-menu"])) - frame.set_label_align(0.5, 0.5) - frame.set_property("hexpand", True) - grid = Gtk.Grid() - frame.add(grid) - grid.set_property("margin", 12) - grid.set_column_spacing(6) - grid.set_row_spacing(6) - - cb_bar_on = Gtk.CheckButton.new_with_label(voc["exit-menu-on"]) - cb_bar_on.set_active(preset["exit-on"]) - cb_bar_on.connect("toggled", set_from_checkbutton, preset, "exit-on") - grid.attach(cb_bar_on, 0, 0, 2, 1) - - lbl = Gtk.Label.new("{}:".format(voc["position"])) - lbl.set_property("halign", Gtk.Align.END) - grid.attach(lbl, 0, 1, 1, 1) - - combo_position = Gtk.ComboBoxText() - combo_position.set_property("halign", Gtk.Align.START) - grid.attach(combo_position, 1, 1, 1, 1) - for item in ["center", "top", "bottom", "left", "right"]: - combo_position.append(item, voc[item]) - combo_position.set_active_id(preset["exit-position"]) - combo_position.connect("changed", set_dict_key_from_combo, preset, "exit-position") - - lbl = Gtk.Label.new("{}:".format(voc["alignment"])) - lbl.set_property("halign", Gtk.Align.END) - grid.attach(lbl, 0, 2, 1, 1) - - combo_alignment = Gtk.ComboBoxText() - combo_alignment.set_property("halign", Gtk.Align.START) - grid.attach(combo_alignment, 1, 2, 1, 1) - for item in ["middle", "start", "end"]: - combo_alignment.append(item, voc[item]) - combo_alignment.set_active_id(preset["exit-alignment"]) - combo_alignment.connect("changed", set_dict_key_from_combo, preset, "exit-alignment") - combo_alignment.set_tooltip_text("Alignment in full width/height.") - - lbl = Gtk.Label.new("{}:".format(voc["icon-size"])) - lbl.set_property("halign", Gtk.Align.END) - grid.attach(lbl, 0, 3, 1, 1) + grid.attach(cb_exclusive, 1, 9, 1, 1) - sb_icon_size = Gtk.SpinButton.new_with_range(8, 256, 1) - sb_icon_size.set_value(preset["exit-icon-size"]) - sb_icon_size.connect("value-changed", set_int_from_spinbutton, preset, "exit-icon-size") - sb_icon_size.set_tooltip_text(voc["item-icon-size-tooltip"]) - grid.attach(sb_icon_size, 1, 3, 1, 1) + cb_launcher_at_start = Gtk.CheckButton.new_with_label(voc["launcher-at-start"]) + cb_launcher_at_start.set_active(preset["launcher-at-start"]) + cb_launcher_at_start.connect("toggled", set_from_checkbutton, preset, "launcher-at-start") + cb_launcher_at_start.set_tooltip_text(voc["launcher-at-start-tooltip"]) + grid.attach(cb_launcher_at_start, 1, 10, 1, 1) - lbl = Gtk.Label.new("{}:".format(voc["margin"])) - lbl.set_property("halign", Gtk.Align.END) - grid.attach(lbl, 0, 4, 1, 1) - - sb_margin = Gtk.SpinButton.new_with_range(0, 256, 1) - sb_margin.set_value(preset["exit-margin"]) - sb_margin.connect("value-changed", set_int_from_spinbutton, preset, "exit-margin") - sb_margin.set_tooltip_text(voc["margin-tooltip"]) - grid.attach(sb_margin, 1, 4, 1, 1) - - cb_full = Gtk.CheckButton.new_with_label(voc["full-width-height"]) - cb_full.set_active(preset["exit-full"]) - cb_full.connect("toggled", set_from_checkbutton, preset, "exit-full") - cb_full.set_tooltip_text(voc["full-width-height-tooltip"]) - grid.attach(cb_full, 0, 5, 2, 1) + if os.getenv("HYPRLAND_INSTANCE_SIGNATURE"): + cb_blur_bg = Gtk.CheckButton.new_with_label(voc["blur-background"]) + cb_blur_bg.set_active(preset["dock-blur-background"]) + cb_blur_bg.connect("toggled", set_from_checkbutton, preset, "dock-blur-background") + grid.attach(cb_blur_bg, 1, 11, 1, 1) frame.show_all() return frame +# def bar_tab(preset, preset_name, voc): +# frame = Gtk.Frame() +# frame.set_label(" {}: {} ".format(preset_name, voc["exit-menu"])) +# frame.set_label_align(0.5, 0.5) +# frame.set_property("hexpand", True) +# grid = Gtk.Grid() +# frame.add(grid) +# grid.set_property("margin", 12) +# grid.set_column_spacing(6) +# grid.set_row_spacing(6) +# +# cb_bar_on = Gtk.CheckButton.new_with_label(voc["exit-menu-on"]) +# cb_bar_on.set_active(preset["exit-on"]) +# cb_bar_on.connect("toggled", set_from_checkbutton, preset, "exit-on") +# grid.attach(cb_bar_on, 0, 0, 2, 1) +# +# lbl = Gtk.Label.new("{}:".format(voc["position"])) +# lbl.set_property("halign", Gtk.Align.END) +# grid.attach(lbl, 0, 1, 1, 1) +# +# combo_position = Gtk.ComboBoxText() +# combo_position.set_property("halign", Gtk.Align.START) +# grid.attach(combo_position, 1, 1, 1, 1) +# for item in ["center", "top", "bottom", "left", "right"]: +# combo_position.append(item, voc[item]) +# combo_position.set_active_id(preset["exit-position"]) +# combo_position.connect("changed", set_dict_key_from_combo, preset, "exit-position") +# +# lbl = Gtk.Label.new("{}:".format(voc["alignment"])) +# lbl.set_property("halign", Gtk.Align.END) +# grid.attach(lbl, 0, 2, 1, 1) +# +# combo_alignment = Gtk.ComboBoxText() +# combo_alignment.set_property("halign", Gtk.Align.START) +# grid.attach(combo_alignment, 1, 2, 1, 1) +# for item in ["middle", "start", "end"]: +# combo_alignment.append(item, voc[item]) +# combo_alignment.set_active_id(preset["exit-alignment"]) +# combo_alignment.connect("changed", set_dict_key_from_combo, preset, "exit-alignment") +# combo_alignment.set_tooltip_text("Alignment in full width/height.") +# +# lbl = Gtk.Label.new("{}:".format(voc["icon-size"])) +# lbl.set_property("halign", Gtk.Align.END) +# grid.attach(lbl, 0, 3, 1, 1) +# +# sb_icon_size = Gtk.SpinButton.new_with_range(8, 256, 1) +# sb_icon_size.set_value(preset["exit-icon-size"]) +# sb_icon_size.connect("value-changed", set_int_from_spinbutton, preset, "exit-icon-size") +# sb_icon_size.set_tooltip_text(voc["item-icon-size-tooltip"]) +# grid.attach(sb_icon_size, 1, 3, 1, 1) +# +# lbl = Gtk.Label.new("{}:".format(voc["margin"])) +# lbl.set_property("halign", Gtk.Align.END) +# grid.attach(lbl, 0, 4, 1, 1) +# +# sb_margin = Gtk.SpinButton.new_with_range(0, 256, 1) +# sb_margin.set_value(preset["exit-margin"]) +# sb_margin.connect("value-changed", set_int_from_spinbutton, preset, "exit-margin") +# sb_margin.set_tooltip_text(voc["margin-tooltip"]) +# grid.attach(sb_margin, 1, 4, 1, 1) +# +# cb_full = Gtk.CheckButton.new_with_label(voc["full-width-height"]) +# cb_full.set_active(preset["exit-full"]) +# cb_full.connect("toggled", set_from_checkbutton, preset, "exit-full") +# cb_full.set_tooltip_text(voc["full-width-height-tooltip"]) +# grid.attach(cb_full, 0, 5, 2, 1) +# +# frame.show_all() +# +# return frame + + def notification_tab(preset, preset_name, voc): frame = Gtk.Frame() frame.set_label(" {}: Notification center ".format(preset_name)) diff --git a/setup.py b/setup.py index a72b6bc..c141ecf 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ def read(f_name): setup( name='nwg-shell-config', - version='0.5.46', + version='0.5.47', description='nwg-shell configuration utility', packages=find_packages(), include_package_data=True,