pUPnGO - 6Mb ISO - Basic Building Block Puplet
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
I reduced the sizes of some of the danpei xpm icons a bit (enough to save ~20kb in the compiled binary size)
which reminded me - I redid a bunch of the icons for the other gtk apps (png format)
... uploading both
I may as well describe what I did to shrink them
open with mtpaint
Image -> convert to rgb
Image -> convert to indexed
check Min Max Quantize and Floyd Steinberg
change the number at the top to 92 (maybe 93?) or less
save as whatever (works for at least xpm and png, possibly others)
(use your best judgement based on the image - lower number of colors reduces size some, but may end up looking like trash if it gets too low - most small icon pixmaps look ok at 16 colors)
this works because reducing the number of colors below 93 causes the pixels to be represented by a single character ... effectively cutting the size in half (not including the reduction for each color ... ~16B ea. I think)
Note: I have had issues with some versions of mtpaint with this method especially if you do further manipulations of the pallette - it will sometime lose a clear background and need to be edited in a text editor.
which reminded me - I redid a bunch of the icons for the other gtk apps (png format)
... uploading both
I may as well describe what I did to shrink them
open with mtpaint
Image -> convert to rgb
Image -> convert to indexed
check Min Max Quantize and Floyd Steinberg
change the number at the top to 92 (maybe 93?) or less
save as whatever (works for at least xpm and png, possibly others)
(use your best judgement based on the image - lower number of colors reduces size some, but may end up looking like trash if it gets too low - most small icon pixmaps look ok at 16 colors)
this works because reducing the number of colors below 93 causes the pixels to be represented by a single character ... effectively cutting the size in half (not including the reduction for each color ... ~16B ea. I think)
Note: I have had issues with some versions of mtpaint with this method especially if you do further manipulations of the pallette - it will sometime lose a clear background and need to be edited in a text editor.
- Attachments
-
- pixmaps.tar.gz
- (15.11 KiB) Downloaded 362 times
-
- danpei_icons.tar.gz
- (9.28 KiB) Downloaded 359 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
With mtPaint, it is 64 colors or less.technosaurus wrote:this works because reducing the number of colors below 93 causes the pixels to be represented by a single character ... effectively cutting the size in half
mtPaint doesn't even try to preserve transparent color when quantizing. It's best to set transparent color's palette slot to some wildly different RGB color (say magenta or green) before converting to RGB - and set transparent index to that palette color (whichever one it is now) after converting back to indexed.Note: I have had issues with some versions of mtpaint with this method especially if you do further manipulations of the pallette - it will sometime lose a clear background and need to be edited in a text editor.
All appearance of transparency being preserved is from when transparent color is at once the most prevalent and at index 0 - then max-min algorithm will place it at index 0 again.
Hi guys
Something else which may be useful, that I recently stumbled upon - underdog, that used to be in 2 series puppies, and Barry has now brought back
Basically, it is a script which allows a linux partitition to be added to the lower layer, and brought to the top layer so puppy can access it
I stumbled upon info about underdog, dated back to 2006, before I got into using puppy, and Barry picked up on it
He gave a really useful link to a 'How puppy works' page, which I hadn't seen referenced before, also, which people may find useful, bearing in mind, that changes have been made
The underdog bit: In the section on Architecture overview,
[though the usual caveats apply...don't blame me if you break something]
http://www.murga-linux.com/puppy/viewtopic.php?t=13750
http://puppylinux.com/development/howpuppyworks.html
http://www.murga-linux.com/puppy/viewtopic.php?t=13750
Aitch
Something else which may be useful, that I recently stumbled upon - underdog, that used to be in 2 series puppies, and Barry has now brought back
Basically, it is a script which allows a linux partitition to be added to the lower layer, and brought to the top layer so puppy can access it
I stumbled upon info about underdog, dated back to 2006, before I got into using puppy, and Barry picked up on it
He gave a really useful link to a 'How puppy works' page, which I hadn't seen referenced before, also, which people may find useful, bearing in mind, that changes have been made
The underdog bit: In the section on Architecture overview,
The actual underdog code, as used in early Puppy versions is shown in the Initial ramdisk section, where the code is listed for anyone wanting to try it,What the above diagram is intended to convey is that the bottom layer is a partition, not the "underdog.lnx" file itself. File underdog.lnx is just a text file, containing the name of a partition, for example "hda1".
At bootup Puppy will read underdog.lnx and will mount the partition as the bottom layer. If that partition happens to have a Linux distro installed in it, then the entire distro filesystem will "show through" on the top layer of Puppy's unionfs.
It will look like a normal Puppy, running JWM window manager or whatever, same desktop, but everything in the underlying distro is available to be executed. All the applications, compile environment, package manager, etc.
[though the usual caveats apply...don't blame me if you break something]
http://www.murga-linux.com/puppy/viewtopic.php?t=13750
http://puppylinux.com/development/howpuppyworks.html
http://www.murga-linux.com/puppy/viewtopic.php?t=13750
Aitch
Attached the first try to backport gktdialog to gtk1. Do not expect everything working but main things should. Included a test-script (gtk_button) demonstrating what seems to work. Only xpm-images supported, edit-widget works but do not catch content yet. Shipped as static build and with images for the "stock"-icons.
If you need the present source code or if you would like to help improving the things further pm me.
If you need the present source code or if you would like to help improving the things further pm me.
- Attachments
-
- snap0000.png
- And the thing running the test script...
- (68.81 KiB) Downloaded 1130 times
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
Excellent! I can work with that.goingnuts wrote:Attached the first try to backport gktdialog to gtk1.
NOTE: it is extremely faster to use
Code: Select all
echo "$MAIN_DIALOG"|gtkdialog -s
Code: Select all
#!/bin/sh
MAIN_DIALOG='<wtitle>Test of backported gtkdialog 0.58.11</wtitle>
<vbox>
<table><variable>TABLE</variable>
<label>File Name |Size |Date</label>
'`busybox tar -tvf $1 | busybox awk '{print "<item>" $6 "|" $3 "|" $4 "</item>"}'`'
<action>echo You selected $TABLE</action>
</table>
<hbox>
<button ok></button>
<button cancel></button>
</hbox>
</vbox>'
echo "$MAIN_DIALOG"|gtkdialog -s
#now see with VAR
export MAIN_DIALOG
gtkdialog --program MAIN_DIALOG
http://mail.gnome.org/archives/gtk-list ... 00270.html
... but maybe we can just ifdef warnings from the sources altogether
should we call it gtkdlg1 (or whatever) to avoid name conflicts in case others want to use it?
I got some weird characters at the beginning of usage, but other than that, seems to be working nicely.
to handle the messages etc... this template should work
Code: Select all
gtkdialog --program MAIN | while read LINE || [ "$LINE" ] ; do
case "$LINE" in
#custom parameters here
*=*)eval $LINE
*)echo "$LINE"
esac
done
this and others can be set in the gtkrc file (I am attaching the full gtk1 tutorial since it is hard to find these days) which has this in section 21
When your application starts, you should include a call to:
void gtk_rc_parse( char *filename );
- Attachments
-
- GTK-1.2-tutorial.tar.gz
- (151.14 KiB) Downloaded 345 times
Last edited by technosaurus on Fri 03 Feb 2012, 05:06, edited 2 times in total.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
I have started a new thread for the gtkdlg1 backport...here
- antiloquax
- Posts: 405
- Joined: Fri 27 Jan 2012, 09:17
This may be a stupid question, sorry.
I can boot into PupNGo. I've loaded the GUI sfs. But what command do I issue to start the GUI?
I've had a look using defaultfilemanager, but couldn't see anything that worked!
thanks,
mark
I can boot into PupNGo. I've loaded the GUI sfs. But what command do I issue to start the GUI?
I've had a look using defaultfilemanager, but couldn't see anything that worked!
thanks,
mark
My System:Arch-Arm on RPi!
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
Try "xwin" - depending on which version you use - but if you loaded the GUI-sfs via the firstboot script I guess it states
"If you have just installed the GUI_412.sfs type 'xwin' to start the graphical user interface" .. or something like that.
If it is one of the very first versions it might be 'startx'...
Hope you succeed.
"If you have just installed the GUI_412.sfs type 'xwin' to start the graphical user interface" .. or something like that.
If it is one of the very first versions it might be 'startx'...
Hope you succeed.
- antiloquax
- Posts: 405
- Joined: Fri 27 Jan 2012, 09:17
goingnuts/techno
I just came across a window manager called awesome
Any use for this project? it uses C and Lua, AFAIK
http://awesome.naquadah.org/
Aitch
I just came across a window manager called awesome
Any use for this project? it uses C and Lua, AFAIK
http://awesome.naquadah.org/
Aitch
Thanks for the link - I will look into that. atm I am full time on gtkdlg1...Aitch wrote:goingnuts/techno
I just came across a window manager called awesome
Any use for this project? it uses C and Lua, AFAIK
http://awesome.naquadah.org/
Aitch
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
I wouldn't bother
e16 would be a much nicer (smaller/simpler) choice, it uses its own eesh instead of lua and it has a more permissive license, a lot of the tools will work with gtk1 and I even found a hack to do desktop icons with it ... best of all it can look really nice with the right themes
though it will need to be patched for static builds because it uses dlopen to try and grab calls to libX11 (doesn't seem too complicated though)
...until someone makes "fpwm" that is ... a window manager in the style of a first person shooter (i've been mulling it over for a while)
with dependencies like that we may as well use compiz and lots of plugins128 pkg_check_modules(AWESOME_COMMON_REQUIRED REQUIRED
129 xcb>=1.6)
130
131 pkg_check_modules(AWESOME_REQUIRED REQUIRED
132 glib-2.0
133 cairo
134 x11
135 oocairo
136 oopango
137 xcb-randr
138 xcb-xtest
139 xcb-xinerama
140 xcb-util>=0.3.8
141 xcb-keysyms>=0.3.4
142 xcb-icccm>=0.3.8
143 xcb-image>=0.3.0
144 cairo-xcb
145 libstartup-notification-1.0>=0.10
146 xproto>=7.0.15
147 imlib2
148 libxdg-basedir>=1.0.0)
e16 would be a much nicer (smaller/simpler) choice, it uses its own eesh instead of lua and it has a more permissive license, a lot of the tools will work with gtk1 and I even found a hack to do desktop icons with it ... best of all it can look really nice with the right themes
though it will need to be patched for static builds because it uses dlopen to try and grab calls to libX11 (doesn't seem too complicated though)
...until someone makes "fpwm" that is ... a window manager in the style of a first person shooter (i've been mulling it over for a while)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
Another window manager...
I found this one on Giles Orr's window manager site:
AHWM
It hasn't been touched in 10 years, but has a lot of documentation, and only relies on xlib, libc and some POSIX functions, Does not rely on any toolkit libraries.
It compiles ok, but had to make the minor alterations that Giles Orr mentions in his notes.
It is ancient, I know, but may be useful.
I'll upload the pet I made if anyone wants a dabble (best if I tested it a bit more first...)
AHWM
It hasn't been touched in 10 years, but has a lot of documentation, and only relies on xlib, libc and some POSIX functions, Does not rely on any toolkit libraries.
It compiles ok, but had to make the minor alterations that Giles Orr mentions in his notes.
It is ancient, I know, but may be useful.
I'll upload the pet I made if anyone wants a dabble (best if I tested it a bit more first...)
Wow, Giles Orr's site is amazing, hadn't seen that before....
AHWM looks interesting, Keef
I'd never considered focus to be broken, though it may have changed since 2002?
I'm just used to windows auto focus if on top, and backgrounded windows being in bottom taskbar, unless clicked in - maybe just habits?
Aitch
AHWM looks interesting, Keef
I'd never considered focus to be broken, though it may have changed since 2002?
I'm just used to windows auto focus if on top, and backgrounded windows being in bottom taskbar, unless clicked in - maybe just habits?
Aitch
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
for the ultra-minimalist window managers, I already posted mcwm (though it is a bit outdated now), its by far the lightest when statically compiled due to using xcb instead of X11 (X11 doesn't statically link well though tinyx11 gets us a bit closer)... and it has an ISC license ... some others xcb window managers are i3, uuwm, uwm (based on jwm) there is even a composite manager called unagi
Edit:
several pages back we were trying to find a way to use a running instance of a multicall binary to run new "applets" rather than spawning a whole new instance (the way ROX-Filer does) I think we had everything except the mechanism to get new args into the running process. ---Solved (I think, see the notes on apipe).
Edit:
several pages back we were trying to find a way to use a running instance of a multicall binary to run new "applets" rather than spawning a whole new instance (the way ROX-Filer does) I think we had everything except the mechanism to get new args into the running process. ---Solved (I think, see the notes on apipe).
Code: Select all
#include <stdio.h>
void argsfromstdin(void){ /* TODO accept a function pointer to run ac, av */
char s[255], av[255][255];
unsigned char i=0, pos=0, ac=0;
enum quotes_t{QUOTED=0,UNQUOTED}quotes=UNQUOTED;
//open a file ./apipe and store its file descriptor in variable apipe
//use mkfifo /tmp/apipe to create it ... or you can use stdin
//FILE * apipe = fopen("/tmp/apipe","r");;
fgets(s,255,stdin);
while (i<strlen(s)) {
/* '!'=33, 'ÿ'=-1, '¡'=-95 outside of these are non-printables */
if ( quotes && ((s[i] < 33) && (s[i] > -1) || (s[i] < -95))){
av[ac][pos] = '\0';
if (av[ac][0] != '\0') ac++;
pos = 0;
}else{
if (s[i]=='"'){ /* support quoted strings */
if (pos==0){
quotes=QUOTED;
}else{ /* support \" within strings */
if (s[i-1]=='\\'){
av[ac][pos-1] = '"';
}else{ /* end of quoted string */
quotes=UNQUOTED;
}
}
}else{ /* printable ascii characters */
av[ac][pos] = s[i];
pos++;
}
}
i++;
}
/* TODO accept a function pointer to run ac, av */
#ifdef DEBUG
#include <string.h>
#define write1(s) write(1, s, strlen(s))
while (ac-->0) {write1(av[ac]);write1("\n");}
#endif
}
int main(int argc, char *argv[]){
argsfromstdin();
}
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
technosaurus: Had not seen your update - would be cool if it works!
The latest post about window managers reminded me that I had a static build of conky lying around.
Also found that gxine-0.2.1 is gtk1..now I only need to get a static uclibc xinelib build...
The latest post about window managers reminded me that I had a static build of conky lying around.
Also found that gxine-0.2.1 is gtk1..now I only need to get a static uclibc xinelib build...
- Attachments
-
- snap0002.png
- (6.7 KiB) Downloaded 1394 times
-
- conky-1.3.0-486.tar.gz
- static build conky
- (93.5 KiB) Downloaded 375 times
-
- Posts: 282
- Joined: Wed 16 Dec 2009, 21:38
- Location: Earth
About GetGUI:
I modified somewhat, now it can recognize Dialog/Xdialog syntax and following
options:
--title
--backtitle
--ok-label
--yes-label
--cancel-label
--no-label
--no-cancel
--default-item
--password
--msgbox
--inputbox
--yesno
--menu
--menubox
--radiolist
--checklist
--combobox
--fselect
Getgui's native options are not broken (I hope). Some default values are changed for my own needs (default fonts, button color etc..).
Also, a program name is changed to "xgetgui" to avoid copiright conflicts.
I modified somewhat, now it can recognize Dialog/Xdialog syntax and following
options:
--title
--backtitle
--ok-label
--yes-label
--cancel-label
--no-label
--no-cancel
--default-item
--password
--msgbox
--inputbox
--yesno
--menu
--menubox
--radiolist
--checklist
--combobox
--fselect
Getgui's native options are not broken (I hope). Some default values are changed for my own needs (default fonts, button color etc..).
Also, a program name is changed to "xgetgui" to avoid copiright conflicts.
- Attachments
-
- xgetgui-0.1a.tar.gz
- (151.28 KiB) Downloaded 369 times
SUUM CUIQUE.
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
I went through and fixed most of the syntactical build errors, and tweaked the font and border settings so it isn't so fugly. Still needs a lot of cleanup though ... mainly how the functions and variables are declared... also made a build script.PANZERKOPF wrote:About GetGUI:
I modified somewhat, now it can recognize Dialog/Xdialog syntax and
...
Getgui's native options are not broken (I hope). Some default values are changed for my own needs (default fonts, button color etc..).
Also, a program name is changed to "xgetgui" to avoid copiright conflicts.
Edit @PANZERKOPF, btw most of the fixes were not your code - just legacy stuff and from ripping chunks out of ploticus ... also I added the list of widgets to the --help (though I didn't put any order to them or descriptions or formatting)
- Attachments
-
- xgetgui-T.tar.gz
- (153.31 KiB) Downloaded 339 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].