From 0b89e9852a3bc02cd835079f7df339ea42111c70 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Fri, 1 Aug 2025 08:46:23 +0545 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(ui):=20add=20zoom=20in/out=20o?= =?UTF-8?q?ptions=20to=20menu=20bar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/assets/icons/misc/control.svg | 3 +++ modules/panel/components/menubar.py | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 config/assets/icons/misc/control.svg diff --git a/config/assets/icons/misc/control.svg b/config/assets/icons/misc/control.svg new file mode 100644 index 0000000..ed4e9d7 --- /dev/null +++ b/config/assets/icons/misc/control.svg @@ -0,0 +1,3 @@ + + + diff --git a/modules/panel/components/menubar.py b/modules/panel/components/menubar.py index 62fc920..8d25855 100644 --- a/modules/panel/components/menubar.py +++ b/modules/panel/components/menubar.py @@ -195,11 +195,16 @@ class MenuBarDropdowns: parent=parent, dropdown_children=[ dropdown_option( - "Zoom", - on_clicked=lambda _: subprocess.run( - "bash ~/.config/scripts/zoomer.sh", shell=True - ), + "Zoom In", + "󰍉 +", + on_click="hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float * 1.1')", ), + dropdown_option( + "Zoom Out", + "󰍉 -", + on_click="hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '(.float * 0.9) | if . < 1 then 1 else . end')", + ), + dropdown_divider("---------------------"), dropdown_option( "Move Window to Left", on_click="hyprctl dispatch movewindow l",