Giter VIP home page Giter VIP logo

xlunch's People

Contributors

arthrp avatar dagelf avatar douglasroyds avatar duncaen avatar dx37 avatar dym-sh avatar elric1 avatar fredx181 avatar glowingscrewdriver avatar lzap avatar orschiro avatar pmunch avatar tim77 avatar tomas-m avatar willbprog127 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xlunch's Issues

PKGBUILD

On PKGBUILD missing 2 files

line 39 and 40

install -Dm755 extra/genconf "$pkgdir"/usr/bin/xlunch-genconf
install -Dm755 extra/sample_config.cfg "$pkgdir"/etc/xlunch/icons.conf

On the package not exist extra/genconf and extra/sample_config.cfg

New feature idea for version 4

I have an idea, it is not necessary to implement it now, I just think that it would be cool to have this in the future.

It could be useful if user has a power to put icons on pre-defined fixed position. This way, user could place extra icons on the screen. As an example, user could put a rounded arrow (refresh) and after clicking, it would call script to regenerate xlunch entries. Or, user could put an icon with X, which would close xlunch. Those actions can be of course added to existing grid, but if the user can make them fixed position, he can for example put them in corners of the screen, outside of the grid.

User could, for example, make any of his icons absolutely positioned, by providing coordinates as extra x;y parameters in dsv file:

Close;close.png;/bin/exit;0;0
Refresh;refresh.png;/bin/refresh;-100;-100

Positive value would mean position from the left (for x) and top (for y).
Negative value would mean position from right (for x) and bottom (for y). Optionally it could be position from bottom right minus size of the given particular icon (so user could put there -0;-0 and he can be sure the bottom right corner of the icon will be in the bootom right corner of the screen).

For these special icons, there would be no higlight, no label, and these icons would be placed in their original size (not resizing to --iconsize).

This way, one could put various icons on various places on the screen, for example like these shutdown/logout icons on Windows screen (see top right):

clip_image0071

Since there would be no highlight for such icons, we could extend the syntax of dsv file to provide one icon path for the icon, and another icon path for highlighted icon.

This way, user could create various buttons aligned to the sides or corners of the screen, even with over effects, which would otherwise work very same as other xlunch entries.

Furthermore user would be able to even make the screens as like on the screenshot entirely, if he provides the pictures.

This possibility of placing icons outside of the grid would extend the usability of xlunch very much.

This is just an idea. For future.

Add commandline option to position icons as well

So my monitor setup looks like this:

       +---+
+-----+|   |
|  1  || 2 |
+-----+|   |
       +---+

xlunch detects this as a 1920x(1920+1200) screen, which is fine, because I want to display xlunch on both monitors. The problem is, that there are two sections of this "screen" which are not visible (above and below monitor 1). Although I can place the prompt lower on the "screen" so it lands in monitor 1 with -t, the icons remain in the invisible section above monitor 1.

I propose two changes:

  • Allow positioning of the icons as well (e.g. with -T)
  • Change options to also accept x-offsets (e.g. in the format 123x456) to allow for more complex monitor setups which I also have not thought off

Using --textafter

When using --textafter, there is a mouse cursor position between items which highlights two items at the same time. I assume this is a bug which should be fixed.

Follow gtk icon theme

Would it be possible that xluch follows the GTK icon theme used in the desktop? Or would it be too hard? I would really love this feature on xluch.

Tab completion

Would it be possible to add TAB completion as in BASH, so that it would complete the command name even if it is not listed in the config file? It would be really helpful, because I want to use it to replace fbrun from fluxbox for my wife, but the genconf command did not generate some even basic programs like firefox or openshot and it might be hard for me to hunt all of them by hand.

The expected behavior could be not showing any icons, just completing the command name in the input field (possibly cycling through possible completions when multiple completions can be found)

BTW it looks really neat! Thank you for writing it!

One small question. Why the name xlunch instead of xlaunch? Is it any kind of a joke referencing extra lunch? I was just curious..

Accepting negative coordinates for x/y pos

Since xlunch can be used as a software for non-fullscreen menus, user may wish to put it to the bottom of the screen without knowing how big his screen is. Similarly as like buttons work accepting negative coordinates to put icons relative to bottom or right, we could support -x and -y positions to be negative too, in order to make the xlunch window positioned relative to bottom or right side of the screen.

That way, since I have a 20px high taskbar, I could use -x 0 -y -20 and the window (like a menu) would be placed just above the taskbar (window height would need to be subtracted similarly as icon height is subtracted when button is positioned on a negative position).

Create deb installer

Hello! Do you think to make something like:
- Create categories for apps (similar deepin launcher), maybe get some ideas from menulibre
- Change fonts to Noto or allow the user to change

  • Make a deb installer

I really like your job! congrats!!!

Create showcase of configurations

Xlunch is starting to become incredibly configurable, but for new users seeing the README page or even the web-site this might not come across all that well. I propose that we make a collection of configurations, some "normal" ones like those we already have, but also some "out-there" just to show exactly how configurable xlunch is.

Add an option to hide double entries

Some applications have multiple desktop files. Okular has three different occurences in xlunch. Can this (optionally?) be reduced to one please? I think it's safe to assume the icon will be the same.

Create a snap package

Hi,

This launcher seems pretty awesome.
Why don't you create a snap package ? Using build.snapcraft.io you can automate it and create a package that can be use on Debian, Fedora, Ubuntu, Arch, Gentoo and Suse

I didn't succcess to build it on my Ubuntu 17.04, I guess due to missing requierement, and the documentation is pretty light. So maybe with a snap you can win more users.

Cheers
Winael

Imlib2.h: no such file or directory

When I ran 'make' from the xlunch folder, I got the following error:
xlunch.c:10:20: fatal error: Imlib2.h: No such file or directory

Where can I find the missing file/directory?

Error in help message

The new -L, --highlightcolor is noted as the switch for the new highlight image option, where it should be -L, --highlight. This is true for both --help, the usage.txt, and the docs.

Hitting enter to run first item only works when there is one item in the list.

If I have 1+ items in in the search list nothing happens when I hit enter. I feel this would only make sense if I hadn't searched for anything at all. But also being able to hit enter right away could also be practical for example if the first item in the list is a web browser, terminal, or other often used software.

Web site shows newest version

The website always shows the newest version found in the master branch. This means that the download files might not have all the features the website mentions. If possible the website should point at the last tagged version.

Configuration file

Xlunch has a lot of options and it would be nice if we could implement a configuration file format that could be passed instead of switches for those who prefer that.

one instance

We should detect if another xlunch is running and switch to it if so, instead of having multiple instances running at the same time.

Implement close button

Currently it is possible to cancel the launcher only by pressing Esc key.
It should be possible to cancel it by clicking somewhere with mouse.
In ideal case, the user should be able to specify (using commandline argument) what icon file should be displayed and where. For example, if user is starting lunch from his taskbar by clicking some icon in bottom-left corner of screen, the same icon should be displayed at the same position to close lunch. This could provide very smooth usage.

Center the icons

I would like to use xlunch also as a confirmation dialog for the user to select Logout/Shutdown/Restart option. In this scenario, there are only 3 icons and no prompt. I would like to be able to center the icons in the center of the screen, but I do not know the screen dimmensions of the user's monitor.

I could possibly use xrandr in a script to find out the current dimmensions of current screen resolution, and add proper border, so after I specify --columns 3, it would be at the center. But I am wondering, would it be somehow reasonably simple to make xlunch do the calculation, in order to center the specified columns of icons (plus their leastmargin) by calculating the border?

So user would specify --center --columns 3 --rows 1 --leastmargin 20
and xlunch would compute proper border, overiding possible border value specified by the user.

As a side effect, if the user for example prefers to have the icons slightly up, he can specify --rows 2 and it would calculate the border as like if there were two rows, putting the icons halfway up, while only showing one row. This could be very powerfull.

@PMunch, are you in the mood of trying this? :-)
It is way too complicated for me to do it right :)
This would bring xlunch to yet another level since it could be used for different types of dialogs.

Compositor issues

I am trying to use xlunch with compositor (compton).
I enable fading, so when xlunch starts, it fades in nicely. This effect works fine.
I would expect the fade-out (when xlunch ends) in opposite direction, but something else happens - it flashes to white, as like the entire fullscreen window was white, and then fades back to the desktop.

@PMunch I noticed that you mentioned using compositor in documentation, so you probably have some experience with it, did you try to enable fading? Does it work for you normally? Or does it flash on exit? Thank you

New centering does not allow for specifying --columns and does not center vertically

I am not using --textafter so I didn't notice this earlier. When using --center --columns 1 for example, and --textafter, it doesn't put there the text properly. I'm not sure how this should be resolved. Maybe make the --textafter parameter accept an argument, like --textafter 200, which means to make the column width 200px? Or maybe disable --center if --textafter is specified?

Proper makefile

It would be great to have proper Makefile support, which would support "make install", probably with generating initial config file using genconf to /etc/xlunch/icons.conf

Icon padding should not push out text

When I want more free space between apps, I use -I 50 for example.
Unfortunately this behaves more like an "icon margin", it adds margin around the icon, but does not count the text to it, so it shifts the text down, far far away from the image.

I would like to be able to specify margin between apps, and to specify spacing between icon and the text under it.

So in ideal situation, I would use --iconpadding 50 --textpadding 10, and I would expect this to put the text only 10 pixels below the icon, and make the icon(including text) 50px padding around.

Can this be achieved with current options?
If not, will you please change the behavior of --iconpadding, so it actually acts as "app margin" ?
Thanks

Fuzzy searching

I got asked if xlunch supports or was planned to support fuzzy searching. I think it would be cool but might require a certain rewrite of the internal data structure of entries.

Here is an algorithm (in C#, but should be pretty easy to port):
https://www.codeproject.com/Articles/36869/Fuzzy-Search

The problem is that currently the entries are sorted in a linked list. Using fuzzy search like it's normally used would mean having to sort this list based on their edit distance (Levenshtein distance). Another option would of course be to have a cut-of in "similarity" and keep the entries in their original order, but that's a bit of a hack and not "proper" fuzzy searching.

Multimonitor setup

It doesn't work well while using multimonitor setup. The area/icons are spread through all monitors without respect to alignment of the monitors (for example I have it cropped from top on two from three monitors).

I would expect some configuration for it or it could work similar to i3bar: it will be shown only on active monitor.

Add SVG icons rendering

Hello,
some applications aren't shown in the menu, example Mumble, I have realised the icons which aren't displayed are all SVG (yes, imlib2 doesn't render it, I didn't know).
So I think it would be nice to add svg support through librsvg to render them.

Here is the genicons scripts I adapted if you want:

#!/bin/bash

APPS=/usr/share/applications
ICONS=/usr/share/icons/hicolor
SIZE=48

echo "Generating config file from $APPS ..." >&2

find $APPS -name "*.desktop" | while read DESKTOPFILE; do
   FDATA="$(cat $DESKTOPFILE)"
   NAME="$(echo "$FDATA" | grep -i "^Name=" | head -n 1 | cut -d "=" -f 2-)"
   EXEC="$(echo "$FDATA" | grep -i "^Exec=" | head -n 1 | cut -d "=" -f 2-)"
   ICON="$(echo "$FDATA" | grep -i "^Icon=" | head -n 1 | cut -d "=" -f 2-)"
   USETERM="$(echo "$FDATA" | grep -i "^Terminal=" | head -n 1 | cut -d "=" -f 2-)"

   if [ "$USETERM" = "true" ]; then
      EXEC="$TERM -e ""$EXEC"
   fi

   if [ "$ICON" != "" ]; then
      ICON="$(find "$ICONS" | grep $SIZE"x"$SIZE | grep $ICON"[.]png" | head -n 1)"
      if [ "$ICON" != "" -a "$EXEC" != "" -a "$NAME" != "" ]; then
         echo "$NAME;$ICON;$EXEC"
      else
        ICON="$(find "$ICONS" | grep "scalable" | grep -E $ICON"[.](png|svg)" | head -n 1)"
        if [ "$ICON" != "" -a "$EXEC" != "" -a "$NAME" != "" ]; then
           echo "$NAME;$ICON;$EXEC"
        fi
      fi
   fi
done | sort | uniq

It will add blank entries in xlunch, where you can click it but doesn't know which app is going to start, maybe you could just render the text without icon at first, and then maybe add svg support.

Window x/y position

Fluxbox ignores window position when the window is created, even if I specify -x 10 -y 10.
The window manager decides where to put it (it forces 0;0 position)

It needs XMoveWindow(disp,win,uposx,uposy) call immediately after XMapRaised(...). It doesn't work if it is placed before the XMapRaised, only after.

I thought that the window will be firstly made visible on position 0:0 and then moved to new coordinates, but if I put sleep(2) just between the XMapRaised and XMoveWindow, nothing is really visible on the screen until the event loop is reached anyway. So it looks like this is safe approach to force the window position even for fluxbox.

@PMunch what do you think? Can I simply put it there?
Patch follows:

@@ -1881,8 +1881,11 @@ int main(int argc, char **argv){
     }
     XSetClassHint(disp, win, classHint);
     XFree(classHint);
+
     /* show the window */
     XMapRaised(disp, win);
+    /* force move window to x/y pos */
+    XMoveWindow(disp,win,uposx,uposy);

     // prepare for keyboard UTF8 input
     if (XSetLocaleModifiers("@im=none") == NULL) { 

[Information] I add your program to AUR (ArchLinux User Repository)

Hello, Tomas! (I'm the biggest fan of Slax ever)

I have added your program as an package for building to the ArchLinux User Repository.

In the ArchLinux distribution we have a wonderful package manager pacman, which kinda recently added pre- and post-transaction hooks. They allow you to make any preliminary steps, and steps after install/update program.
I added to package hook, which generates icons.conf after every install/update/remove of any package with files in /usr/share/applications.

Please, have a look at files on AUR!
https://aur.archlinux.org/packages/xlunch-git/

Fluxbox window position problem

When running xlunch on FluxBox, there is a problem that the window is positioned like 20px from the top, leaving uncovered background there. If using --desktop then the problem is not there. So it has probably something to do with the window manager. It looks like if there was the space for window titlebar, while the titlebar is NOT there :)

I am not sure how to fix this. Maybe send some WM_something message?

No images shown

When I launch xlunch none of the icons are drawn. I checked the /etc/xlunch/icons.conf file and the icons there exists on disk and show up fine (they are PNG files). The log is peppered with Imlib error messages but I see there is an open Pull Request for that so I'm not sure if that necessarily means anything.

Support for custom image as highlight

I would like to be able to use custom (transparent) image under highlighted element (selected entry), so I could specify my own highlighting, which may have rounded corners etc.

leastmargin specified using long option segfaults

When I specify -l 20, it works fine.
But when I specify --leastmargin 20, xlunch segfaults and quits right before start.
I am not good at debugging, can you perhaps confirm that it works fine on your setup?
Commandline segfaulting:

 xlunch --leastmargin 20

Font path

Font path can be in /usr/share/fonts/TTF

add
imlib_add_path_to_font_path("/usr/share/fonts/TTF");

Simple scrolling

Sometimes it may be needed to support some simple scrolling, to let user access icons which are beyond the screen (hidden). For example if we use textafter, then the number of entries which fit the creen may be relatively small. I was thinking about the following approach:

Currently there is a list of all icons in memory, and the top X icons is displayed, depending on how many fits the screen, the rest is hidden. I was thinking that instead of this "fixed-top-X" icons we could have a simple int variable, which will store the starting position. Initially 0. And the entries with ID lower than this starting position would be ignored (not displayed).

When user uses mouse scroll, it would simply adjust this starting position by adding or subtracting the number of columns (if there are more icons to scroll to). Similarly when user uses right arrow key on the last element, the starting position would be increased by number of columns. This way, the scrolling would be "by row". So on scroll down, the top-most row would be hidden and the entire list of icons be shifted up, making the next row visible. The only drawback is probably that the entire screen needs to be invalidated (imlib_update_append_rect)

At the moment I think we can make it without any scrollbar. And without any shifting visual effects.

Allow user to press Enter once he filtered to one app.

Thanks for your awesome launcher.
I made a little change to allow the user to just press Enter once he filtered to one app.

Before this PR:
Example: you type fi and only have 1 app displaying
image
You have to press Tab once, to select the icon and then you can press Enter to start it.

With this PR:
Once you filtered to only 1 application, you won't have to press Tab to select it anymore, just press Enter.

Hard-coded binary and paths causes build problems on FreeBSD

Greetings!

Thanks for your cool app!

Makefile
CC is hard-coded to gcc, which causes problems on systems that use clang instead (ie: FreeBSD). Can you instead test to see if cc is already a valid compiler command and just use it as-is? If it's not already a valid compiler command, you could then test for gcc or clang and then assign one of those.

extra/genconf
The APPS and ICONS variables should be adjusted depending on the system. As they are now, they work fine in Linux, but for FreeBSD (and possibly others) the paths are /usr/local/share/applications and /usr/local/share/icons. Also it would be nice if xlunch got the .desktop files from ~/.local/share/applications.

Thank you so much! ๐Ÿ˜„

Gradient by default

User should be able to specify gradient colors for background, if he does not use background image.

Ctrl+P and Ctrl+N for selection

It would be great to add support for Ctrl+P and Ctrl+N for selecting programs to avoid usage of arrow keys. Similar to what's used in bash or vim for selection from a list of commands/options.

Suggestion: Subsequent hitting of TAB moves to next item

I just notices that I quite often write a partial command, then hit TAB (because it is the most convenient key) just to find out that I have to move my hands completely to reach the right key to select second item in the list.

Do you think it would be a good idea to move to next item after hitting TAB again?

Would it be doable and simple enough to implement or is there another reason for current behavior?

Item not highlighted on start

If I start xlunch, and mouse cursor happens to be over an item, it does not higlight the item unless I move my mouse slightly. I know there is an event handling for mouse move, but can we know mouse cursor coordinates even without moving the mouse, so xlunch selects the right item under cursor upon start, without the need to move mouse?

With border auto, height does not consider text

When calculating borders in the auto mode, width is OK, but height is not considering the height of text, so if I put 3 rows of small icons, those rows are overlapping, as can be seen here:

1

Let arrow keys select icon

Currently it is only possible to click icon with mouse in order to launch the application.
It should be possible to use keyboard to navigate through icons, and select an app to run.
There are problems to resolve: if user types a command, say "xterm", which filters out the icons, then the user should be able to run his command directly ("xterm") and he should be able to select one of the visible icons after filtering by title (assuming there are more icons which match "xterm" string). This must be somehow resolved.

is it possible to add WM_CLASS or _NET_WM_PID ?

This amazing project.
I wanted to leave it unmanaged by wm and ignored by compositor(compton).
It seems impossible without title or WM_CLASS/_NET_WM_PID

  • it looks like wm or compositor is making it render extra frame by resizing or something.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.