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

Padding/margin #104

Open
LoganDark opened this issue Aug 8, 2020 · 10 comments
Open

Padding/margin #104

LoganDark opened this issue Aug 8, 2020 · 10 comments

Comments

@LoganDark
Copy link

Maybe I want:

  • The icon to be centered
  • Some space around the text and icon
  • Some space between the text and icon

This shouldn't be too hard, right?

@sagb
Copy link
Owner

sagb commented Dec 27, 2020

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

@LoganDark
Copy link
Author

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

You center the icon horizontally.

@dxps
Copy link

dxps commented Mar 30, 2021

@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
Copy link
Author

LoganDark commented Apr 1, 2021

@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
Copy link

dxps commented Apr 1, 2021

@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
Copy link
Owner

sagb commented Apr 4, 2021

@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
Copy link
Owner

sagb commented Apr 4, 2021

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
Copy link

dxps commented Apr 4, 2021

@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
Copy link
Owner

sagb commented Apr 4, 2021

Multiple desktops? Try -d 1

@dxps
Copy link

dxps commented Apr 5, 2021

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:

  • in ~/.config/awesome/autorun.sh:
    run /home/dxps/apps/scripts/run_alttab.sh
  • in /home/dxps/apps/scripts/run_alttab.sh:
    #!/bin/sh
    
    ## sleep 2
    alttab -w 1 -d 1 -bg "#002B36" -font xft:FiraSansCondensed -theme "Material-Black-Pistachio-Suru" -i 400x40 -t 400x140 -p none

After login, it's all good. Things might break later, if it is the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants