asus-linux-drivers / asus-numberpad-driver

Maintained feature-rich linux driver for NumberPad(2.0) on Asus laptops. NumberPad(2.0) is illuminated numeric keypad integrated to touchpad which appears when is done tap on top right corner of touchpad for atleast 1s by default (configurable) or slide gesture from top right/left corner to the center, the left shows calc app aswell (configurable).
GNU General Public License v2.0
269 stars 21 forks source link

[Feature Request] Add custom calculator #220

Closed asd2003ru closed 1 week ago

asd2003ru commented 1 week ago

Short Description

How add custom calculator? Kalk from KDE?

New dependencies

No response

Additional Info

No response

ldrahnik commented 1 week ago

@asd2003ru Hi, thank you for the feedback. I have added info about installing the toggling script for the not-supported calculators:

ldrahnik@Zenbook-UP5401EA:~/projects/asus-numberpad-driver$ bash install_calc_toggle.sh
Calculator app

Automatic installing of toggling script for XF86Calculator key failed. Gsettings was not found. For this feature, you must associate the toggling script with the key EV_KEY.KEY_CALC by your own.

Example of the script for ElementaryOS calculator:

\`\`\`
#!/usr/bin/env bash

if [[ $(pgrep -xlf io.elementary.calculator &>/dev/null ; echo $?) != 0 ]]; then
    flatpak run io.elementary.calculator &>/dev/null &
else
  killall io.elementary.calculator &>/dev/null &
fi
\`\`\`

or Gnome calculator:

\`\`\`
#!/usr/bin/env bash

if [[ $(pgrep -xlf gnome-calculator &>/dev/null ; echo $?) != 0 ]]; then
  if [[ $(flatpak list | grep org.gnome.Calculator) ]]; then
    flatpak run org.gnome.Calculator &>/dev/null &
  else
    gnome-calculator &>/dev/null &
  fi
else
  killall gnome-calculator &>/dev/null &
fi
\`\`\`