shellex icon indicating copy to clipboard operation
shellex copied to clipboard

Allow user configuration to set geometry defaults

Open ghost opened this issue 6 years ago • 3 comments

When using shellex (in this case with bspwm), there is the possibility that shellex does not find the display dimensions. In this case, setting shellex to appear on the bottom edge puts it in an inaccurate position, with no way (That I am able to see) to change this behavior short of compiling from source with manual edits done to the defaults defined here.

This could presumably be resolved by optionally reading these defaults from .Xresources in the same way that edge and pos are.

ghost avatar Jan 23 '19 09:01 ghost

Thanks for your report and suggestion.

Configurable default geometry values seem reasonable to me, I should be able to put that in in the upcoming days (assuming I don't hit an unexpected difficulty). Do you use the debian or arch linux package (in which case I know I should also trigger the packaging).

I'm wondering though why/where things go wrong for you, so I have a few followup questions:

  • Do you have more than one display connected when that happens?
  • Do I understand correct that this happens just sometimes and not conveniently reproducibly?
  • Otherwise, can you start shellex from a terminal and see if there is anything meaningful in the printout (errors, warnings, …)?

pseyfert avatar Jan 24 '19 16:01 pseyfert

I am using the arch aur package (both shellex and shellex-git have this issue)

  • I am not using multiple monitors/displays
  • It seems to be unable to determine monitor size (and therefore uses the default values) reproducibly (i.e. across reinstalls of both shellex and linux)
  • Nothing stands out to me as an error message in the log

ghost avatar Feb 04 '19 12:02 ghost

Sorry for the delay despite my promise to only take a few days.

I just remembered that shellex inherits settings from rxvt and rxvt has a default geometry.

Does adding something like the following to .Xresources already do the job for you?

shellex*geometry: 170x1

(note that's in characters of the desired window, not in pixels of the monitor).

If not, I just pushed the branch size-defaults to my fork https://github.com/pseyfert/shellex/tree/size-defaults

(the configuration is then shellex.defaultH: and shellex.defaultW: in .Xresources)

Something else I'm wondering, when starting shellex from a shell, there's some debug output, for me something like:

pseyfert@robusta:~/coding/shellex > shellex
position should be at the top
Getting shellex-position from focused window
found monitor with dimensions and position w=1920 h=1200 x=2560 y=0
found monitor with dimensions and position w=2560 h=1440 x=0 y=0
Focus 92274697 (1276x1376)

And for the monitor size determination shellex just calls xrandr --listactivemonitors, if xrandr prints an error, it should appear in here instead of the found monitor lines.

pseyfert avatar Apr 05 '19 09:04 pseyfert