Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- awesomewm scratchpad terminal
- -- clone this repo into your ~/.config/awesome:
- -- git clone https://github.com/notnew/awesome-scratch ~/.config/awesome
- --TOP OF FILE
- local scratch = require("awesome-scratch.scratch")
- screen_width = awful.screen.focused().geometry.width
- screen_height = awful.screen.focused().geometry.height
- --KEYBIND
- -- open scratchpad
- awful.key({ modkey }, "d", function ()
- scratch.toggle("st -n scratch", { instance = "scratch" })
- end,
- { description = "Open scratchpad terminal" , group = "term" }
- ),
- -- RULE
- {
- rule_any = {
- instance = { "scratch" },
- class = { "scratch" },
- icon_name = { "scratchpad_urxvt" },
- },
- properties = {
- skip_taskbar = false,
- floating = true,
- ontop = false,
- minimized = true,
- sticky = false,
- width = screen_width * 0.7,
- height = screen_height * 0.75
- },
- callback = function (c)
- awful.placement.centered(c,{honor_padding = true, honor_workarea=true})
- gears.timer.delayed_call(function()
- c.urgent = false
- end)
- end
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement