Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scratchpad breaks with Awesome 3.5 #12

Closed
psivesely opened this issue Sep 20, 2013 · 10 comments
Closed

Scratchpad breaks with Awesome 3.5 #12

psivesely opened this issue Sep 20, 2013 · 10 comments
Labels

Comments

@psivesely
Copy link

As detailed at http://awesome.naquadah.org/wiki/Scratchpad_manager, the scratchpad manager was written for awesome 3.4 and, at least for me using any of these default configs, breaks with awesome 3.5. It occasionally works on an empty tagspace, but most often even then stays almost completely hidden at the top. I can still use it, I just can't see what I'm writing because it only drops down a few pixels, exposing the very bottom of the terminal. I use terminator terminal, but I just tried it with urxvt and that failed as well.

@lcpz
Copy link
Owner

lcpz commented Sep 20, 2013

The module has been adapted for 3.5+ too, so it doesn't break.

You first prove it by saying it shows up with uncorrect geometry.

Your 'problem' is just that default scratch.drop height value is somehow not enough for your setup, hence you've got to increase it a little.

This is what you can read from in-code documentation of scratch/drop.lua:

--   scratch.drop(prog, vert, horiz, width, height, sticky, screen)
--
-- Parameters:
--   prog   - Program to run; "urxvt", "gmrun", "thunderbird"
--   vert   - Vertical; "bottom", "center" or "top" (default)
--   horiz  - Horizontal; "left", "right" or "center" (default)
--   width  - Width in absolute pixels, or width percentage
--            when <= 1 (1 (100% of the screen) by default)
--   height - Height in absolute pixels, or height percentage
--            when <= 1 (0.25 (25% of the screen) by default)
--   sticky - Visible on all tags, false by default
--   screen - Screen (optional), mouse.screen by default

so, considering my configs, try replacing

-- Dropdown terminal
awful.key({ modkey,           }, "z",      function () drop(terminal) end),

with something like this

-- Dropdown terminal
awful.key({ modkey,           }, "z",      function () drop(terminal, "top", "center", 1, 0.5) end),

@psivesely
Copy link
Author

The default setup is 25% of the height of a 15.6 laptop inch, so there should be no reason I need to change it in the first place, but realistically I see ~.25% regardless of what settings I use. I tried a variety of different pixel and percentage based settings. I am using Awesome 3.5.1 compiled against Lua 5.2.2.

@lcpz
Copy link
Owner

lcpz commented Sep 21, 2013

The default setup is 25% of the height and 100% of the width of the screen, regardless of the screen size.

Try using this version of drop.lua.

@psivesely
Copy link
Author

Yes, I realize what percent means. Anyway, that version of drop.lua produces the same bug for me.

@psivesely
Copy link
Author

The few times it has very sporadically worked, it displayed at ~25% height and ~75% screen width. Since using the git version of drop.lua, I've noticed the small sliver of the app that is now exposed drops from the very top of the screen instead of right below my statusbar and is very slightly taller (maybe a few pixels) and significantly less wide (went from ~75% to ~15% of screen width). The height increase was just enough to realize that I am only seeing the top few pixels of my window and not the bottom. If I had the time I would try to learn some lua and figure out what was going wrong, but for now I am happy to try any suggestions you have or look for an alternative solution.

@lcpz
Copy link
Owner

lcpz commented Sep 21, 2013

I'm happy that you realize, but I was correcting this statement of yours:

The default setup is 25% of the height of a 15.6 laptop inch

because it was false.

You're getting that behaviour because it's the original version, which considers only the workarea.

Honestly, the fact that you tried different arguments in drop without having a change seems odd, but if you're sure that it's not something related to your machine, then I can't help you further.

Report to the author: anrxc.

@lcpz
Copy link
Owner

lcpz commented Sep 22, 2013

I'm closing this because it's not an awesome-copycats issue.

Yours is a quite unique behavior, which everybody using scratchpad never had.

But if you solve it, feel free to email me to tell how.

@lcpz lcpz closed this as completed Sep 22, 2013
@psivesely
Copy link
Author

I emailed anxrc and in the meantime found a workaround. The problem is that the scratchpad is floating by default. When in floating layout it works fine, but in any tiled layout it hides out at the top of the screen. If I use the hotkey for awful.client.floating.toggle any app will have this problem in a tiled layout. So I simply use it to toggle the scratchpad off floating and when I want to use it it appears as a tile.

@psivesely
Copy link
Author

SOLVED: Updated from Arch Community repository's "awesome 3.5.1-2" to Arch User repository's "awesome-git," i.e., v3.5.1-15-gabd8246 and now it works perfectly.

@lcpz
Copy link
Owner

lcpz commented Sep 24, 2013

Very strange, working effortlessly in 3.5.1 for me, but anyway it's good to hear that.

wereii pushed a commit to wereii/awesome-copycats that referenced this issue Dec 21, 2021
Change io.popen to io.open so we don't execute image files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants