Manjaro Difference between revisions of "DMenu"

Difference between revisions of "DMenu"

From Manjaro
imported>Stagiros
(Marked this version for translation)
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
__TOC__


<translate>
=Overview= <!--T:1-->


<br />
<!--T:2-->
=Overview=
dmenu is a dynamic menu for X, originally designed for dwm. It manages large numbers of user-defined menu items efficiently.


=Tips & Tricks= <!--T:3-->
==warning: no locale support== <!--T:4-->
Sometimes for no apparent reason users face the following dmenu problem:
Sometimes for no apparent reason users face the following dmenu problem:
<br />
 
<!--T:5-->
A. When calling dmenu from a key binding in their environment dmenu comes up but when they continue to select anything in dmenu, it disappears from the screen and does not execute anything.
A. When calling dmenu from a key binding in their environment dmenu comes up but when they continue to select anything in dmenu, it disappears from the screen and does not execute anything.
<br />
B. Trying to start dmenu from the terminal, the error "warning: no locale support" appears.
B. Trying to start dmenu from the terminal, the error <pre>"warning: no locale support"</pre> appears.
 
 
=Solution=


<!--T:6-->
Assuming that you have correctly set up your system's LOCALE settings, here is a simple solution to this problem:
Assuming that you have correctly set up your system's LOCALE settings, here is a simple solution to this problem:
<br /><br />
Edit file /etc/X11/xorg.conf.d/20-keyboard.conf
<pre>sudo nano /etc/X11/xorg.conf.d/20-keyboard.conf</pre>
In section "InputClass", after the line Identifier "system-keyboard", add the lines
<pre>Option "XkbLayout" "gb,gr(polytonic)"
Option "XkbOptions" "grp:lalt_lshift_toggle,terminate:ctrl_alt_bksp"</pre>
and save.
<br />
<br />
!!! If you have used the MHWD utility to configure your graphics card, then there will be a file 90-mhwd.conf. For the changes you have made in file 20-keyboard.conf to work, you have to edit this file and comment out the line with the XkbOptions, in section InputClass, as below:
<pre>
Section "InputClass"
Identifier          "Keyboard Defaults"
MatchIsKeyboard     "yes"
#Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
</pre>
<br />
=Install & configure graphical language switcher (xxkb)=
Install program xxkb
<pre>sudo pacman -S xxkb</pre>
<br />
Create folder in /home/jimmy/.config that will hold the language flag images used by the xxkb switcher
<pre>sudo mkdir /home/jimmy/.config/xxkb</pre>
<br />
Go to any site providing free images of country flags and download the flag images for United Kingdom and Greece.
<br />
Resize the flag images you downloaded to 20x20 pixels and convert them to be of type xpm.
<br />
Rename the flag images to gb.xpm and gr.xpm for United Kingdom and Greece respectively.
<br />
Copy the flag images into the folder /home/jimmy/.config/xxkb that you have previously created.
<br />
Create configuration file for xxkb in user's home folder.
<pre>sudo nano /home/jimmy/.xxkbrc</pre>
Edit it to read
<pre>
XXkb.image.path: /home/jimmy/.config/xxkb
XXkb.group.base: 1
XXkb.group.alt: 2
XXkb.mainwindow.type: tray
XXkb.mainwindow.enable: yes
XXkb.mainwindow.appicon: yes
XXkb.mainwindow.border.width: 1
XXkb.mainwindow.label.enable: no
XXkb.mainwindow.border.color: white
XXkb.mainwindow.geometry: 20x20+0+0
XXkb.mainwindow.image.1: gb.xpm
XXkb.mainwindow.image.2: gr.xpm
XXkb.mainwindow.image.3:
XXkb.mainwindow.image.4:
XXkb.mainwindow._delete: no
XXkb.button.enable: no
XXkb.controls.focusout: no
XXkb.controls.two_state: no
XXkb.controls.add_when_start: yes
XXkb.controls.add_when_create: yes
XXkb.controls.add_when_change: no
</pre>
and save.
<br />
=Make xxkb autostart when openbox starts=
Edit openbox's autostart configuration file
<pre>sudo nano /home/jimmy/.config/openbox/autostart</pre>
In section ##Startup, after the last line, add the line
<pre>(sleep 1s && xxkb) &</pre>
and save.
<br />


=Reboot the operating system=
<!--T:7-->
<pre>sudo reboot</pre>
Edit file '''/usr/bin/dmenu_run''' and add a line setting your LANG variable to your actual language locale before the line that calls dmenu:
#!/bin/sh
LANG="en_GB.UTF-8"                                <-- Change it according to your locale.
dmenu_path | dmenu "$@" | ${SHELL:-"/bin/sh"}
</translate>


[[Category:Contents Page]]
[[Category:Contents Page{{#translation:}}]]
[[Category:Applications{{#translation:}}]]

Latest revision as of 16:29, 7 September 2021

Other languages:
English • ‎Türkçe • ‎русский

Overview

dmenu is a dynamic menu for X, originally designed for dwm. It manages large numbers of user-defined menu items efficiently.


Tips & Tricks

warning: no locale support

Sometimes for no apparent reason users face the following dmenu problem:

A. When calling dmenu from a key binding in their environment dmenu comes up but when they continue to select anything in dmenu, it disappears from the screen and does not execute anything. B. Trying to start dmenu from the terminal, the error "warning: no locale support" appears.

Assuming that you have correctly set up your system's LOCALE settings, here is a simple solution to this problem:

Edit file /usr/bin/dmenu_run and add a line setting your LANG variable to your actual language locale before the line that calls dmenu:

#!/bin/sh
LANG="en_GB.UTF-8"                                 <-- Change it according to your locale.
dmenu_path | dmenu "$@" | ${SHELL:-"/bin/sh"}
Cookies help us deliver our services. By using our services, you agree to our use of cookies.