sagb / alttab

The task switcher for minimalistic window managers or standalone X11 session
GNU General Public License v3.0
387 stars 45 forks source link

Padding/margin #104

Open LoganDark opened 4 years ago

LoganDark commented 4 years ago

Maybe I want:

This shouldn't be too hard, right?

sagb commented 3 years ago

Where do you draw the text if you center the icon?

LoganDark commented 3 years ago

Where do you draw the text if you center the icon?

You center the icon horizontally.

dxps commented 3 years ago

@sagb Related to any possible padding, I just wanted to ask you how did you made the icons get centered in the 3rd screenshot?

This tool is great. Love using it in awesomewm btw.

LoganDark commented 3 years ago

@sagb Related to any possible padding, I just wanted to ask you how did you made the icons get centered in the 3rd screenshot?

This tool is great. Love using it in awesomewm btw.

By making the icons wider via CLI flag. The image will be fit to the icon size without stretching, so you get that centered effect.

dxps commented 3 years ago

@LoganDark Thanks! I'll try that.

Meanwhile, I just discovered an ugly behavior: running in the existing session (using the same cmd flags as listed below) it all looks great, but having it started as part of the session using .xsession using:

❯ cat .xsession

alttab -bg "#002B36" -font xft:FiraSansCondensed -theme "Material-Black-Pistachio-Suru" -t 400x140 -p none &

❯ 

it looks like this:

image

And the same behavior happens even when placing it into ~/.config/awesome/autorun.sh file.

Update & solution

Your advice is great. Thanks again! I made it working fine by having it executed a little bit delayed by:

  1. Created a script:

    #!/bin/sh
    
    sleep 3
    alttab -bg "#002B36" -font xft:FiraSansCondensed -theme "Material-Black-Pistachio-Suru" -i 400x40 -t 400x140 -p none
    
  2. Run it as part of the autorun.sh:

    ❯ tail -n3 ~/.config/awesome/autorun.sh 
    run /home/dxps/apps/scripts/run_alttab.sh
    
sagb commented 3 years ago

@sagb Related to any possible padding, I just wanted to ask you how did you made the icons get centered in the 3rd screenshot? This tool is great. Love using it in awesomewm btw.

By making the icons wider via CLI flag. The image will be fit to the icon size without stretching, so you get that centered effect.

Yes. There is an exact command line at the botom of https://github.com/sagb/alttab/blob/master/doc/screenshots/screenshots.md

sagb commented 3 years ago

I made it working fine by having it executed a little bit delayed by:

You can also try alttab -w 1 without a delay.

dxps commented 3 years ago

@sagb Thanks! I'll try that.

Now, the last issue I'm facing in one of the systems (both running manjaro-awesome edition with XFCE as DE) I'm using it. Although, there are multiple apps (and many of the non-minimized) open, alttab shows just two of them:

image

Any idea, please?

Thanks again!

sagb commented 3 years ago

Multiple desktops? Try -d 1

dxps commented 3 years ago

Thanks again for the feedback. Let me get back to you with the outcome. In AwesomeWM there are actually multiple screens (I have 3 defined, although I'm just using the 1st one).

So, now I have: