Certainly! Finding a lightweight Linux desktop environment that supports vertically stacked workspaces and allows switching using mouse movement to the top and bottom borders can be a bit niche, but it is possible. Here are a couple of options that you might consider:
1. i3 Window Manager
i3 is a tiling window manager, not a traditional desktop environment, but it's extremely lightweight and highly customizable.
- Vertical Workspaces: i3 allows you to configure workspaces in any arrangement you like, including vertical stacking.
- Mouse Navigation: You can configure i3 to switch workspaces by moving the mouse to the top or bottom edges of the screen.
Configuration Example:
You can edit the i3 configuration file (~/.config/i3/config) to set up vertical workspaces and mouse bindings.
# Define vertical workspaces
workspace 1; move workspace to output left
workspace 2; move workspace to output right
workspace 3; move workspace to output left
workspace 4; move workspace to output right
# Bind workspace switching to mouse movements
bindsym $mod+Shift+Left workspace prev
bindsym $mod+Shift+Right workspace next
# You may need additional configuration to detect mouse movement to edges
Note: i3 requires some configuration to achieve the exact behavior you want, but it is very powerful once set up.
2. Xmonad (with xmonad-contrib)
Xmonad is another tiling window manager that is highly configurable.
- Vertical Workspaces: Like i3, you can configure Xmonad to have vertically stacked workspaces.
- Mouse Navigation: You can use
xmonad-contrib to bind workspace switching to mouse movements.
Configuration Example:
Edit the Xmonad configuration file (~/.xmonad/xmonad.hs).
import XMonad
import XMonad.Hooks.EwmhDesktops
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.SetWMName
import XMonad.Util.Run(spawnPipe)
import XMonad.Hooks.MouseGestures.Simple(simpleMouse)
main = do
xmproc <- spawnPipe "xmobar"
let config = defaultConfig
{ manageHook = manageHook defaultConfig
`composeManageHook` manageDocks
, layoutHook = avoidStruts $ layoutHook defaultConfig
, logHook = dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 50
}
, handleEventHook = simpleMouse [(MButton 1, [(MMotion, XMonad.Workspace.prev)])]
}
`additionalKeys`
[ ((modMask .|. shiftMask, xK_Left ), sendMessage (IncMaster 1))
, ((modMask .|. shiftMask, xK_Right), sendMessage (IncMaster (-1)))
]
xmonad $ docks $ ewmh $ config
-- This part configures the mouse gestures
simpleMouse :: [(MouseMask, [(MouseMask, XMonad.Actions.Mouse.MouseAction))]]
simpleMouse = [(MButton 1, [(MMotion, XMonad.Actions.Mouse.prev)])]
3. Awesome Window Manager
Awesome is another highly configurable, lightweight tiling window manager.
- Vertical Workspaces: You can configure Awesome to have vertically stacked workspaces.
- Mouse Navigation: You can bind mouse movements to switch workspaces.
Configuration Example:
Edit the Awesome configuration file (~/.config/awesome/rc.lua).
-- Define tags (workspaces)
tags = {
names = { "term", "www", "code", "misc" },
layout = {
awful.layout.suit.tile,
awful.layout.suit.tile,
awful.layout.suit.tile,
awful.layout.suit.tile
}
}
-- Mouse bindings
root.buttons(gears.table.join(
awful.button({ }, 4, awful.tag.viewprev), -- Scroll up
awful.button({ }, 5, awful.tag.viewnext) -- Scroll down
))
-- Configure tags to be vertical
for s = 1, screen.count() do
awful.tag(tags.names, s, tags.layout[s])
end
Conclusion
While traditional desktop environments like GNOME, KDE, or XFCE may not offer this specific functionality out of the box, tiling window managers like i3, Xmonad, and Awesome provide the flexibility to configure exactly what you need. They require some initial setup but offer powerful and lightweight solutions.