summaryrefslogtreecommitdiff
path: root/scroll
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2025-07-26 14:50:35 -0500
committerzachir <zachir@librem.one>2025-07-26 14:50:35 -0500
commit5281faa31a986d16e12c3ec44597d6fc570924cd (patch)
tree70ac8f0fc3c8e2deb57b3e9f5055c36e88a72272 /scroll
parent952633dbe9b7d6896e771fe8225cab8e963ff833 (diff)
parent5407b39d082fef72ac526ac1fe9a98565cdefbaf (diff)
Merge branch 'master' into cla
Diffstat (limited to 'scroll')
-rw-r--r--scroll/config21
-rw-r--r--scroll/scripts/maximize.lua42
2 files changed, 56 insertions, 7 deletions
diff --git a/scroll/config b/scroll/config
index 34eaaee..6655223 100644
--- a/scroll/config
+++ b/scroll/config
@@ -43,6 +43,10 @@ exec hyprpaper
#
# You can get the names of your outputs by running: scrollmsg -t get_outputs
+#output eDP-1 resolution 1920x1080 position 0 0
+#output HDMI-A-1 resolution 1920x1080 position 1920 0
+#output DP-2 resolution 1920x1080 position 0 0
+
### Idle configuration
#
# Example configuration:
@@ -78,9 +82,9 @@ exec hyprpaper
default_border pixel 2
gaps inner 4
gaps outer 20
-client.focused #15439e #000000 #e0e0e0 #2e9ef4 #15439e
-client.focused_inactive #595959 #000000 #e0e0e0 #2e9ef4 #595959
-client.unfocused #595959 #000000 #e0e0e0 #2e9ef4 #595959
+client.focused #198844 #000000 #e0e0e0 #198844 #198844
+client.focused_inactive #1b1d1c #000000 #e0e0e0 #1b1d1c #1b1d1c
+client.unfocused #1b1d1c #000000 #e0e0e0 #1b1d1c #1b1d1c
# Idle inhibit for fullscreen windows
for_window [all] inhibit_idle fullscreen
@@ -184,7 +188,6 @@ animations {
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
- bindsym $mod+0 workspace number 10
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1; workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2; workspace number 2
@@ -195,12 +198,13 @@ animations {
bindsym $mod+Shift+7 move container to workspace number 7; workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8; workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9; workspace number 9
- bindsym $mod+Shift+0 move container to workspace number 10; workspace number 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
- bindsym $mod+Ctrl+1 move workspace to output left
- bindsym $mod+Ctrl+2 move workspace to output right
+ bindsym $mod+Shift+Ctrl+h move container to output left
+ bindsym $mod+Shift+Ctrl+j move container to output down
+ bindsym $mod+Shift+Ctrl+k move container to output up
+ bindsym $mod+Shift+Ctrl+l move container to output right
# Scaling
# Workspace
@@ -240,6 +244,9 @@ animations {
bindsym $mod+Shift+f fullscreen_application toggle
bindsym $mod+Ctrl+Alt+f fullscreen_application reset
+ # Maximize, not fullscreen
+ bindsym $mod+m lua $scripts/maximize.lua toggle
+
# Toggle the current focus between tiling and floating mode
bindsym $mod+y focus mode_toggle
# Toggle layout type (h<->v)
diff --git a/scroll/scripts/maximize.lua b/scroll/scripts/maximize.lua
new file mode 100644
index 0000000..f0df156
--- /dev/null
+++ b/scroll/scripts/maximize.lua
@@ -0,0 +1,42 @@
+local args, state = ...
+
+-- Set up views table
+local views = scroll.state_get_value(state, "views")
+if views == nil then
+ scroll.state_set_value(state, "views", {})
+ views = scroll.state_get_value(state, "views")
+end
+
+local function find_view(view)
+ for _, v in ipairs(views) do
+ if v["object"] == view then
+ return v
+ end
+ end
+ return nil
+end
+
+if args[1] == 'toggle' then
+ local focused_view = scroll.focused_view()
+ local view = find_view(focused_view)
+ if view == nil then
+ view = {
+ object = focused_view,
+ maximized = false,
+ wf = 0,
+ hf = 0
+ }
+ table.insert(views, view)
+ end
+ view["maximized"] = not view["maximized"]
+ if view["maximized"] then
+ local container = scroll.view_get_container(focused_view)
+ view["wf"] = scroll.container_get_width_fraction(container)
+ view["hf"] = scroll.container_get_height_fraction(container)
+ scroll.command(nil, "set_size h 1.0")
+ scroll.command(nil, "set_size v 1.0")
+ else
+ scroll.command(nil, "set_size h " .. view["wf"])
+ scroll.command(nil, "set_size v " .. view["hf"])
+ end
+end