跳至內容
出自 Arch Linux 中文维基

xcalcX Window System科學計算器

安裝

安裝 xorg-xcalc 軟體包。

配置

你可以在 X resources 文件中設置幾個選項,讓 xcalc 看起來比默認的白底黑字更好看。每個按鈕的位置、標籤、功能和顏色都可以單獨更改。更多信息,請參見 xcalc(1) § CUSTOMIZATION

主題

xcalc 有一個內置主題,模仿 Texas Instruments TI-30 的外觀。如何啟用該主題,請參見 xcalc(1) § COLORS

如果你只是想要一些更漂亮的顏色,可以試試這個主題。

~/.Xresources
XCalc.geometry:                        200x275
XCalc.stipple:                         true
XCalc.ti.Command.background:           #777777
XCalc.ti.Command.foreground:           White
XCalc.ti.bevel.background:             #111111
XCalc.ti.bevel.screen.DEC.background:  #000000
XCalc.ti.bevel.screen.DEC.foreground:  LightSeaGreen
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.HEX.background:  #000000
XCalc.ti.bevel.screen.HEX.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.OCT.background:  #000000
XCalc.ti.bevel.screen.OCT.foreground:  LightSeaGreen
XCalc.ti.bevel.screen.P.background:    #000000
XCalc.ti.bevel.screen.P.foreground:    Yellow
XCalc.ti.bevel.screen.RAD.background:  #000000
XCalc.ti.bevel.screen.RAD.foreground:  LightSeaGreen
XCalc.ti.bevel.screen.background:      #000000
XCalc.ti.button4.background:           Orange3
XCalc.ti.button5.background:           Red4
XCalc.ti.button23.background:          #611161
XCalc.ti.button24.background:          #611161
XCalc.ti.button35.background:          #611111
XCalc.ti.button37.background:          #222262
XCalc.ti.button38.background:          #222262
XCalc.ti.button39.background:          #222262
XCalc.ti.button40.background:          #722222
XCalc.ti.button42.background:          #333373
XCalc.ti.button43.background:          #333373
XCalc.ti.button44.background:          #333373
XCalc.ti.button45.background:          #833333
XCalc.ti.button47.background:          #444484
XCalc.ti.button48.background:          #444484
XCalc.ti.button49.background:          #444484
XCalc.ti.button50.background:          #944444
XCalc.ti.button52.background:          #555595
XCalc.ti.button53.background:          #555595
XCalc.ti.button54.background:          #555595
XCalc.ti.button55.background:          #a55555

更改分部標籤

如果您願意,可以將分隔符改為正斜線。

XCalc.ti.button35.label: /

桌面項

xcalc 不會顯示在應用程式菜單中,因為它沒有桌面項。要讓它出現在菜單中,可以添加一個桌面項。

~/.local/share/applications/xcalc.desktop
[Desktop Entry]
Name=XCalc
GenericName=Scientific Calculator
Comment=Scientific calculator for X
Exec=xcalc
Icon=accessories-calculator
Terminal=false
Type=Application
StartupNotify=true
Keywords=calculator;scientific;
Categories=Utility;Calculator;

Utility > Calculator應用程式列表中,菜單項將顯示為 XCalc

參見