You are not logged in.

#1 2016-11-13 21:45:31

ohnonot
...again
Registered: 2015-09-29
Posts: 3,674
Website

Xcalc theming awesomeness

Mod Note: Split from https://forums.bunsenlabs.org/viewtopic.php?id=3000
-HoaS

brontosaurusrex wrote:

A "why" would be great addition as well.

why xcalc?
because it's there. because it starts up in about 3.5 µs, and i can enter equations like this:

5*9=

oh, and xcalc can be made to look quite nice thanks to the sophisticated toolkit!
xcalc.png

i can see the appeal of your little script though.


Head_on_a_Stick wrote:

For more complex operations, I prefer xcalc(1) -- death to toolkits! devil

technically that is not true; not sure if it's motif, but whatever X apps use with Xresources, it is some kind of toolkit.
actually i was just reading this... big_smile

Offline

#2 2016-11-14 09:34:19

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,736

Re: Xcalc theming awesomeness

@ohnonot: is the look defined in .Xresources? Care to share?

Online

#3 2016-11-14 21:40:24

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Xcalc theming awesomeness

@ohnonot -- nice, I didn't know about that, thanks smile

brontosaurusrex wrote:

Care to share?

Try:

cat /etc/X11/app-defaults/XCalc-color >> ~/.Xdefaults

EDIT2: don't do this, see my next post.

For the classic TI-30 theme:

2016-11-14-213747_1280x800_scrot.th.png

cool

EDIT: ~/.Xresources should be used in BunsenLabs, if any X resources are set then ~/.Xdefaults may be ignored (haven't checked the code but urxvt does this) so the former file should be used instead.

Last edited by Head_on_a_Stick (2016-11-14 21:55:17)


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#4 2016-11-14 21:44:25

ohnonot
...again
Registered: 2015-09-29
Posts: 3,674
Website

Re: Xcalc theming awesomeness

sure!

!source: https://wiki.archlinux.org/index.php/X_resources
!xcalc-----------------------------------------------------------------------

xcalc*geometry:                        200x275
xcalc.ti.bevel.background:             #111111
xcalc.ti.bevel.screen.background:      #000000
xcalc.ti.bevel.screen.DEG.background:  #000000
xcalc.ti.bevel.screen.DEG.foreground:  LightSeaGreen
xcalc.ti.bevel.screen.GRAD.background: #000000
xcalc.ti.bevel.screen.GRAD.foreground: LightSeaGreen
xcalc.ti.bevel.screen.RAD.background:  #000000
xcalc.ti.bevel.screen.RAD.foreground:  LightSeaGreen
xcalc.ti.bevel.screen.INV.background:  #000000
xcalc.ti.bevel.screen.INV.foreground:  Red
xcalc.ti.bevel.screen.LCD.background:  #000000
xcalc.ti.bevel.screen.LCD.foreground:  LightSeaGreen
xcalc.ti.bevel.screen.LCD.shadowWidth: 0
xcalc.ti.bevel.screen.M.background:    #000000
xcalc.ti.bevel.screen.M.foreground:    LightSeaGreen
xcalc.ti.bevel.screen.P.background:    #000000
xcalc.ti.bevel.screen.P.foreground:    Yellow
xcalc.ti.Command.foreground:  White
xcalc.ti.Command.background:  #777777
xcalc.ti.button5.background:  Orange3
xcalc.ti.button19.background: #611161
xcalc.ti.button18.background: #611161
xcalc.ti.button20.background: #611111
!uncomment to change label on division button
xcalc.ti.button20.label:      /
xcalc.ti.button25.background: #722222
xcalc.ti.button30.background: #833333
xcalc.ti.button35.background: #944444
xcalc.ti.button40.background: #a55555
xcalc.ti.button22.background: #222262
xcalc.ti.button23.background: #222262
xcalc.ti.button24.background: #222272
xcalc.ti.button27.background: #333373
xcalc.ti.button28.background: #333373
xcalc.ti.button29.background: #333373
xcalc.ti.button32.background: #444484
xcalc.ti.button33.background: #444484
xcalc.ti.button34.background: #444484
xcalc.ti.button37.background: #555595
xcalc.ti.button38.background: #555595
xcalc.ti.button39.background: #555595
XCalc*Cursor:                 hand2
XCalc*ShapeStyle:             rectangle

please let me know if it reproduces the look completely.
i also usually define my termcolors as

*color:...

so that might also affect the outcome.
a warning with fonts: i once tried to change them for xcalc (something slightly larger and bolder) but it seems that there is exactly one font in the whole world of xfonts that is able to represent the symbols on the calculator just so.
also see /usr/share/X11/app-defaults/XCalc-color

Offline

#5 2016-11-14 21:54:18

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Xcalc theming awesomeness

Head_on_a_Stick wrote:

Try:

cat /etc/X11/app-defaults/XCalc-color >> ~/.Xdefaults

No, sorry, that's nonsense  ops

Add this single line to ~/.Xresources (or ~/.Xdefaults) instead:

*customization:                 -color

This works for OpenBSD anyway.

Last edited by Head_on_a_Stick (2016-11-14 21:55:45)


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#6 2016-11-14 22:02:19

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Xcalc theming awesomeness

I have split off the xcalc themeing posts, please make some noise if you object smile


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#7 2016-11-15 07:38:27

Snap
Member
Registered: 2015-10-02
Posts: 465

Re: Xcalc theming awesomeness

I just let my (current) Xresources color schem to do the job for me.

2016-11-15--1479195410_1786x1052_scrot.th.png

Offline

#8 2016-11-15 09:39:57

Naik
Member
From: Lipsia
Registered: 2015-10-03
Posts: 148

Re: Xcalc theming awesomeness

Snap wrote:

I just let my (current) Xresources color schem to do the job for me.

would you mind telling me how you achived this?

naik --greetz


"Kaum macht [Mensch]* es richtig, funktioniert es sofort!"
BL-Kitchen on GitHub

Offline

#9 2016-11-15 12:47:02

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 900
Website

Re: Xcalc theming awesomeness

RThdbjf.png
! --- xcalc colors ---

xcalc*ti.button1.vertDistance: 4
xcalc*ti.button2.vertDistance: 4
xcalc*ti.button3.vertDistance: 4
xcalc*ti.button4.vertDistance: 4
xcalc*ti.button5.vertDistance: 4
xcalc*ti.background: gray90
xcalc*ti.bevel.borderColor: gray65
xcalc*ti.bevel.borderWidth: 1
xcalc*ti.bevel.vertDistance: 4
xcalc*ti.bevel.defaultDistance: 0
xcalc*ti.bevel.background: rgb:b/c/b
xcalc*ti.bevel.screen*background: rgb:b/c/b
xcalc*ti.bevel.screen.borderColor: rgb:b/c/b
xcalc*ti.bevel.screen.vertDistance: 10
xcalc*ti.bevel.screen.horizDistance: 10
xcalc*ti.bevel.screen*left: chainLeft
xcalc*ti.bevel.screen*right: chainRight
xcalc*ti.bevel.screen*top: chainTop
xcalc*ti.bevel.screen*bottom: chainBottom
xcalc*ti.bevel.screen*LCD.foreground: gray10
xcalc*ti.bevel.screen*INV.vertDistance: 0
xcalc*ti.Command.borderColor: gray65
xcalc*ti.Command.background: gray85
xcalc*ti.Command.foreground: gray30
xcalc*ti.button5.background: rgb:e/b/b
xcalc*ti.button20.background: rgb:e/d/c
xcalc*ti.button25.background: rgb:e/d/c
xcalc*ti.button30.background: rgb:e/d/c
xcalc*ti.button35.background: rgb:e/d/c
xcalc*ti.button40.background: rgb:b/b/e
xcalc*ti.button22.background: gray95
xcalc*ti.button23.background: gray95
xcalc*ti.button24.background: gray95
xcalc*ti.button27.background: gray95
xcalc*ti.button28.background: gray95
xcalc*ti.button29.background: gray95
xcalc*ti.button32.background: gray95
xcalc*ti.button33.background: gray95
xcalc*ti.button34.background: gray95
xcalc*ti.button37.background: gray95
xcalc*ti.button38.background: gray95
xcalc*ti.button39.background: gray95

Edited:
Found the code on google/github a year ago, Thanks Seth House (whiteinge)
Thanks porkpiehat for finding Author of the ^above code.
Nili

Last edited by Nili (2016-11-15 17:30:11)


Devuan / StartX / Openbox / Tint2 / Conky-Std
プロトタイプ: 双葉杏 (Futaba Anzu) THE iDOLM@STER、 山田 たえ (Yamada Tae) Zombieland Saga
Nothing beats peace and quiet / Tomoki Sakurai
Almost ready for:  Void Linux

Offline

#10 2016-11-15 14:50:09

porkpiehat
Member
Registered: 2015-10-27
Posts: 31

Re: Xcalc theming awesomeness

Nili wrote:

Found the code on the google/github a year ago, can't remember where now to credit author.

Nili

Looks like it came from here: https://github.com/whiteinge/dotfiles/b … Xresources

Offline

#11 2016-11-15 17:28:15

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 900
Website

Re: Xcalc theming awesomeness

porkpiehat wrote:

Thank you for pointing out the author.


Devuan / StartX / Openbox / Tint2 / Conky-Std
プロトタイプ: 双葉杏 (Futaba Anzu) THE iDOLM@STER、 山田 たえ (Yamada Tae) Zombieland Saga
Nothing beats peace and quiet / Tomoki Sakurai
Almost ready for:  Void Linux

Offline

#12 2016-11-16 08:03:16

Snap
Member
Registered: 2015-10-02
Posts: 465

Re: Xcalc theming awesomeness

Naik wrote:
Snap wrote:

I just let my (current) Xresources color schem to do the job for me.

would you mind telling me how you achived this?

naik --greetz

Dou you mean Xcalc? If you don't add specific settings into ~/.Xresources for the different Xapps they all (most) get the colors of your selected theme. You can add the colors directly into Xresources or sourcing them from a different file, which allows easier theme changes.

Add a line similar to this pointing to your theme of the day into ~/.Xresources.

#include <"/path/to/your/colortheme">

Use colons just in case there are spaces in your path. The # is not a comment inside Xresources. It must be there to get the file sourced when you load or reload it. After any change you need to run this (or logout-login) for the changes to take effect.

xrdb -merge ~/.Xresources

I think this is the slightly modified theme (by the fabulous dkeg) I was using for that scrot:

! dkeg 2013,2014 !
  
!!!! catchmeifyoucan !!!!

! original
!*background:#170f0d
! monokai
*background:#272822

*foreground:#f9f9f9
!*foreground:#746c48

*color0: #130F0C
*color1: #604C38
*color2: #8D7F85
*color3: #907256
*color4: #AA8D70
*color5: #B9A38D
*color6: #C4BFBF
*color7: #C4AE99
*color8: #C69F77
*color9: #CAB9A8
*color10: #D5C6B8
*color11: #DCD1C7
*color12: #E0E0E2
*color13: #E4DAD2
*color14: #EAE3DC
*color15: #F6F2F0

BTW: behind Xcalc it's urxvt, tmux and ranger

Last edited by Snap (2016-11-16 08:08:12)

Offline

#13 2016-11-16 19:36:29

ohnonot
...again
Registered: 2015-09-29
Posts: 3,674
Website

Re: Xcalc theming awesomeness

actually i don't know where that xcalc "theme" came from. maybe from here.

i also like the light version above.

Offline

#14 2017-02-12 13:02:56

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Xcalc theming awesomeness

I'm just wondering: How does it come being galculator the default calculator on #BĹ?

xcalc has more features out-of-the-box and it seems it's not more resource hungry than galculator. Not that I'm using this feature that much, just noticed how nice xcalc is (and galculator almost a bit too basic)...

Offline

#15 2017-02-12 13:15:08

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Xcalc theming awesomeness

martix wrote:

How does it come being galculator the default calculator on #BĹ?

In what way is it the default?

My freshly-installed system has xcalc(1) included, add this line to ~/.Xresources to display the upstream colourscheme:

*customization: -color

The result is very similar to the example posted by @Nili but with more rounded corners to the buttons.

[Spoiler Alert!]

2017_02_12_131252_228x338_scrot.png

[/Spoiler Alert!]

smile


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#16 2017-02-12 13:38:57

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Xcalc theming awesomeness

@HoaS Well, in the openbox-menu, under "Office" there is an entry for "calculator". After clicking it, galculator opens for me (although xcalc is also installed and can be started simply by the xcalc command).

Offline

#17 2017-02-12 13:43:05

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Xcalc theming awesomeness

sed -i 's/galculator/xcalc/' ~/.config/openbox/menu.xml && openbox --reconfigure

big_smile

But yes, I see what you mean — I think it is preferred because most new users would expect a graphical calculator with the more modern point-and-click menu system rather then the more old-fashioned configuration methods used by xcalc(1) & co.

This is also why we use geany rather than a real editor such as vim, despite my best efforts to the contrary...

monkey


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#18 2017-02-12 17:27:36

damo
....moderator....
Registered: 2015-08-20
Posts: 4,880

Re: Xcalc theming awesomeness

galculator is what was on Crunchbang IIRC, and is a nice gui calculator.

xcalc may well be very functional, but like other X apps is UGLY as hell!


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#19 2017-02-13 01:28:06

cpoakes
Member
Registered: 2016-12-02
Posts: 108

Re: Xcalc theming awesomeness

martix wrote:

...(and galculator almost a bit too basic)...

If you find galculator too basic, you'll probably find Scientific Mode more satisfying (menu View -> Scientific Mode).

damo wrote:

xcalc may well be very functional, but like other X apps is UGLY as hell!

Couldn't agree more, I find the X apps to be fugly. But... de gustibus non disputandum est.

Offline

#20 2017-02-14 09:37:21

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Xcalc theming awesomeness

@HoaS Yes, thank you for the line and explanation. Somehow I have more sympathies for xcalc.

@cpoakes Indeed, the Scientific Mode looks very similar to the xcalc default mode and seems to have even more features. As for the looks, ohnonot's or HoaS' versions are ok, but otherwise X apps are really not the brightest shining pearls in the treasure box. Almost like pre win95 era. On the other hand that galculator default grey-on-grey buttons are not very brilliant either imho.

Offline

#21 2017-02-14 15:05:17

cpoakes
Member
Registered: 2016-12-02
Posts: 108

Re: Xcalc theming awesomeness

martix wrote:

On the other hand that galculator default grey-on-grey buttons are not very brilliant either imho.

You can blame your GTK3 theme for the grey-on-grey ("coordinated theme"). Change it using the GTK_THEME environment variable:

GTK_THEME=Bluebird galculator

Offline

#22 2017-02-14 21:47:46

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Xcalc theming awesomeness

@cpoakes Thank you for the hint, but launching it that way still gives me "grey-on-grey" buttons, even though it's a bit different grey...

Offline

#23 2017-02-15 08:10:10

ohnonot
...again
Registered: 2015-09-29
Posts: 3,674
Website

Re: Xcalc theming awesomeness

cpoakes wrote:
GTK_THEME=Bluebird galculator

it won't work if you don't have bluebird installed.

Offline

#24 2017-02-15 10:32:52

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Xcalc theming awesomeness

ohnonot wrote:

it won't work if you don't have bluebird installed.

Oh yes, thanks! It's only in stretch, but installs fine with gdebi. It did not change much though, there is a blue menu-line but it's still grey on grey buttons. I prefer your xcalc version anyway.

Offline

Board footer

Powered by FluxBB