Have GUI skills? Can you help? Easy desktop icons setup!

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
gcmartin

Have GUI skills? Can you help? Easy desktop icons setup!

#1 Post by gcmartin »

@StemSee has appealed to the forum for someone with GUI skills to take his terminal commands into a GUI. One would assume this to land somewhere in a PUP's menu.

His appeal is here and the terminal commands are here.

Would someone with GUI skills consider taking a look for him?
Last edited by gcmartin on Tue 23 Dec 2014, 21:14, edited 2 times in total.

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#2 Post by Rattlehead »

StemSee mentions a GUI somewhere in his thread, so maybe this is no longer necessary, but I saw this post and decided to try my hand... A very rudimentary script, but maybe of profit for a user who knows nothing about terminals.

Code: Select all

#!/bin/bash
#
#
check_prep () {
	#Checks if nicons has already gone through the prep (it must be run 3 times), otherwise does the prep
	if [ ! -f /tmp/niconsready ] 
	then 
		nicons
		nicons
		nicons
		echo > /tmp/niconsready
	fi
}
function draw_gui () {
export MAIN_DIALOG='
<frame NICONS>
 <vbox>
  <hbox>
    <button>
      <label>Arrange Icons</label>
      <action>rxvt -e nicons arrange</action>
    </button>
    <button>
      <label>Icons On-Off</label>
      <action>nicons</action>
      <action>exit</action>
    </button>
  </hbox>
  <hbox>
    <button>
      <label>Save Current Configuration</label>
      <action>nicons save</action>
    </button>
    <button>
      <label>Load Configuration</label>
      <action>nicons load</action>
    </button>
  </hbox>
  <hbox>
    <button>
      <label>Reset</label>
      <action>nicons reset</action>
    </button>
   <button ok></button>
  </hbox>
 </vbox>
 </frame>
'

gtkdialog --program=MAIN_DIALOG

}

check_prep
draw_gui

exit 


Issues:
1:for some reason, after upgrading to version 2.4., the save and load commands have stopped working. "nicons load" just leaves an empty desktop, and when you run "nicons" again, it returns to the icons existing before becoming blank, not the ones saved with "nicons save".

2:For some reason, the "cross" arrangement does not work either... Blank desktop too
Attachments
nicons_gui_v1_screenshot.png
(14.93 KiB) Downloaded 532 times

stemsee

#3 Post by stemsee »

@rattlehead

Hola hombre! Gracias por su obra! Me parece esta muy bien.

Yes if you look at some of the functions they have in the first three or four lines the word 'nicons' this was to turn to the iconless desktop, but that was also in the filesfn.... it is fixed now and I will upload 2.5 after a bit more testing. For load function must install desktopiconarrangement.pet by Trio, my own script didn't work and I don't know why!!!


Your gui is a start, but I envisage a gui with dials or sliders to alter the possible variables for positioning X,y, and number of icons, and radius-+, and start point, and distance between icons, and the ability to chain functions together. Quite advanced!

stemsee

#4 Post by stemsee »

Thanks @ Rattlehead

You got me started now!

Code: Select all

#!/bin/bash
#
#
check_prep () {
   #Checks if nicons has already gone through the prep (it must be run 3 times), otherwise does the prep
   if [ ! -f ~/Choices/ROX-Filer/ppin ]
   then
   nicons
   fi
}
function draw_gui () {
export MAIN_DIALOG='
<frame NIcons>
 <vbox>
  <hbox>
    <button>
      <label>Arrange Icons</label>
      <action>rxvt -e nicons arrange</action>
    </button>
    <button>
      <label>Icons On-Off</label>
      <action>nicons</action>
      <action>exit</action>
    </button>
  </hbox>
  <hbox>
    <button>
      <label>Save Current Configuration</label>
      <action>nicons save</action>
    </button>
    <button>
      <label>Load Configuration</label>
      <action>nicons load</action>
    </button>
  </hbox>
  <hbox>
    <button>
      <label>Reset</label>
      <action>nicons reset</action>
    </button>
    <button>
      <label>Repo</label>
      <action>nicons repo</action>
      <action>exit</action>
    </button>
    <button>
      <label>Drives</label>
      <action>nicons d</action>
      <action>exit</action>
    </button>
    <button>
      <label>Two iconed Desktops </label>
      <action>nicons two</action>
      <action>exit</action>
    </button>
    <button>
      <label>Exit Two</label>
      <action>nicons pip</action>
      <action>exit</action>
    </button>
   <button ok></button>
  </hbox>
 </vbox>
 </frame>
'

gtkdialog --program=MAIN_DIALOG

}

check_prep
draw_gui

exit 

stemsee

#5 Post by stemsee »

I have the basic functions working from gui interfaces now, Including style layouts selection, load and save (got my original efforts working = a bit faster than desktopiconmanager). Just one small bug to work out.

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#6 Post by Rattlehead »

Hey Stemsee,

thank you for your kind words, I'm glad that my short script got you inspired. Muy amable!

I've tried the new gui and found some issues (maybe it's because I run Slacko 5.5., and the GTK dialog versions change from one puppy to another, something of that kind).

When I press 'repo', a white screen with numbers appears only for a second, then there is a blank gtkdialog screen (see screenshot) that cannot be closed and have to be killed. The computer becomes sluggish and the desktop blinks from time to time. This keeps on happening after killing the gtk screen, so there is still something going on in the wings. The only way to get out of this mess is getting out of X and then xwin again into it...

The same sluggish+blinking behavior happens with 'Drives' and 'Two iconed Desktops'. 'Reset' works fine, though.

It seems there is still some way to go before prime time... :roll:
Attachments
capture11502.png
(1.59 KiB) Downloaded 327 times

stemsee

#7 Post by stemsee »

Try this latest gui.

Note the script has undergone more development but not all features working with the gui. But sav and load and background setting works.i

Code: Select all

#!/bin/bash
#
#
check_prep () {
   #Checks if nicons has already gone through the prep (it must be run 3 times), otherwise does the prep
   if [ ! -f ~/Choices/ROX-Filer/ppin ]
   then
   nicons
   fi
}
function draw_gui () {
export MAIN_DIALOG='
<frame NIcons-1.6>
 <vbox>
  <hbox> 
	<button>
      <label>Switch Pins</label>
      <action>nicons</action>
      <action>exit</action>
    </button>
    <button>
		<label>Layout Style</label>
		<action>nicons arrange</action>
		      <action>exit</action>
		</button>
   <button>
      <label>Icon Repo</label>
      <action>nicons repo</action>
      <action>exit</action>
    </button>
    <button>
      <label>Reset All</label>
      <action>nicons reset</action>
      <action>exit</action>
    </button>
  </hbox>
  <button>
      <label>Refresh Drives</label>
      <action>nicons pevent</action>
    </button>
    <button>
      <label>Layout Styles Including Drives</label>
      <action>nicons d</action>
      <action>exit</action>
    </button>
    <button>
      <label>Strip Icon Labels</label>
      <action>nicons noname</action>
      <action>exit</action>
    </button>
    <button>
	<label>Two PuppyPins</label>
	<action>nicons two</action>
	<action>exit</action>
	</button>
    <button>
    <label>Exit Two Pins</label>
    <action>nicons pip</action>
    </button>
    <button>
      <label>Remove All Icons</label>
      <action>nicons removeall</action>
    </button>
    <button>
      <label>Create/Add Icon/Repo</label>
      <action>nicons add</action>
    </button>
    <hbox>
    <button>
      <label>Save Current Layout</label>
      <action>nicons save</action>
    </button>
    <button>
      <label>Load Saved Layout</label>
      <action>nicons load</action>
    </button>
  </hbox>
  <hbox>
  <button>
    <label>BackGround Wallpaper</label>
    <action>nicons loadbg</action>
    </button>
   <button ok></button>
   <button cancel></button>
  </hbox>
 </vbox>
 </frame>
'

gtkdialog --program=MAIN_DIALOG

}

check_prep
draw_gui

exit
Last edited by stemsee on Tue 23 Dec 2014, 17:35, edited 1 time in total.

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#8 Post by Rattlehead »

Hey Stemsee, here is my new 'report' (hasn't the new gui become too complicated, btw?)


Working well
========

*Switch pins

*Reset all

*Strip icons labels

*Two puppy pins

*Exit two pins

*Remove all icons

*Background paper


Issues
====

*Layout style - Does nothing

*Icons repo - White screen with numbers for a second then blank gtk
window+sluggishness that requires to go out of X and back again

*Layout styles including drives - blank gtk window+sluggishness

*Create/Add Icon/Repo - Shows for only 1 second a rox-filer screen (I think it is /usr/share/renamed)

*Save current layout - Does nothing

*Load saved layout - Does nothing


Not sure
=====

*Refresh drives - Does nothing - What is it supposed to do?

stemsee

#9 Post by stemsee »

Try this updated nicons.gz (fake .gz extension)

Refresh drives causes puppy_event to refresh drive icons. It works for me and depends on your desktop drive icon manager settings!

Layout Style - does nothing in 'Two Pins' mode. (some styles not working right now, but I know how to fix them.) DEDPENDECY is YAD (newer version)

Also Include Drives Layout works in term.

Icons Repo - only works after create repo.
Attachments
nicons.gz
(45.89 KiB) Downloaded 164 times

stemsee

#10 Post by stemsee »

Nicons-2.6 with GUI (niui)

Simplified, but cost three pre-set layouts.
Attachments
capture32145.jpg
(26.13 KiB) Downloaded 151 times
Nicons-V2.8.pet
Nicons-2.8
(13.37 KiB) Downloaded 180 times
Last edited by stemsee on Thu 25 Dec 2014, 21:35, edited 1 time in total.

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#11 Post by LazY Puppy »

Hi.

I had downloaded 2.6 just to examine the code for the refresh of the drive icons. But when I'm clicking the button to refresh the drive icons, nothing seems to happen.

Do I need to change anything first on the desktop or drive icons?
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
trio
Posts: 2076
Joined: Sun 21 Dec 2008, 15:50
Location: अनà¥￾मोदना

#12 Post by trio »

RSH,

Download and find the refresh drive icons from my desktop icon arrangement.

stemsee

#13 Post by stemsee »

Hi @RSH

This is the code for drive refresh

Code: Select all

if [ "$1" = pevent ]; then
pevencl () {
	if [[  ! "$(pidof pup_event_frontend_d)" ]] ;then
	pup_event_frontend_d &
	fi
[[ -x /root/Startup/xonclock* ]] && /root/Startup/xonclock*
exit
}
pevencl
fi
It works for me. What are your settings in Menu>Desktop>Desktop Drives Icon Manager ?

stemsee

#14 Post by stemsee »

By the way the three more surround presets are available using command line

Code: Select all

nicons add
Here is a a bug fix for 'Bottom' Layout that i didn't notice in 2.6

There is a lot of repeated code in my script, but when I reduced everything to variables it didn't work!! Even adding the gui caused big problems. So I will just leave it for the moment.

nicons-2.7
Attachments
Nicons-V2.7.pet
fixed 'Bottom' layout
(13.33 KiB) Downloaded 171 times

User avatar
trio
Posts: 2076
Joined: Sun 21 Dec 2008, 15:50
Location: अनà¥￾मोदना

#15 Post by trio »

https://github.com/puppylinux-woof-CE/w ... entmanager

RSH, you'll find the refresh code at github (link above). I made the changes for future woof-CE built. Stemsee did not adopt the code from "desktop icon arrangement" fully, he just stated that he wanted to incorporate some of my code, so I didn't explain cuz I wasn't asked. I got the code adopting (with long testing and modification) from shinobar's "refresh desktop"

Regards

stemsee

#16 Post by stemsee »

ditto

"Due credit where credit is due"

User avatar
trio
Posts: 2076
Joined: Sun 21 Dec 2008, 15:50
Location: अनà¥￾मोदना

#17 Post by trio »

stemsee wrote:"Due credit where credit is due"
I really don't need credit. Just leading RSH to the right code

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#18 Post by Rattlehead »

Try this updated nicons.gz (fake .gz extension)
Sorry if this is very obvious, but what am I supposed to do with this file? Turn the .gz into .pet and then run it? I though I'd ask before shooting myself in the foot...

Happy holidays to everybody :)

stemsee

#19 Post by stemsee »

Rattlehead

that nicons.gz script is now obsolete, download the subsequent Nicons-2.7.pet. Remove previous version first then install this newer one!

Feliz Compleannos Jesus!

stemsee

#20 Post by stemsee »

updated to 1.8

Added delete wallpapers function.


see first post for .pet
Attachments
capture32526.jpg
(19.7 KiB) Downloaded 104 times
capture32145.jpg
(26.13 KiB) Downloaded 108 times

Post Reply