Closed GoogleCodeExporter closed 9 years ago
Although I do remember a discussion about launcher_item_app, as far as I can
see currently tint2 does not have such an option at all.
The only supported way to add launchers is to use the launcher_item_app option.
The reasons are the following:
* launcher_apps_dir cannot specify an order for the icons; naming the files as
001-blah.desktop etc. and sorting by name is a solution but in the end it
requires more work and is less elegant than just supplying a list of
launcher_item_app;
* It is not clear what to do if there are subdirectories in that directory;
should we explore recursively? Should we follow links?
If you need to add/remove launchers programatically, I suggest using a base
tint2rc file written by hand, a suffix tint2rc file written automatically by a
program containing the launcher_item_app lines and you can generate the final
tint2rc by concatenating the two. If you use a shell script to do this, there
is no need to expand $HOME in tint2, as you can do it in the script.
What do you think?
Original comment by mrovi9...@gmail.com
on 26 Feb 2015 at 6:51
I think that the addition of launcher_apps_dir was one of the best code
additions provided for tint2 and simplified how to add and sort the launchers.
Using naming conventions based on how you want it sorted, 001-blah.desktop, is
a one time setup and done
I am not sure what the issue is adhering to standards. I have no desire to
write or concatenate scripts when it can be done from a non standard location.
I will move all tint2 files to the users home directories and only keep the
launchers in the specific location.
Thanks
Original comment by vast...@gmail.com
on 26 Feb 2015 at 10:11
I am guessing (without testing) that launcher_item_app does not adhere to $HOME
as well so that makes it the same issue
Original comment by vast...@gmail.com
on 26 Feb 2015 at 10:16
They seem equivalent to me -- isn't editing the tint2rc file a one time thing
too? Here is a one-liner that can generate the config for you from your
directory:
for f in /usr/share/applications/* ; do echo "launcher_item_app = $f" ; done
Having a list of shortcuts is the simplest possible thing to do while also
being more flexible than the directory option, that is why I prefer it. Also,
tint2 has well over 100 options at the moment, and every new option adds more
code that needs support and more bugs that appear. Adding redundant
functionality is simply not smart from an engineering point of view, because on
long term it will do more harm than good.
Original comment by mrovi9...@gmail.com
on 26 Feb 2015 at 10:42
Regarding arbitrary environment variable expansion, it is too complicated.
However we could probably expand only "~" without hitting many problems. I
think "~" can actually used in file names but it is unlikely that people would
add such strangely named files to tint2rc. I need to think about this before
making a decision.
To understand better why you need this: you have multiple computers with
different user names and custom .desktop files somewhere in your home directory
and you want to keep the tint2rc files in sync over all these computers?
Original comment by mrovi9...@gmail.com
on 26 Feb 2015 at 10:54
I am the DEV of VSIDO and tint2 is a standard on every users installation
vsido.org
I want to simply be able to control the environment... There is no way I can
know every users home directory name, so a variable of ~ or $HOME is paramount
in standard first time install (etc/skel) setups and that way I would not have
to use a root setting of /usr/local/bin ... We have been doing it this way for
several years so it is no real BIG deal, but would be nice to have
I have since changed the default to the users home directory and only have the
launchers in /usr/local/bin ... It is only the variables of launcher_apps_dir
and launcher_item_app that do not understand ~ or $HOME
I do appreciate your looking into this, and we value the hell out of tint2. I
am also not trying to be an arse about it.. :D If it is to much to drop in,
then it is what it is... We have work arounds and solutions.. :)
Original comment by vast...@gmail.com
on 27 Feb 2015 at 1:26
Thanks for the explanation, now I understand what you mean.
I will definitely do the "~" expansion in launcher_item_app. "~" will be
expanded only if it occurs at the beginning of the string and is either alone
or followed by "/" (i.e. the first two cases in
https://www.gnu.org/software/bash/manual/html_node/Tilde-Expansion.html )
If you already have a user base that has config files using launcher_apps_dir,
maybe it would make sense to merge the patch from issue 381. I will take a look
and see how I can integrate it with tint2conf, because for the next release we
would like to provide a complete configuration GUI.
Original comment by mrovi9...@gmail.com
on 27 Feb 2015 at 8:34
Issue 381 has been merged into this issue.
Original comment by mrovi9...@gmail.com
on 27 Feb 2015 at 8:35
vastone, do you use as 001-blah.desktop links or regular files? If they are
links, where are the .desktop files stored, in /usr/share/applications ?
Original comment by mrovi9...@gmail.com
on 1 Mar 2015 at 10:25
Adding support for launcher_apps_dir in r727. The code does also "~" expansion.
Let me rephrase the question in #9:
1. I would like to know where you store the 001-*.desktop files, i.e. what is
the value of launcher_apps_dir in your config files?
2. Are you storing .desktop files in any location other than
/usr/share/applications and ~/.local/share/applications ?
Original comment by mrovi9...@gmail.com
on 1 Mar 2015 at 11:13
Original comment by mrovi9...@gmail.com
on 20 Mar 2015 at 8:42
Original issue reported on code.google.com by
vast...@gmail.com
on 25 Feb 2015 at 7:15