Merovius / shellex

Shell-based launcher
Other
39 stars 10 forks source link

Allow user configuration to set geometry defaults #71

Open ghost opened 5 years ago

ghost commented 5 years ago

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.

pseyfert commented 5 years ago

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:

ghost commented 5 years ago

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

pseyfert commented 5 years ago

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.