Hello community, here is the log from the commit of package rofi-calc for openSUSE:Factory checked in at 2020-08-14 09:32:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rofi-calc (Old) and /work/SRC/openSUSE:Factory/.rofi-calc.new.3399 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rofi-calc" Fri Aug 14 09:32:31 2020 rev:9 rq:826195 version:1.8 Changes: -------- --- /work/SRC/openSUSE:Factory/rofi-calc/rofi-calc.changes 2020-05-04 18:40:29.649048156 +0200 +++ /work/SRC/openSUSE:Factory/.rofi-calc.new.3399/rofi-calc.changes 2020-08-14 09:34:08.784423551 +0200 @@ -1,0 +2,7 @@ +Thu Aug 13 07:36:34 UTC 2020 - Michael Vetter <mvet...@suse.com> + +- Update to 1.8: + * Enable qalc's Unicode mode by default + * Add -no-unicode option to disable aforementioned unicode support + +------------------------------------------------------------------- Old: ---- v1.7.tar.gz New: ---- v1.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rofi-calc.spec ++++++ --- /var/tmp/diff_new_pack.XuOS6m/_old 2020-08-14 09:34:10.496424428 +0200 +++ /var/tmp/diff_new_pack.XuOS6m/_new 2020-08-14 09:34:10.500424430 +0200 @@ -17,7 +17,7 @@ Name: rofi-calc -Version: 1.7 +Version: 1.8 Release: 0 Summary: Calculator for rofi License: MIT ++++++ v1.7.tar.gz -> v1.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rofi-calc-1.7/.github/FUNDING.yml new/rofi-calc-1.8/.github/FUNDING.yml --- old/rofi-calc-1.7/.github/FUNDING.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/rofi-calc-1.8/.github/FUNDING.yml 2020-08-13 05:38:06.000000000 +0200 @@ -0,0 +1 @@ +github: svenstaro diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rofi-calc-1.7/.github/workflows/build.yml new/rofi-calc-1.8/.github/workflows/build.yml --- old/rofi-calc-1.7/.github/workflows/build.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/rofi-calc-1.8/.github/workflows/build.yml 2020-08-13 05:38:06.000000000 +0200 @@ -0,0 +1,23 @@ +name: Build + +on: [push, pull_request] + +jobs: + build: + name: Building with ${{ matrix.compiler }} + runs-on: ubuntu-20.04 + strategy: + matrix: + compiler: [clang, gcc] + + steps: + - uses: actions/checkout@v1 + - name: Install dependencies + run: | + sudo apt install rofi-dev + - name: make + run: | + export CC=${{ matrix.compiler }} + autoreconf -i + ./configure + make -j$(nproc) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rofi-calc-1.7/.travis.yml new/rofi-calc-1.8/.travis.yml --- old/rofi-calc-1.7/.travis.yml 2020-05-03 02:43:53.000000000 +0200 +++ new/rofi-calc-1.8/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,60 +0,0 @@ -sudo: required -dist: bionic -language: c -compiler: - - clang - - gcc - -addons: - apt: - packages: - - autoconf - - automake - - make - - xutils-dev - - libpango1.0-dev - - libcairo2-dev - - libstartup-notification0-dev - - libxcb-ewmh-dev - - libxcb-icccm4-dev - - libxcb-util0-dev - - libxcb-xinerama0-dev - - libxcb-xkb-dev - - libxcb-randr0-dev - - libxcb1-dev - - libxkbcommon-x11-dev - - libxkbcommon-dev - - texinfo - -before_install: - - sudo add-apt-repository -y 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' - - sudo apt-get update -qq - -install: - - sudo apt-get install -y --force-yes flex/trusty-backports libfl-dev/trusty-backports - - git clone --recursive https://github.com/Airblader/xcb-util-xrm.git - - cd xcb-util-xrm - - ./autogen.sh --prefix=/usr - - make - - sudo make install - - cd - - - git clone https://github.com/libcheck/check/ -b 0.11.0 - - cd check - - autoreconf -i - - TEX="false" ./configure --prefix=/usr/ - - make - - sudo make install - - cd - - - git clone --recursive https://github.com/davatorium/rofi - - cd rofi - - git checkout 1.5.4 - - autoreconf -i - - ./configure - - make - - sudo make install - - cd - - -script: - - autoreconf -i - - ./configure - - make diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rofi-calc-1.7/CHANGELOG.md new/rofi-calc-1.8/CHANGELOG.md --- old/rofi-calc-1.7/CHANGELOG.md 1970-01-01 01:00:00.000000000 +0100 +++ new/rofi-calc-1.8/CHANGELOG.md 2020-08-13 05:38:06.000000000 +0200 @@ -0,0 +1,7 @@ +# Changelog + +## [Unreleased] - ReleaseDate + +## [1.8] - 2020-08-13 +- Enable qalc's Unicode mode by default +- Add `-no-unicode` option to disable aforementioned unicode support diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rofi-calc-1.7/README.md new/rofi-calc-1.8/README.md --- old/rofi-calc-1.7/README.md 2020-05-03 02:43:53.000000000 +0200 +++ new/rofi-calc-1.8/README.md 2020-08-13 05:38:06.000000000 +0200 @@ -2,13 +2,13 @@ **🖩 Do live calculations in rofi!** -[![Build Status](https://travis-ci.com/svenstaro/rofi-calc.svg?branch=master)](https://travis-ci.com/svenstaro/rofi-calc) -[![AUR](https://img.shields.io/aur/version/rofi-calc.svg)](https://aur.archlinux.org/packages/rofi-calc/) +[![GitHub Actions Workflow](https://github.com/svenstaro/rofi-calc/workflows/Build/badge.svg)](https://github.com/svenstaro/rofi-calc/actions) [![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/svenstaro/rofi-calc/blob/master/LICENSE) +[![Stars](https://img.shields.io/github/stars/svenstaro/rofi-calc.svg)](https://github.com/svenstaro/rofi-calc/stargazers) -A [rofi](https://github.com/DaveDavenport/rofi) plugin that uses libqalculate's `qalc` to parse natural language input and provide results. +A [rofi](https://github.com/DaveDavenport/rofi) plugin that uses qalculate's `qalc` to parse natural language input and provide results. -Since this uses libqalculate's amazing `qalc` you can try natural language queries such `500 + 25%` or `5000 EUR to USD` or `150 to hex`. It can also solve linear equations on the fly. Try `60x + 30 = 50`, for instance. +Since this uses qalculate's amazing `qalc` you can try natural language queries such `500 + 25%` or `5000 EUR to USD` or `150 to hex`. It can also solve linear equations on the fly. Try `60x + 30 = 50`, for instance. ![](demo.gif) @@ -18,30 +18,34 @@ The result of the current input can be selected with `Ctrl+Enter`, and history entries can be selected with `Enter`. By default this will just output the equation/result. +The history file by default sits at `$HOME/.local/share/rofi/rofi_calc_history` in case you ever need to delete it or change it manually. + ## Installation +<a href="https://repology.org/project/rofi-calc/versions"><img align="right" src="https://repology.org/badge/vertical-allrepos/rofi-calc.svg" alt="Packaging status"></a> + ### Via package manager -* [Arch AUR](https://aur.archlinux.org/packages/rofi-calc/) +* [Arch Linux](https://www.archlinux.org/packages/community/x86_64/rofi-calc/) * [FreeBSD](https://www.freshports.org/x11/rofi-calc/) * [Gentoo](https://packages.gentoo.org/packages/x11-misc/rofi-calc) * [openSUSE](https://software.opensuse.org/package/rofi-calc) ### From source -You need a C compilation toolchain (a `cc`, `autoconf`, `pkg-config`, ...), `rofi` (version >= 1.5) as well as `libqalculate` (version > 2.0). +You need a C compilation toolchain (a `cc`, `autoconf`, `pkg-config`, ...), `rofi` (version >= 1.5) as well as `qalculate` (version > 2.0). -You will also need development headers for `rofi` and `libqalculate`. Depending on your distribution these may be included in different packages: +You will also need development headers for `rofi`. Depending on your distribution these may be included in different packages: -* Arch, Gentoo: included with `rofi`, `libqalculate` +* Arch Linux, Gentoo: included with `rofi`, `libqalculate` * OpenSUSE: `zypper in rofi rofi-devel qalculate` -* Debian: `dpkg --install rofi-dev qalc libqalculate-dev` -* Ubuntu: `apt install rofi-dev qalc libqalculate-dev` -* Solus: `eopkg it rofi-devel libqalculate-devel` -* CentOS, Fedora: Install `qalculate` `libqalculate-devel` (find `rofi-devel` headers yourself) +* Debian: `dpkg --install rofi-dev qalc libtool` +* Ubuntu: `apt install rofi-dev qalc libtool` +* Solus: `eopkg it rofi-devel libqalculate` +* CentOS, Fedora: Install `qalculate` (find `rofi-devel` headers yourself) * Others: look it up :) -Some distributions ship an [extremely outdated](https://github.com/svenstaro/rofi-calc/issues/7) version of `libqalculate` so you might have to compile your own. If that is the case, see [here](https://github.com/svenstaro/rofi-calc/wiki/Installing-libqalculate-from-source). +Some distributions ship an [extremely outdated](https://github.com/svenstaro/rofi-calc/issues/7) version of `qalculate` so you might have to compile your own. If that is the case, see [here](https://github.com/svenstaro/rofi-calc/wiki/Installing-libqalculate-from-source). **rofi-calc** uses autotools as build system. If installing from git, the following steps should install it: @@ -56,11 +60,10 @@ ## Advanced Usage -Use the `-qalc-binary` option to specify the name or location of qalculate's `qalc` binary. Defaults to `qalc`. - -Use the `-terse` option to reduce the output of `qalc` to just the result of the input expression. - -Use the `-calc-command` option to specify a shell command to execute which will be interpolated with the following keys: +- Use the `-qalc-binary` option to specify the name or location of qalculate's `qalc` binary. Defaults to `qalc`. +- Use the `-terse` option to reduce the output of `qalc` to just the result of the input expression. +- Use the `-no-unicode` option to disable `qalc`'s Unicode mode. +- Use the `-calc-command` option to specify a shell command to execute which will be interpolated with the following keys: * `{expression}`: the left-side of the equation (currently not available when using `-terse`) * `{result}`: the right of the equation @@ -69,11 +72,11 @@ (by default Control+Return). NOTE: `{result}` should be quoted since it may contain characters that your shell would otherwise interpret: - rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo '{result}' | xclip" + rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | xclip" It's convenient to bind it to a key combination in i3. For instance, you could use: - bindsym $mod+c exec --no-startup-id "rofi -show calc -modi calc -no-show-match -no-sort" + bindsym $mod+c exec --no-startup-id "rofi -show calc -modi calc -no-show-match -no-sort > /dev/null" To disable the bold font applied to the results by default, you can use the flag `-no-bold` and run rofi like: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rofi-calc-1.7/src/calc.c new/rofi-calc-1.8/src/calc.c --- old/rofi-calc-1.7/src/calc.c 2020-05-03 02:43:53.000000000 +0200 +++ new/rofi-calc-1.8/src/calc.c 2020-08-13 05:38:06.000000000 +0200 @@ -52,18 +52,17 @@ #define PARENS_RIGHT ')' #define EQUALS_SIGN '=' - // qalc binary name #define QALC_BINARY_OPTION "-qalc-binary" - // Calc command option #define CALC_COMMAND_OPTION "-calc-command" - // Option to disable bold results #define NO_BOLD_OPTION "-no-bold" +// Option to disable qalc's unicode mode +#define NO_UNICODE "-no-unicode" // Terse option #define TERSE_OPTION "-terse" @@ -507,12 +506,14 @@ // Build array of strings that is later fed into a subprocess to actually start qalc with proper parameters. GPtrArray *argv = g_ptr_array_new(); g_ptr_array_add(argv, qalc_binary); - g_ptr_array_add(argv, "+u8"); g_ptr_array_add(argv, "-s"); g_ptr_array_add(argv, "update_exchange_rates 1days"); if (find_arg(TERSE_OPTION) > -1) { g_ptr_array_add(argv, "-t"); } + if (find_arg(NO_UNICODE) > -1) { + g_ptr_array_add(argv, "+u8"); + } g_ptr_array_add(argv, (gchar*)input); g_ptr_array_add(argv, NULL);