Git Product home page Git Product logo

classic-colors's People

Contributors

justinmeiners avatar magnetarrocket avatar rpendleton 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

Watchers

 avatar  avatar  avatar  avatar  avatar

classic-colors's Issues

Problems compiling with pkgsrc

On my 2nd M1 mac, I have pkgsrc as the sole package-manager, however, attempting to compile Classic-colors there reveals a new set of problems:

  • pkg-config is not installed by default.

  • xorgproto must be installed

  • again, -I and -L flags have not been set properly, pkgsrc is a different beast then compared to homebrew.

if anybody's curious of why I have netBSD's package manager on my Mac:
http://pkgsrc.joyent.com/install-on-osx/

ps: I've attempted to install netBSD on a virtual machine to see if I could also compile classic-colors on it (to see if it was different in steps compared to the pkgsrc of macOS), however I can't find a suitable virtual machine, and also all attempts at installing fail. Might try my raspberry Pi when I have the time.

Add support for anti-aliased fonts in user interface

Motif does support anti-aliased fonts using XFT.
Current default usage of classic-colors does not look as well as it could, and that might deter some users.
If you start the program with the following options, you will have the user interface in anti-aliased fonts.
classic-colors -xrm "*renderTable: rt" -xrm "rtfontType: FONT_IS_XFT" -xrm "rtfontName: Sans" -xrm "rtfontSize: 10"

Program should do this internally by default, or offer a script for starting the binary with these options.
The user could then edit the script to change font typeface and size.
Ultimately, the program should read some system default font or offer user interface for selection of default user interface font, but at this early stage, it is probably an overkill.

For XFT font selector, check the source of xnedit
https://sourceforge.net/projects/xnedit/
Preferences > Text fonts > Browse

Filling a non-canvas area crashes classic-colors

I found a easy way to make classic-colors go kablooie, just use the bucket tool set to "neighbor" (the default i think) and click on a non-canvas area, returns with the error of:

Assertion failed: (sx >= 0 && sy >= 0 && sx <= W && sy <= H), function cc_bitmap_flood_fill, file bitmap.c, line 540.

I think there should be a simple routine if said part fails, action from said routine is simply nothing and let the program continue running i think.

Bad visual check in ui_draw.c

You have too strict checking of visuals on startup.
I have an Nvidia graphics card on Linux with 11 bits per rgb, so program fails on this check:

    // 8 bits per component
    if (info_list->bits_per_rgb != 8)
    {
        fprintf(stderr, "XVisual has invalid bits per rgb: %d\n", info_list->bits_per_rgb);
        return 0;
    }

But if I comment it out, it works properly, so this check is either not necessary or incorrect.

Output of xdpyinfo on my computer

name of display: :0
version number: 11.0
vendor string: The X.Org Foundation
vendor release number: 11906000
X.Org version: 1.19.6
maximum request size: 16777212 bytes
motion buffer size: 256
bitmap unit, bit order, padding: 32, LSBFirst, 32
image byte order: LSBFirst
number of supported pixmap formats: 7
supported pixmap formats:
depth 1, bits_per_pixel 1, scanline_pad 32
depth 4, bits_per_pixel 8, scanline_pad 32
depth 8, bits_per_pixel 8, scanline_pad 32
depth 15, bits_per_pixel 16, scanline_pad 32
depth 16, bits_per_pixel 16, scanline_pad 32
depth 24, bits_per_pixel 32, scanline_pad 32
depth 32, bits_per_pixel 32, scanline_pad 32
keycode range: minimum 8, maximum 255
focus: window 0x4e00006, revert to PointerRoot
number of extensions: 29
BIG-REQUESTS
Composite
DAMAGE
DOUBLE-BUFFER
DPMS
DRI2
GLX
Generic Event Extension
MIT-SCREEN-SAVER
MIT-SHM
NV-CONTROL
NV-GLX
Present
RANDR
RECORD
RENDER
SECURITY
SHAPE
SYNC
X-Resource
XC-MISC
XFIXES
XFree86-VidModeExtension
XINERAMA
XINERAMA
XInputExtension
XKEYBOARD
XTEST
XVideo
default screen number: 0
number of screens: 1

screen #0:
dimensions: 3840x2160 pixels (712x400 millimeters)
resolution: 137x137 dots per inch
depths (7): 24, 1, 4, 8, 15, 16, 32
root window id: 0x1ef
depth of root window: 24 planes
number of colormaps: minimum 1, maximum 1
default colormap: 0x20
default number of colormap cells: 256
preallocated pixels: black 0, white 16777215
options: backing-store WHEN MAPPED, save-unders NO
largest cursor: 256x256
current input event mask: 0xfa8033
KeyPressMask KeyReleaseMask EnterWindowMask
LeaveWindowMask ExposureMask StructureNotifyMask
SubstructureNotifyMask SubstructureRedirectMask FocusChangeMask
PropertyChangeMask ColormapChangeMask
number of visuals: 132
default visual id: 0x21
visual:
visual id: 0x21
class: TrueColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 11 bits
visual:
visual id: 0x22
class: DirectColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 11 bits
...

inability to compile on macbook m1

I'm unable to compile classic-colors on a m1 macbook air, attempting to see if this is also a problem with any other motif apps (mwm-utils, emwm, xnedit) all showed a similar problem (this is the classic-colors program):

In file included from ui_color.c:18:
./ui.h:26:10: fatal error: 'Xm/Xm.h' file not found
#include <Xm/Xm.h>
^~~~~~~~~
1 error generated.
make: *** [ui_color.o] Error 1

all showed that Xm.h was absent, now my preferences is working on a external HHD as I don't have much space on my mac, and i don't want to write to when possible on SSD's. also the file system on the external HHD is case-sensitive because i wanted to have a "fully unix disk".

now someone had found a way around this:
https://stackoverflow.com/questions/46872922/broken-c-std-libraries-on-macos-high-sierra-10-13/47401866#47401866

But the main problem i have i think is a way to automate the above so i don't have to do this repeatedly, a shell script would be nice but i'm new to zsh shell scripting (don't ask me how loooooooong i've been doing most of my programing stuff on windows).

also i don't have a /usr/local/include directory.

Setting "*backgroundBitmap:" in xDefaults removes all visible color options

I have a file to induce this abnormality that makes reading colors at first glance impossible, the screenshot of the problem:
Screen Shot 2022-05-01 at 3 16 00 AM

rainbow_barf
xpm below:

static char *rainbow_barm[] = {
/* columns rows colors chars-per-pixel */
"16 16 28 1",
"  c black",
". c #444444",
"X c #705E78",
"o c #667367",
"O c navy",
"+ c #0000BB",
"@ c #7C05F2",
"# c #008000",
"$ c #00BB00",
"% c green",
"& c #008080",
"* c cyan",
"= c #BB0000",
"- c #804000",
"; c #BB5D00",
": c #FF6600",
"> c #800080",
", c #BB00BB",
"< c magenta",
"1 c #808000",
"2 c #BBBB00",
"3 c #F2CF1D",
"4 c yellow",
"5 c #BBBBBB",
"6 c #8080FF",
"7 c #80FF80",
"8 c #FF8080",
"9 c #CAD9A9",
/* pixels */
" 9;O+#>,<%782.5o",
"= 9;O+#>,<%782.5",
"3= 9;O+#>,<%782.",
"43= 9;O+#>,<%782",
"143= 9;O+#>,<%78",
"-143= 9;O+#>,<%7",
"$-143= 9;O+#>,<%",
"X$-143= 9;O+#>,<",
"oX$-143= 9;O+#>,",
"7oX$-143= 9;O+#>",
"67oX$-143= 9;O+#",
":67oX$-143= 9;O+",
"@:67oX$-143= 9;O",
"&@:67oX$-143= 9;",
"*&@:67oX$-143= 9",
"o*&@:67oX$-143= "
};

Provide better instructions for increasing shared memory size on Mac, in order to support MIT-SHM

Normal Mac user might not be familiar with proper ways of increasing shared memory size, in order to support MIT-SHM extension, which makes program work with decent speed.

In the installation instructions for MacOS, instruct the user to create file /etc/sysctl.conf
with the following contents:
kern.sysv.shmmax=134217728
kern.sysv.shmmin=1
kern.sysv.shmmni=1024
kern.sysv.shmseg=256
kern.sysv.shmall=32768
and reboot the system after creating the file.
You could also provide a script to be executed with sudo permissions, which would create such a file, or append this contents to existing /etc/sysctl.conf file.
Anyway, at the program's current level (no .dmg installation file), adventurous Mac users will be able to do this change.

Wont build on NetBSD

I'm guessing the makefile needs some tweaks but I just assumed that if it builds on OBSD then it should build on Net.

after running ./configure I get:

~/Downloads/classic-colors $ make
make: don't know how to make icons/%.png. Stop

make: stopped in /home/dave/Downloads/classic-colors

it gets immediately stopped in it's tracks. I'm not so savvy to figure this out, any ideas?
Cheers

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.