Skip to main content

Drop-in replacement for i3-dmenu-desktop with simple app priorization

Project description

pri3o-dmenu-desktop

Description

pri3o-dmenu-desktop is a drop-in replacement for Michael Stapelberg's i3-dmenu-desktop that adds simple application priorization. It supports all options present in i3-dmenu-desktop and a few more.

At this point priority is simply the absolute number times the program was run. For example a program ran three times has a higher priority than a program only run twice. It's very simple but pretty effective. In the future I might add a time-based component as well.

The priority data is stored in a sqlite database in $XDG_CONFIG_HOME/pri3o-dmenu-desktop/dmenu.db (defaults to ~/.config/pri3o-dmenu-desktop/dmenu.db) but a custom location can be specified via command line parameter. A new db will be create if it does not exist yet.

Requirements

To run this you need Python 3, all used libraries should be present in the standard distribution. Python 3 should already be present in any modern, non-minimal distribution. For older/LTS distributions (e.g. CentOS 7) you may need to install it.

For RedHat based distros this can be done via:

yum install python3

For Debian based distros use:

apt install python3

Installing

The easiest way to install is using pip3:

pip3 install pri3o_dmenu_desktop

Running

Just run using

pri3o-dmenu-desktop [OPTIONS]

If run without parameters, will behave like i3-dmenu-desktop without parameters. The optional commandline parameters are:

  • -d, --database=PATH path to database file; default $XDG_CONFIG_HOME/pri3o-dmenu-desktop/dmenu.db
  • -e, --entry-type=TYPE display "Name" (TYPE=name), "Exec" (TYPE=command) or .desktop filename (TYPE=filename) in dmenu, default name
  • -l, --locale=LOCALE use LOCALE (e.g. en_GB) for localisation of "Name", default is system locale
  • -m, --dmenu=COMMAND run this command for dmenu, default dmenu -i
  • -t, --term=COMMAND use this command for programs that need to be run in a terminal, default i3-sensible-terminal -e

Speed

As some people may wonder about how fast it is:

 % time pri3o-dmenu-desktop --dmenu=/bin/false
pri3o-dmenu-desktop --dmenu=/bin/false  0,06s user 0,01s system 99% cpu 0,070 total

 % time i3-dmenu-desktop --dmenu=/bin/false
i3-dmenu-desktop --dmenu=/bin/false  0,11s user 0,01s system 99% cpu 0,114 total

 % time j4-dmenu-desktop --dmenu=/bin/false
j4-dmenu-desktop --dmenu=/bin/false  0,00s user 0,00s system 97% cpu 0,006 total

On my system (SSD-only) it is slightly faster than i3-dmenu-desktop, but still much slower than j4-dmenu-desktop. For all practical purposes these differences should be negligible unless you have a lot of applications and/or a slow hard drive.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pri3o_dmenu_desktop-0.1.4.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pri3o_dmenu_desktop-0.1.4-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file pri3o_dmenu_desktop-0.1.4.tar.gz.

File metadata

  • Download URL: pri3o_dmenu_desktop-0.1.4.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pri3o_dmenu_desktop-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ad65d99670ac0550ec5f3d895e49811a847b898c3b20c8dfd073de8382c01c81
MD5 5fbc66150dce370dc6743b2627c30357
BLAKE2b-256 bf7c131aae733ba0a81438d3c82165e622d7dccfe20fd442b3505589f84004ab

See more details on using hashes here.

File details

Details for the file pri3o_dmenu_desktop-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: pri3o_dmenu_desktop-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pri3o_dmenu_desktop-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 530619e8be37cdbd7d8b8397baa9da2f4c4655316d61c0a286d65c25c4a6fa9f
MD5 6e7842dfb4b6948052e405b77c53cd6c
BLAKE2b-256 40e7c91dd94b29bd14d07e2e661c55c7f179f8933888b0046d59672d0029783a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page