Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 21 Oct 2018, 08:40
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
xlunch
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 3 [32 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
rockedge


Joined: 11 Apr 2012
Posts: 832
Location: Connecticut, United States

PostPosted: Sat 01 Sep 2018, 18:04    Post subject:  

Yes! thank you Fred ...I borrowed one of your examples so I have 2 nice options of using xlunch....

one with
Code:
xlunch -g /usr/share/backgrounds/BionicZM-A-logo.png --font /usr/share/fonts/default/TTF/FreeSans.ttf/9  --column 8 --input /root/.config/xlunch/entries.dsv --scroll

and the one I used from the example in the PET package from Fred running zoneminder - zmNinja alongside
Screenshot(7).png
 Description   
 Filesize   101.03 KB
 Viewed   392 Time(s)

Screenshot(7).png

Screenshot(5).png
 Description   
 Filesize   68.25 KB
 Viewed   397 Time(s)

Screenshot(5).png

Back to top
View user's profile Send private message Visit poster's website 
sc0ttman


Joined: 16 Sep 2009
Posts: 2603
Location: UK

PostPosted: Sun 02 Sep 2018, 06:49    Post subject:  

fredx181 wrote:
sc0ttman wrote:
For now, my fork simply does not truncate app names... Which is ugly unless you set the --columns option ...


I tried by compiling your new xlunch.c, must say, not an improvement IMHO, but unfortunately don't have suggestion for how to truncate "at what length" (I'm really not a C programmer)
EDIT: Btw, isn't it better making changes maybe to co-operate with the author(s) of xlunch ?

Fred

It's a BIG improvement on my system, all I get is about 5 chars per title otherwise ("Tran..." instead of "Transmission") ... I can't even tell what half the apps are with normal xlunch....

And yes, eventually, when I finally work out how to do a proper fix, I will do a Pull Request.

One of the problems is that linux progs have such crappy names - without the description that follows it's hard to know what they do ... If all descriptions were prefixed with a dash (-) we could truncate form the dash onwards .....

So "VLC - media player" (instead of "VLC media player") would allow us to choose to show names + description or names only .... or even name + descr on new line (convert dash to \n)..

But the desktop files are a mess (no systematic division between prog name and description) and dejaVuSans looks crap in xlunch...

A smaller, more condensed, narrower font, with dashes after prog name, would do wonders on my system .... YMMV.


EDIT:

The easiest fix is to update /usr/bin/genentries ... Give it a new option, like --maxtitlelength or --maxtitlewords, and truncate the names in entries.dsv from there... But then it may conflict with (ignore) some xlunch options...

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 3482
Location: holland

PostPosted: Sun 02 Sep 2018, 09:18    Post subject:  

sc0ttman wrote:
all I get is about 5 chars per title otherwise ("Tran..." instead of "Transmission") ... I can't even tell what half the apps are with normal xlunch....


Some options may help, like setting --iconpadding, I'm not sure what's the proper use of --textpadding, I experimented with negative value -4 in below example, seems to work Rolling Eyes

Code:
xlunch --scroll --border 5% --sideborder 5% --borderratio 50 --sideborderratio 50 --columns 10 --rows 5 --iconpadding 30 --textpadding -4 --paddingswap --iconsize 48 --leastmargin 12

See pic below.
This is with the standard xlunch.

Fred
2018-09-02-150707_1280x800_scrot_780x488.png
 Description   
 Filesize   117.24 KB
 Viewed   321 Time(s)

2018-09-02-150707_1280x800_scrot_780x488.png


_________________
Dog Linux website
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2603
Location: UK

PostPosted: Sun 02 Sep 2018, 12:40    Post subject:  

Will play with those settings, but couldn't get anything I liked... Will have another go..

In the mean time....

I've literally just completed a feature branch in my fork, which adds an all-new --maxtextlength option (updated C code in xlunch.c)

See here: https://gitlab.com/sc0ttj/xlunch/tree/feature-maxtextlength

(diffs here: https://gitlab.com/sc0ttj/xlunch/merge_requests/1/diffs)

You can now do:

xlunch --maxtextlength 0 # disables truncation
xlunch --maxtextlength 10 # limits titles to 10 chars

..if ommitted, you get the default behaviour back

From xlunch --help:

Code:
--maxtextlength [i]                The maximum character length of the icon text.
                                              If set to 0, text truncation is disabled.

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 3482
Location: holland

PostPosted: Sun 02 Sep 2018, 15:01    Post subject:  

sc0ttman wrote:
--maxtextlength [i] The maximum character length of the icon text.
If set to 0, text truncation is disabled.


I tested this and works well, great improvement, thanks !
I'm using it in combination with --columns, this works nicely for me:
Code:
--maxtextlength 18 --columns 8


EDIT: One possible "problem": with a smaller resolution the text may overlap.
(in case of sharing a script, it's unpredictable how it will look)

Fred

_________________
Dog Linux website
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 832
Location: Connecticut, United States

PostPosted: Sun 02 Sep 2018, 21:59    Post subject:  

the --maxtextlength feature is working well. I have the same settings
Code:
--maxtextlength 18 --column 8


I modified the taskbar so "Places" is now "Apps" and opens up xlunch. as seen in Screenshot(9). This gives me the regular "Menu" and next to it "Apps" so I can open xlunch in a window and have the apps menu remain open.
Screenshot(9).png
 Description   
 Filesize   73.67 KB
 Viewed   262 Time(s)

Screenshot(9).png

Screenshot(8).png
 Description   
 Filesize   66.49 KB
 Viewed   264 Time(s)

Screenshot(8).png

Back to top
View user's profile Send private message Visit poster's website 
musher0

Joined: 04 Jan 2009
Posts: 12832
Location: Gatineau (Qc), Canada

PostPosted: Sun 02 Sep 2018, 22:29    Post subject:  

Hi guys.

I hate to ask you this, and take it any way you wish, but I need to know:

Do you guys really find this invasion of your desktop attractive, or are you
under the spell of some Pied Piper? (And 2 weeks from now you will have
forgotten all about it...)

BFN.

_________________
musher0
~~~~~~~~~~
Fidèle elle commença, ainsi elle restera. (Prov. canadien) /
Faithful she began, so will she stay. (Canadian prov.)
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 832
Location: Connecticut, United States

PostPosted: Mon 03 Sep 2018, 01:02    Post subject:  

why? does it bother you? if it does, then go mind your own business
I don't want to get into with you musher0.

yes probably I will stop experimenting with it in a week...or not.....trying some different concepts and for now it is fun and it is teaching me something. have you heard one criticism from me on anything you have ever done?

This about the 5th time you've disrespected me frenchy...what is your problem?
Back to top
View user's profile Send private message Visit poster's website 
musher0

Joined: 04 Jan 2009
Posts: 12832
Location: Gatineau (Qc), Canada

PostPosted: Mon 03 Sep 2018, 02:03    Post subject:  

No disrespect is intended -- to you or anybody else.

BTW, you, rockedge, are one of the people I respect the most here, because
of your twin cultures and because you knew to exercize judgment in a
certain business a few weeks ago.

I asked out of curiosity. My own esthetics for a desktop is for it to be as
clean as possible. I was wondering what the fascination was with Xlunch.

That's it. I thought it was a simple question. Sorry I asked. I sincerely
apologize if the style I used to ask it offended anyone.

Best regards.

PS. For the record, I'm not a "frenchy", I'm a "canuck".

_________________
musher0
~~~~~~~~~~
Fidèle elle commença, ainsi elle restera. (Prov. canadien) /
Faithful she began, so will she stay. (Canadian prov.)
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 3482
Location: holland

PostPosted: Mon 03 Sep 2018, 08:39    Post subject:  

Hi I've been playing some more with my little xlunch toy. Laughing


What I wanted to avoid is overlapping text when on smaller resolution and using --maxtextlength
Found that it works best without setting --columns:
Code:
xlunch --scroll --dontquit -W --border 6% --sideborder 6% --borderratio 50 --sideborderratio 50 \
         --background /usr/share/wallpapers/xlunch.jpg \
         --iconpadding 1  --leastmargin 80 --leastvmargin 1 --maxtextlength 18 \
         --paddingswap --iconsize 48 --textpadding 1 \
         --highlight /usr/share/icons/hicolor/48x48/apps/highlight.png


(setting --leastmargin 80 does most of the trick)

With resolution 1200x800 it will show automatically 8 columns and 7 rows:


With resolution 1024x768 it will show 6 columns and no overlapping text.


Fred

_________________
Dog Linux website
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 832
Location: Connecticut, United States

PostPosted: Mon 03 Sep 2018, 12:05    Post subject:  

Nice find Fred! I am going to follow your lead and try it out

musher0 I am going to try to remove all the desktop icons except for the drives and modify "Menu" on the taskbar to start xlunch. This is to see an alternative to the menus system jwm has. Just to see a really uncluttered desktop and if this is at all a working scenario. I like "canuck" a lot more than "frenchy" anyway....much more "Big Country" in a way.
Back to top
View user's profile Send private message Visit poster's website 
fredx181


Joined: 11 Dec 2013
Posts: 3482
Location: holland

PostPosted: Tue 04 Sep 2018, 03:48    Post subject:  

@sc0ttman, suggestion:
Add some more font paths in xlunch.c, around line 2363:

Code:
    imlib_add_path_to_font_path("/usr/share/fonts");
    imlib_add_path_to_font_path("/usr/local/share/fonts");
    imlib_add_path_to_font_path("/usr/share/fonts/truetype");
    imlib_add_path_to_font_path("/usr/share/fonts/truetype/dejavu");
    imlib_add_path_to_font_path("/usr/share/fonts/TTF");
    imlib_add_path_to_font_path("/usr/share/fonts/default/TTF");


I found that xlunch doesn't run on x-tahr (default font not found), making it as above fixes it for me.

Fred

_________________
Dog Linux website
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2599

PostPosted: Tue 04 Sep 2018, 18:19    Post subject:  

musher0 wrote:
I asked out of curiosity. My own esthetics for a desktop is for it to be as clean as possible. I was wondering what the fascination was with Xlunch.

I'm running Fatdog with cwm, so the default desktop is nothing but a mouse pointer (+ whatever wallpaper you might like to add). More often my 'wallpaper' is a video (music) i.e. maximised window - cwm adds no window decorations). Can't get much cleaner than that Smile Exec key + first few letters of a program name usually filters down to a single program.

Code:
#!/bin/sh
# Retreive screen height
SCREEN_HEIGHT=`xwininfo -root|sed '/Height/!d;s/.* //'`
# subtract 1 as 0..899 for 900 xwininfo height screen
SCREEN_HEIGHT=`expr ${SCREEN_HEIGHT} - 1` 
BOTTOM_LEFT="0x${SCREEN_HEIGHT}"
TOP_LEFT="0x0"
while : ;do
CURRENT_MOUSE_POSITION=`xdotool getmouselocation | sed 's/ sc.*//; s/.://g; s/ /x/'`
if [ "$CURRENT_MOUSE_POSITION" = "$BOTTOM_LEFT" ]; then
    skippy-xd
else
    if [ "$CURRENT_MOUSE_POSITION" = "$TOP_LEFT" ]; then
   # Assumes bind-key M-w "~/xlunch.sh" ... is set in .cwmrc
   xdotool mousemove 120 160  # move mouse away from corner so doesn't retrigger
   xdotool key alt+w space    # key combination to launch xlunch   
   fi
fi
sleep 0.2
done

I've added a hot corner script as above, that I launch in the background in .xinitrc just before running cwm, so when I mouse into the bottom left it launches skippy-xd, that shows all windows arranged around the screen where you can maximise, close, switch to any one by clicking on it. Mouse into top left launches a menu of programs that I've defined (most popular) however I'm considering swapping that hot corner to launch xlunch instead as I leave a 2 pixel gap at the top of screen in cwm where I can click to present that menu anyway.
Code:
#!/bin/sh
# xlunch.sh
~/xlunch --input /root/.config/xlunch/entries.dsv --scroll --columns 5 --font /usr/share/fonts/X11/TTF/DejaVuSerif.ttf/14

Odd thing, when I run it via a script it loads the page with programs fine, when invoked via a hotkey however it just shows the run prompt alone. Had to add the --input parameter to point to where the entries.dsv file actually sits (despite being in the default ~/.config/xlunch folder). I've edited the content of that down to a more limited set and in the order I prefer as fatdog already has a quickapps that shows all .desktop files (or rox of /usr/share/applications serves just as well).
Code:
# .cwmrc
#
gap                             2 0 0 0
ignore                          xclock
ignore                          xload
color inactiveborder            Black
color activeborder              "#494949"
color groupborder               "#01a252"
color urgencyborder             "#3d9751"
color selfont                   "#0034A9"
color font                      "#FFFFFF"
color menufg                    "#49F6F6"
color menubg                    "#333333"
#fontname                       "DejaVu Sans:size=11:antialias=true"
fontname                        "News10:size=11:antialias=true"
bind-key CM-comma               "mixerctl outputs.master=-5"
bind-key CM-period              "mixerctl outputs.master=+5"
#bind-key M-w          menu-cmd
bind-key M-w         "/root/xlunch.sh"
bind-key M-s         "skippy-xd"

command " xkill "      "xkill"
command " xterm "      "xterm"
command " seamonkey-spot "   "seamonkey-spot"
command " seamonkey-root "   "seamonkey"
command " geany "      "geany"
command " rox "         "rox"
command " mc "         "xterm mc"
command " mtpaint "      "mtpaint"
command " htop "      "xterm htop"
command " galculator "      "galculator"
command " scalc "      "soffice --calc"
command " writer "      "soffice --writer"
command " control panel "   "fatdog-control-panel.sh"
command " isomaster "      "isomaster"
command " pburn "      "pburn"
command " peasy disc "      "peasydisc"
command " mount sr0 "      "/bin/mount /dev/sr0 /mnt/sr0"
command " umount sr0 "      "/bin/umount /mnt/sr0"
command " exit "      "pkill cwm"
s1.jpg
 Description   Top left mouse hot corner shows xlunch
 Filesize   22.79 KB
 Viewed   111 Time(s)

s1.jpg

s2.jpg
 Description   Bottom left mouse hot corner shows skippy
 Filesize   22.97 KB
 Viewed   112 Time(s)

s2.jpg

s3.jpg
 Description   2 pixel gap at top of screen that maximised windows doesn't cover
 Filesize   62.75 KB
 Viewed   112 Time(s)

s3.jpg


_________________
( ͡° ͜ʖ ͡°) :wq

Last edited by rufwoof on Wed 05 Sep 2018, 04:56; edited 1 time in total
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2599

PostPosted: Tue 04 Sep 2018, 20:25    Post subject:  

--deleted--
_________________
( ͡° ͜ʖ ͡°) :wq

Last edited by rufwoof on Wed 05 Sep 2018, 07:19; edited 6 times in total
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 12832
Location: Gatineau (Qc), Canada

PostPosted: Tue 04 Sep 2018, 22:04    Post subject:  

Thanks for your reports, rufwoof.

I'll have a look at cwm.
Maybe try your XLunch, too.

BFN.

_________________
musher0
~~~~~~~~~~
Fidèle elle commença, ainsi elle restera. (Prov. canadien) /
Faithful she began, so will she stay. (Canadian prov.)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 3 [32 Posts]   Goto page: Previous 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0974s ][ Queries: 12 (0.0092s) ][ GZIP on ]