diff options
| author | Jeff Carr <[email protected]> | 2024-12-23 00:45:14 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-23 00:45:14 -0600 |
| commit | 60d8edcb03660aecc5f2f36957b1939017ffde68 (patch) | |
| tree | c00ace4990dd22d61b87c21573caf5589bdcf6ea /devilspie/scripts/awesome.lua | |
| parent | 78cbaac691ce37fcda527fab6a56a0f8f7690789 (diff) | |
some lua thing. lists windows okay. notsure
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'devilspie/scripts/awesome.lua')
| -rw-r--r-- | devilspie/scripts/awesome.lua | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/devilspie/scripts/awesome.lua b/devilspie/scripts/awesome.lua new file mode 100644 index 0000000..dc11905 --- /dev/null +++ b/devilspie/scripts/awesome.lua @@ -0,0 +1,46 @@ +-- Support Awesome 3.5 WM + +local posix = require("posix"); +local os = require("os"); + +local awesome = "/usr/bin/awesome-client" +if not posix.stat(awesome, "type") == "file" then + awesome = nil; +end + +-- Check for tiling mode +function is_tiling() + if awesome then + return true; + end + return false; +end + +-- Make window floating +-- Parameters: state - true to make window floating, else make window tiled +function set_tile_floating( state ) + if not awesome then + return nil; + end + + if state then state = "true" else state = "false" end + + local xid = get_window_xid(); + + local command = "echo "; + command = command .. "'"; + command = command .. " local naughty = require(\"naughty\");"; + command = command .. " local awcl = require(\"awful.client\");"; + command = command .. " local client = require(\"client\");"; + command = command .. " for k, c in pairs( client.get() ) do"; + command = command .. " if c.window == " .. xid .. " then"; + command = command .. " awcl.floating.set(c, " .. state .. ");"; + command = command .. " end"; + command = command .. " end"; + command = command .. "'"; + command = command .. " | "; + command = command .. awesome; + + debug_print("Awesome floating: " .. command); + return os.execute( command ); +end |
