📜 ⬆️ ⬇️

Run xxkb in Slackware 12.1

Preamble

There is such an excellent indicator of keyboard layouts, called xxkb . I used this program almost from the very beginning of my acquaintance with Linux and was always pleased. I decided to build this program in Slackware 12.1. A small indicator in the form of a flag in the title of the window - what could be more convenient?

It is also worth noting that xxkb itself does not load layouts and does not manipulate them. It simply displays the xkb state. However, all this can be read on the site .
')

Package preparation

Download xxkb-1.10.tgz . We unpack, we try to collect.

$ xmkmf
$ make


I have failed here.

resource.c: 387: error: label at the end of the compound statement

Open the file, go to line 387. Replace the construction

default:
}


on

default:
break;
}

Now everything is all right. Prepare the patch.

$ diff -u resource.c.orig resource.c | gzip> patch.resource.c.gz


Create a directory hierarchy and copy our files there, something like:

xxkb / patches / patch.resource.c.gz
xxkb / slack-desc
xxkb / xxbk-1.10.tgz
xxkb / xxkb.SlackBuild


The slack-desc and SlackBuild file is taken from the Slackware distribution kit and is managed according to our needs. In slack-desc, I just put a description taken from the official website of the program.

I will not give the whole SlackBuild, here is a description of the edits:

PKGNAM = xxkb
VERSION = $ {VERSION: -1.10}


Next, edit the code for patching a little.

zcat $ file | patch -p1 || exit 1


replace with

zcat $ file | patch -p0 || exit 1


in the code involved in the assembly, before calling make add

xmkmf


and finally fix the loop that copies the documentation to the target directory so that it processes all the documentation files included in xxkb.

cp -a \
CHANGES * LICENSE README * \
$ Pkg / usr / doc / $ {PKGNAM} - $ VERSION


Hooray!

Installation

Run the newly created xxkb.SlackBuild, in / tmp we find the generated package and perform the installation

$ sudo installpkg xxkb-1.10-i486-1.tgz


Customization

The program stores its settings in a file.

/ etc / X11 / app-defaults / XXkb


I disabled the main program window

XXkb.mainwindow.enable: no

and changed the location of the indicator in the title bar

XXkb.button.geometry: 15x15-45 + 2

That's all :-) Thanks to Ivan Pascal for the great program!

Source: https://habr.com/ru/post/36585/


All Articles