Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raksooo/poppin
An Awesome window manager module which makes it possible to have clients hide and show with a keyboard shortcut
https://github.com/raksooo/poppin
Last synced: 6 days ago
JSON representation
An Awesome window manager module which makes it possible to have clients hide and show with a keyboard shortcut
- Host: GitHub
- URL: https://github.com/raksooo/poppin
- Owner: raksooo
- License: mit
- Created: 2016-12-22T21:25:00.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-09-12T09:09:17.000Z (about 4 years ago)
- Last Synced: 2024-10-31T09:37:01.980Z (12 days ago)
- Language: Lua
- Homepage:
- Size: 18.6 KB
- Stars: 33
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Poppin'
Poppin' is a module for awesome wm which allows the user to toggle a client. You could for example have a client which appears on a keyboard shortcut and toggles when the shortcut is pressed again. Poppin' clients are persistent between awesome restarts.## Download
```sh
git clone https://github.com/raksooo/poppin.git ~/.config/awesome/poppin
```## Usage
In your rc.lua:
```lua
local poppin = require('poppin')
```### poppin.pop()
```lua
poppin.pop(name, command, [position[, size[, properties[, callback]]]])
```Where name is a name associated with the client. Command is the shell-command used to start the program. Position can be either "top", "bottom", "left", "right" or "center". The size is the width or height (depending on position) in pixels.
poppin.pop(...) toggles the client if used multiple times, and returns a toggling function which doesn't require any arguments.
### poppin.isPoppin()
To check if a client is handled by poppin, poppin.isPoppin() can be used.
```lua
poppin.isPoppin(client)
```
poppin.isPoppin() returns either true or false.### Examples
Creating a poppin client:
```lua
poppin.pop("terminal", "urxvt", "top")
poppin.pop("terminal", "urxvt", "center", { width = 1000, height = 300 })
poppin.pop("terminal", "urxvt", "top", function (c) c.minimized = true end)
poppin.pop("messenger", "messengerfordesktop", "right")
```Toggling a poppin window by calling the pop function using the same name:
```lua
awful.key({ super }, "x", function () poppin.pop("messenger", "messengerfordesktop", "right", 1000) end,
{description = "Opens a poppin' messenger window", group = "poppin"}),awful.key({ super }, "z", function () poppin.pop("terminal", "urxvt", "center", 1000) end,
{description = "Opens a poppin' terminal", group = "poppin"}),
```Toggling a poppin window using returned function:
```lua
local poppin_terminal = poppin.pop("terminal", "urxvt", "top", 1000, { border_width = 5 })awful.key({ super }, "x", poppin_terminal,
{description = "Opens a poppin' messenger window", group = "poppin"}),
```Check if a client is a poppin client:
```lua
poppin.pop("terminal", "urxvt", function (c)
poppin.isPoppin(c) -- returns true
end)
```## Dependencies
* Awesome wm