Giter Club home page Giter Club logo

xdg-dmenu's Introduction

DEAD PROJECT. FEEL FREE TO FORK AND MODIFY.

The purpose of this small script is to parse a .menu file (XDG / FreeDesktop.org compliance) and offer a main menu with submenu/categories to start an application using dmenu.

Requisites

(Made and tested only on Kali 2016.1 64-bit, but probably works with any .menu file)

  • dmenu
  • bash 4+
  • sed, head, tail, gawk, grep, tr, echo, find :P

Why?

There is j4-dmenu-desktop and a lot of other projects who parses .desktop files, but I couldn't find one that read .menu and .directory files, and generate a xdg menu like a DE normally does.

I use a tiling window manager (bspwm and occasionally i3wm), so this is necessary for me because sometimes I don't remember the name of a specific tool on kali.

Features

  • Replace/change dmenu and it's args (rofi, or a spin of dmenu or anything similar)
  • Configure the path of .menu file
  • Configure the path of .desktop files associated with categories/submenus listed on .menu file
  • Create exception list of categories/submenus
  • Configure a prefix char for categories/submenus (Suggestion: Use a fontAwesome char)
  • Specify a terminal emulation to launch the app chosen.

Cool. Show me!

xdg_dmenu

xdg-dmenu's People

Contributors

f4llc0nn avatar

Stargazers

Claire Neveu avatar Junicchi avatar Ryan Thomas avatar Domen Puncer Kugler avatar Arsalan Diponegoro avatar Benjamin Rowe avatar Norton avatar Logan Koester avatar

Watchers

 avatar Benjamin Rowe avatar

xdg-dmenu's Issues

I just want to point out an issue in your shell script.

Hello, I have just figured out that the code doesn't work perfectly as expected.

The issue is that every time when one tries to select items in a submenu, it will only work if the selected item is of type submenu instead of app ( ".desktop files I suppose ") .

Regarding this issue, I have added this line :
[[ $submenu_selected == *">"* ]] && submenu_selected="$(echo $submenu_select ed | grep -Eo "> [^>]+$")"
right between the lines
submenu_selected=....
&
[[ ! "$submenu_selected" ]] && exit 1
and the code now works perfectly.

For those wondering why it doesn't work, this is the patch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.