forked from Shinonome/dots-hyprland
smooth zooming
This commit is contained in:
@@ -183,8 +183,10 @@ bindd = Ctrl+Shift+Alt+Super, Delete, Shutdown, exec, systemctl poweroff || logi
|
|||||||
|
|
||||||
##! Screen
|
##! Screen
|
||||||
# Zoom
|
# Zoom
|
||||||
binde = Super, Minus, exec, ~/.config/hypr/hyprland/scripts/zoom.sh decrease 0.1 # Zoom out
|
binde = Super, Minus, exec, qs ipc call zoom zoomOut # Zoom out
|
||||||
binde = Super, Equal, exec, ~/.config/hypr/hyprland/scripts/zoom.sh increase 0.1 # Zoom in
|
binde = Super, Equal, exec, qs ipc call zoom zoomIn # Zoom in
|
||||||
|
binde = Super, Minus, exec, qs ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh decrease 0.1 # [hidden] Zoom out
|
||||||
|
binde = Super, Equal, exec, qs ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh increase 0.1 # [hidden] Zoom in
|
||||||
|
|
||||||
##! Media
|
##! Media
|
||||||
bindl= Super+Shift, N, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"` # Next track
|
bindl= Super+Shift, N, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"` # Next track
|
||||||
|
|||||||
@@ -14,6 +14,14 @@ Singleton {
|
|||||||
property bool workspaceShowNumbers: false
|
property bool workspaceShowNumbers: false
|
||||||
property bool superReleaseMightTrigger: true
|
property bool superReleaseMightTrigger: true
|
||||||
|
|
||||||
|
property real screenZoom: 1
|
||||||
|
onScreenZoomChanged: {
|
||||||
|
Quickshell.execDetached(["hyprctl", "keyword", "cursor:zoom_factor", root.screenZoom.toString()]);
|
||||||
|
}
|
||||||
|
Behavior on screenZoom {
|
||||||
|
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||||
|
}
|
||||||
|
|
||||||
// When user is not reluctant while pressing super, they probably don't need to see workspace numbers
|
// When user is not reluctant while pressing super, they probably don't need to see workspace numbers
|
||||||
onSuperReleaseMightTriggerChanged: {
|
onSuperReleaseMightTriggerChanged: {
|
||||||
workspaceShowNumbersTimer.stop()
|
workspaceShowNumbersTimer.stop()
|
||||||
@@ -41,4 +49,16 @@ Singleton {
|
|||||||
workspaceShowNumbers = false
|
workspaceShowNumbers = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IpcHandler {
|
||||||
|
target: "zoom"
|
||||||
|
|
||||||
|
function zoomIn() {
|
||||||
|
screenZoom = Math.min(screenZoom + 0.4, 3.0)
|
||||||
|
}
|
||||||
|
|
||||||
|
function zoomOut() {
|
||||||
|
screenZoom = Math.max(screenZoom - 0.4, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user