ghettowm

package module
v0.0.0-...-a264540 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2020 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

INACTIVE

I am no longer working on this project. I only use Windows via KVM now and do not have a need for this. I may revisit this project in the future but I do not currently have the time.

For those looking for a tiling desktop manager for Windows, I recommend:

HashTWM is native (written in C), while bug.n and math0ne's are both AutoHotKey. I don't think any of them are designed to work with virtual desktops, unfortunately.

ghettowm

CircleCI

This is a work-in-progress ghetto window manager for Windows. I miss i3.

ghettowm plugs in to Windows 10's native virtual desktop support by way of VirtualDesktopAccessor, rather than keeping track of per-desktop windows and hiding/unhiding them as it did initially.

The benefit with using the IVirtualDesktopManager is that in the event of an issue with ghettowm, your setup is still running 100% fine.

This may present some issues in the future as IVirtualDesktopManager has almost no functionality - the useful stuff is in IVirtualDesktopManagerInternal, which is undocumented and likely to change. As such, ghettowm is completely tied to VirtualDesktopAccessor.

Building

GOOS=windows go build -ldflags -H=windowsgui

Alternatively, you can download one of the releases

Plans

As of 42263c, configuration is controlled by a lua file (ghetto.lua). Keybinds and their handlers can be registered in code!

In the near future, I want to:

  • Support pinning of windows
  • Support moving windows between desktops
  • Support defining layouts/tiling per desktop

As of a009caa, WINKEY as a meta key works. However, this breaks ALT/SHIFT or key combos with more than one other key.

I plan to reimplement hotkeys asap, but frankly everything here needs a bit of cleanup so perhaps I will spend some time refactoring.

Known Issues

  • Likely various race conditions
  • WINKEY meta works, but now nothing else does ;)

Example Configuration

-- ghettowm config
local bit32 = require('bit32')
local windows = require('windows')
local ghetto_util = require('ghetto_util')

local modkey = bit32.bor(ghetto_util.get_mod('Alt'), ghetto_util.get_mod('NoRepeat'))

ghettowm:RegisterHotkey(modkey, ghetto_util.get_key('LeftArrow'), function()
  ghettowm:SwitchDesktopPrev()
end)

ghettowm:RegisterHotkey(modkey, ghetto_util.get_key('RightArrow'), function()
  ghettowm:SwitchDesktopNext()
end)

ghettowm:RegisterHotkey(bit32.bor(modkey, ghetto_util.get_mod('Control')), ghetto_util.get_key('Q'), function()
  ghettowm:Quit()
end)

ghettowm:RegisterHotkey(modkey, ghetto_util.get_key('One'), function()
  ghettowm:SwitchDesktop(0)
end)

ghettowm:RegisterHotkey(modkey, ghetto_util.get_key('Two'), function()
  ghettowm:SwitchDesktop(1)
end)

ghettowm:RegisterHotkey(modkey, ghetto_util.get_key('H'), function()
  ghettowm:NextWindow()
end)

ghettowm:RegisterHotkey(modkey, ghetto_util.get_key('L'), function()
  ghettowm:PrevWindow()
end)

Credits

Ciantic - VirtualDesktopAccessor

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WindowManager

type WindowManager struct {
	// contains filtered or unexported fields
}

func New

func New(runch chan func()) *WindowManager

func (*WindowManager) NextWindow

func (gwm *WindowManager) NextWindow()

func (*WindowManager) PrevWindow

func (gwm *WindowManager) PrevWindow()

func (*WindowManager) Quit

func (gwm *WindowManager) Quit()

func (*WindowManager) RegisterHotkey

func (gwm *WindowManager) RegisterHotkey(modifiers user.ModKey, vkey user.VirtualKey, cb func(int)) bool

func (*WindowManager) Run

func (gwm *WindowManager) Run()

func (*WindowManager) SwitchDesktop

func (gwm *WindowManager) SwitchDesktop(dst int) bool

func (*WindowManager) SwitchDesktopNext

func (gwm *WindowManager) SwitchDesktopNext() bool

func (*WindowManager) SwitchDesktopPrev

func (gwm *WindowManager) SwitchDesktopPrev() bool

Directories

Path Synopsis
cmd
ghettowm command
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址