From ac700e2efa3479460b565d1542725da3c2c6c68c Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 26 Jul 2025 12:56:35 -0500 Subject: Add $home variable for scroll --- .gitignore | 1 + Makefile | 14 ++++++++++++-- scroll/config | 2 ++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3dcf353..6bd8fea 100644 --- a/.gitignore +++ b/.gitignore @@ -237,6 +237,7 @@ RVXX EXEX.settings RVXX v2/ RVXX v2.settings SchildiChat/ +scroll/user.conf Serenity/ Session/ Shibalba EXEX.settings diff --git a/Makefile b/Makefile index ac56da3..3f6f51c 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ DCONFS := doas.conf all: -install: install-hyprplugins install-zshconfigs install-shconfigs vimplug-vim +install: install-hyprplugins install-zshconfigs install-shconfigs vimplug-vim install-scrollconf install-hyprplugins: install-hyprsplit install-hyprland-plugins @@ -32,6 +32,16 @@ install-hyprland-plugins: @hyprpm enable hyprscrolling @echo "Done." +install-scrollconf: scroll/user.conf + @echo "Installing user.conf..." + @sudo ln -sf `pwd`/scroll/user.conf /etc/scroll/config.d/user.conf + @echo "Done." + +scroll/user.conf: + @echo "Generating user.conf..." + @echo 'set $$home' $(shell echo $(HOME)) > scroll/user.conf + @echo "Done." + install-zshconfigs: install-shconfigs @echo "Settings up ZDOTDIR..." @echo "Installing .zprofile..." @@ -58,4 +68,4 @@ doas-conf: $(DCONFS) @sudo cp -n doas.conf /etc/doas.conf @echo "Done." -.PHONY: install-hyprplugins install-zshconfigs install-shconfigs vimplug-vim doas-conf install +.PHONY: install-hyprplugins install-zshconfigs install-shconfigs vimplug-vim doas-conf install install-scrollconf diff --git a/scroll/config b/scroll/config index c715eed..e1b0f0e 100644 --- a/scroll/config +++ b/scroll/config @@ -6,6 +6,8 @@ # # Read `man 5 scroll` for a complete reference. +include /etc/scroll/config.d/* + ### Variables # # Logo key. Use Mod1 for Alt. -- cgit v1.2.3 From 85559e966fd1e29374c759c697ac9c5757750d3c Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 26 Jul 2025 12:56:55 -0500 Subject: Move bash in Makefile and make it phony --- Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 3f6f51c..ce4171e 100644 --- a/Makefile +++ b/Makefile @@ -10,14 +10,6 @@ install: install-hyprplugins install-zshconfigs install-shconfigs vimplug-vim in install-hyprplugins: install-hyprsplit install-hyprland-plugins -install-bashconfigs: $(BCONFS) install-shconfigs - @echo "Installing bash conf files..." - @echo ".bashrc..." - @ln -sf `pwd`/bash/.bashrc ~/.bashrc - @echo ".bash_logout..." - @ln -sf `pwd`/bash/.bash_logout ~/.bash_logout - @echo "Done." - install-hyprsplit: @echo "Installing hyprsplit..." @hyprpm add https://github.com/shezdy/hyprsplit || echo "Already installed!" @@ -42,6 +34,14 @@ scroll/user.conf: @echo 'set $$home' $(shell echo $(HOME)) > scroll/user.conf @echo "Done." +install-bashconfigs: $(BCONFS) install-shconfigs + @echo "Installing bash conf files..." + @echo ".bashrc..." + @ln -sf `pwd`/bash/.bashrc ~/.bashrc + @echo ".bash_logout..." + @ln -sf `pwd`/bash/.bash_logout ~/.bash_logout + @echo "Done." + install-zshconfigs: install-shconfigs @echo "Settings up ZDOTDIR..." @echo "Installing .zprofile..." @@ -68,4 +68,4 @@ doas-conf: $(DCONFS) @sudo cp -n doas.conf /etc/doas.conf @echo "Done." -.PHONY: install-hyprplugins install-zshconfigs install-shconfigs vimplug-vim doas-conf install install-scrollconf +.PHONY: install-hyprplugins install-zshconfigs install-shconfigs vimplug-vim doas-conf install install-scrollconf install-bashconfigs -- cgit v1.2.3 From 5462f87978dfa2d09d90dc3497852d03c007b5d1 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 26 Jul 2025 12:57:55 -0500 Subject: Hide the bar in scroll --- scroll/config | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/scroll/config b/scroll/config index e1b0f0e..222f6cd 100644 --- a/scroll/config +++ b/scroll/config @@ -25,7 +25,6 @@ set $dmenu dmenu_run -l 15 # Your preferred file manager set $filemanager kitty -e lf -bar mode invisible exec waybar exec hypridle exec hyprpaper @@ -501,18 +500,19 @@ bindgesture swipe:4:up scale_workspace overview # # Read `man 5 scroll-bar` for more information about this section. bar { - position top - - # When the status_command prints a new line to stdout, scrollbar updates. - # The default just shows the current date and time. - status_command while date +'%Y-%m-%d %X'; do sleep 1; done - - colors { - statusline #ffffff - background #323232 - inactive_workspace #32323200 #32323200 #5c5c5c - scroller #2F343AFF #055E20FF #FFFFFFFF - } + mode invisible + + #position top + + ## When the status_command prints a new line to stdout, scrollbar updates. + ## The default just shows the current date and time. + #status_command while date +'%Y-%m-%d %X'; do sleep 1; done + + #colors { + # statusline #ffffff + # background #323232 + # inactive_workspace #32323200 #32323200 #5c5c5c + # scroller #2F343AFF #055E20FF #FFFFFFFF + #} } # -# include /etc/scroll/config.d/* -- cgit v1.2.3 From 024301a886470f528cdd27b7911f1bd9b76e554f Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 26 Jul 2025 12:58:23 -0500 Subject: Fix closing windows in scroll --- scroll/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scroll/config b/scroll/config index 222f6cd..86f26df 100644 --- a/scroll/config +++ b/scroll/config @@ -130,7 +130,7 @@ animations { bindsym $mod+Shift+c reload # Closes the active application (hopefully) - bindsym $mod+Shift+q view_close + bindsym $mod+Shift+q kill # Exit scroll (logs you out of your Wayland session) bindsym $mod+Shift+e exec scrollnag -t warning -m 'You pressed the exit shortcut. Do you really want to exit scroll? This will end your Wayland session.' -B 'Yes, exit scroll' 'scrollmsg exit' -- cgit v1.2.3 From 5a20ce5c913f79f3e9192dc85c469b1929685d2e Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 26 Jul 2025 12:58:55 -0500 Subject: Rebind fullscreen global and toggle float in scroll --- scroll/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scroll/config b/scroll/config index 86f26df..3e06009 100644 --- a/scroll/config +++ b/scroll/config @@ -233,7 +233,7 @@ animations { # # Make the current focus fullscreen bindsym $mod+f fullscreen - bindsym $mod+Ctrl+f fullscreen global + bindsym $mod+Shift+f fullscreen global bindsym $mod+Alt+f fullscreen_application toggle bindsym $mod+Ctrl+Alt+f fullscreen_application reset @@ -243,7 +243,7 @@ animations { bindsym $mod+Shift+y layout_transpose # Float a window - bindsym $mod+Shift+f floating toggle + bindsym $mod+Shift+space floating toggle # Toggle sticky bindsym $mod+Shift+Ctrl+a sticky toggle -- cgit v1.2.3 From 3b4aabf936aeca88f325183f1a7895f0a5b263a9 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 26 Jul 2025 12:59:11 -0500 Subject: Remove default scroll scratchpad bindings --- scroll/config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scroll/config b/scroll/config index 3e06009..9c25c8c 100644 --- a/scroll/config +++ b/scroll/config @@ -270,14 +270,14 @@ animations { # You can send windows there and get them back later. # Move the currently focused window to the scratchpad - bindsym $mod+Shift+z move scratchpad + #bindsym $mod+Shift+z move scratchpad # Show the next scratchpad window or hide the focused scratchpad window. # If there are multiple scratchpad windows, this command cycles through them. - bindsym $mod+z scratchpad show - bindsym --no-repeat $mod+Alt+z scratchpad jump + #bindsym $mod+z scratchpad show + #bindsym --no-repeat $mod+Alt+z scratchpad jump - bindsym $mod+Ctrl+z workspace back_and_forth + #bindsym $mod+Ctrl+z workspace back_and_forth # # Mode modifiers -- cgit v1.2.3 From 453206c3c82d2a305ffe1634a1609cc740ddb4e5 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 26 Jul 2025 12:59:37 -0500 Subject: Set XF86 keys to my scripts --- scroll/config | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scroll/config b/scroll/config index 9c25c8c..d9596be 100644 --- a/scroll/config +++ b/scroll/config @@ -461,10 +461,10 @@ bindsym $mod+g mode "spaces" # Utilities: # # Special keys to adjust volume via PulseAudio - bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle - bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5% - bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5% - bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle + bindsym --locked XF86AudioMute exec volsv -t + bindsym --locked XF86AudioLowerVolume exec volsv -d + bindsym --locked XF86AudioRaiseVolume exec volsv -i + bindsym --locked XF86AudioMicMute exec volsv -m # Special keys to control media via playerctl bindsym --locked XF86AudioPlay exec playerctl play-pause @@ -474,8 +474,8 @@ bindsym $mod+g mode "spaces" bindsym --locked XF86AudioStop exec playerctl stop # Special keys to adjust brightness via brightnessctl - bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- - bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+ + bindsym --locked XF86MonBrightnessDown exec bl -d + bindsym --locked XF86MonBrightnessUp exec bl -i # Special key to take a screenshot with grim bindsym Print exec grim -- cgit v1.2.3 From dc3897a61769a24cecb4f1ab8385c0cf6d21e4d4 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 26 Jul 2025 12:59:57 -0500 Subject: Add dmenu scripts to scroll --- scroll/config | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scroll/config b/scroll/config index d9596be..cb19b70 100644 --- a/scroll/config +++ b/scroll/config @@ -480,6 +480,14 @@ bindsym $mod+g mode "spaces" # Special key to take a screenshot with grim bindsym Print exec grim +# Launch lwc librewolf profile interface +bindsym $mod+Alt+w exec lwc +# Launch qbc qutebrowser profile interface +bindsym $mod+Alt+q exec qbc +# Launch dmount dmenu mount script +bindsym $mod+Alt+comma exec dmount +# Launch dmenuumount dmenu umount script +bindsym $mod+Alt+period exec dmenuumount focus_wrapping no -- cgit v1.2.3 From 208a0ff78229e85a4a6ae448aac3c54686ca0585 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 26 Jul 2025 13:00:36 -0500 Subject: Add bare bones of window swallowing to scroll --- scroll/config | 3 +++ scroll/scripts/swallow.lua | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 scroll/scripts/swallow.lua diff --git a/scroll/config b/scroll/config index cb19b70..3c8b0c3 100644 --- a/scroll/config +++ b/scroll/config @@ -496,6 +496,9 @@ bindgesture swipe:4:left workspace prev bindgesture swipe:4:up scale_workspace overview +# Enable window swallowing (of mpv specifically) +lua $home/.config/scroll/scripts/swallow.lua + # # Workspace rules: # diff --git a/scroll/scripts/swallow.lua b/scroll/scripts/swallow.lua new file mode 100644 index 0000000..5760886 --- /dev/null +++ b/scroll/scripts/swallow.lua @@ -0,0 +1,32 @@ +local function candidate(view) + local app_id = scroll.view_get_app_id(view) + if app_id == "mpv" then + local pview = scroll.view_get_parent_view(view) + if pview ~= nil and pview ~= view then + local papp_id = scroll.view_get_app_id(pview) + if papp_id == "kitty" then + return scroll.view_get_container(pview) + end + end + end + return nil +end + +local function on_create(view, _) + local parent = candidate(view) + if parent ~= nil then + scroll.command(parent, "move scratchpad") + end +end + +local function on_destroy(view, _) + local parent = candidate(view) + if parent ~= nil then + scroll.command(nil, "scratchpad show; floating toggle") + end +end + +scroll.add_callback("view_map", on_create, nil) +scroll.add_callback("view_unmap", on_destroy, nil) + + -- cgit v1.2.3 From b35c7ad4db8e604f109f4857a4ed5a1c236caf30 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 26 Jul 2025 13:00:57 -0500 Subject: Add most scratchpads to scroll --- scroll/config | 32 ++++++++++++++++++++++++++++++++ scroll/scripts/scratchpad.lua | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 scroll/scripts/scratchpad.lua diff --git a/scroll/config b/scroll/config index 3c8b0c3..2b18e24 100644 --- a/scroll/config +++ b/scroll/config @@ -499,6 +499,38 @@ bindgesture swipe:4:up scale_workspace overview # Enable window swallowing (of mpv specifically) lua $home/.config/scroll/scripts/swallow.lua +# Scratchpads +for_window [app_id="sphtop"] move scratchpad +for_window [app_id="sphtop"] scratchpad show +bindsym $mod+Ctrl+z lua $home/.config/scroll/scripts/scratchpad.lua sphtop htop +for_window [app_id="spterm"] move scratchpad +for_window [app_id="spterm"] scratchpad show +bindsym $mod+Ctrl+x lua $home/.config/scroll/scripts/scratchpad.lua spterm +for_window [app_id="sppmxr"] move scratchpad +for_window [app_id="sppmxr"] scratchpad show +bindsym $mod+Ctrl+c lua $home/.config/scroll/scripts/scratchpad.lua sppmxr pulsemixer +for_window [app_id="spblue"] move scratchpad +for_window [app_id="spblue"] scratchpad show +bindsym $mod+Ctrl+v lua $home/.config/scroll/scripts/scratchpad.lua spblue bluetoothctl +for_window [app_id="spncmp"] move scratchpad +for_window [app_id="spncmp"] scratchpad show +bindsym $mod+Ctrl+b lua $home/.config/scroll/scripts/scratchpad.lua spncmp ncmpcpp +for_window [app_id="spmutt"] move scratchpad +for_window [app_id="spmutt"] scratchpad show +bindsym $mod+Ctrl+a lua $home/.config/scroll/scripts/scratchpad.lua spmutt neomutt +for_window [app_id="spprof"] move scratchpad +for_window [app_id="spprof"] scratchpad show +bindsym $mod+Ctrl+s lua $home/.config/scroll/scripts/scratchpad.lua spprof profanity +for_window [app_id="spirss"] move scratchpad +for_window [app_id="spirss"] scratchpad show +bindsym $mod+Ctrl+d lua $home/.config/scroll/scripts/scratchpad.lua spirss irssi +for_window [app_id="sptodo"] move scratchpad +for_window [app_id="sptodo"] scratchpad show +bindsym $mod+Ctrl+f lua $home/.config/scroll/scripts/scratchpad.lua sptodo todo +for_window [app_id="sptrmc"] move scratchpad +for_window [app_id="sptrmc"] scratchpad show +bindsym $mod+Ctrl+g lua $home/.config/scroll/scripts/scratchpad.lua sptrmc tremc + # # Workspace rules: # diff --git a/scroll/scripts/scratchpad.lua b/scroll/scripts/scratchpad.lua new file mode 100644 index 0000000..7e078d6 --- /dev/null +++ b/scroll/scripts/scratchpad.lua @@ -0,0 +1,41 @@ +local args, _ = ... +local id = "" +local spawn = "" + +for i, arg in ipairs(args) do + if i <= 1 then + id = arg + else + spawn = spawn .. " " .. arg + end +end + +local function exists(id) + local is_in_array = false + local cons = scroll.scratchpad_get_containers() + for _, con in ipairs(cons) do + local views = scroll.container_get_views(con) + for _, view in ipairs(views) do + local app_id = scroll.view_get_app_id(view) + if (app_id == id) then + is_in_array = true + end + end + end + return is_in_array +end + +local function is_focused(id) + local view = scroll.focused_view() + local app_id = scroll.view_get_app_id(view) + return app_id == id +end + +if (not exists(id)) then + scroll.command(nil, "exec kitty --class " .. id .. spawn) +end +if (is_focused(id)) then + scroll.command(nill, "scratchpad show") +else + scroll.command(nil, "[app_id=\"" .. id .. "\"] scratchpad show") +end -- cgit v1.2.3