Giter VIP home page Giter VIP logo

xmenu's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xmenu's Issues

[Enhancement] Option to disable right click/scroll on menu

Small nitpick issue... Sometimes my mouse/trackpad doubleclicks whenever i right click, opening the menu and then opening the first option. Scrolling by mistake while on menu also executes.
Would be a cool feature to have the option to disable mouse buttons/scroll

Reduce the width

Best wishes for good health!

In the drop-down menu (with an arrow) menu is correct

flameshot_162_1

But in the regular menu at the end, for some reason remains this gap (where the arrow)

flameshot_162

Unicode Support

Hi,

Currently I try to print some non ASCII character, and it shows box.

Is it a font choice or the program does not handle unicode display yet?

Thanks for this amazing tool.

Run xmenu when a button is pressed

Hello.
Thank you for the project!

Xmenu starts when a button or key is released - why is this so?
Is it possible to change this behavior and make xmenu run when pressed?

this is normal behavior for any program...

xmenu doesn't stay open is border is set to 0

Hey, if I set the border to 0 in config.h, then if I right-click to open xmenu, as soon as I release the right button, the menu opens the entry which I had my cursor on, instead to stay open.
Reverting the border to 1 fix this behaviour.

cannot launch qutebrowser from xmenu

here is my xmenu.sh i dont know if this is xmenu related or through qutebrowser but it works through dmenu
#!/bin/sh

cat <<EOF | xmenu -r | sh &
File manager	pcmanfm
Terminal 	st
Web browser	firefox	
Accessories
	feh	feh  ~/Pictures/Wallpapers/*
	vim	st -e vim
Development
	geany	geany
	keepassxc	keepassxc
Graphics
	gimp	gimp
	xsane-scanning	xsane
Network 
	qutebrowser	 /usr/bin/qutebrowser 
	firefox	firefox
	transmission	transmission-gtk
	thunderbird	thunderbird
Multimedia
	alsa mixer	st -e alsamixer
	mpv	mpv
Office
Settings 
	Customize Look & Feel	lxappearance
System 
	htop	st -e htop
Kill	xkill

Leave
	Reboot			reboot
	Shutdown		poweroff
EOF

Menu jumps to the bottom of the screen

My problem is pretty simple: When I spawn a xmenu at the pointers position (no arguments) and the pointer is at the very top of the monitor the menu spawns on the same x coordinate but on the bottom of the monitor.

Support of icon-theme

Hello,

I think that being able to choose icons in the current icon-theme would be a very nice feature (you can see a list of those icons with gtk3-icon-browser for example).

This feature is present in Rofi.

Performance issue with many icons

I don't know the exact issue in code, here is how I'd show that in an example:

xmenu << EOF
IMG:icon.png	aaa
(repeat ~ 30 times)
EOF

The icon is just a 24x24 png file.

If I move the cursor up and down rapidly in a list when there is a lot of icons, the highlighting won't be able to follow closely to (lag behind) the cursor and one cpu thread (the process is the X server) will be at 80% on my laptop if I keep moving the cursor. The gif below demonstrates the situation that my cursor is easily ahead of the highlighting by half round.

And here is my observation of another menu app jgmenu. jgmenu will only highlight part of the items that the cursor moves through and the highlighting does not lag behind no matter how fast the cursor moves. Hope this helps :)

Peek 2020-07-28 23-58

font not properly loaded

The font defined in config.h is not loaded. It seems to be only "sans".
Actually, only a font found in ~/.Xresources is used, but is not suitable for xmenu. i.e. :

-misc-dejavu sans mono-medium-r-normal-*-17-*-*-*-*-*-iso10646-1

I didn't manage to make xmenu.c handle config.h properly.
Instead, I changed the Resource used and now, the font is the good one.

in ~/.Xresources :

*faceName: DejaVuSansMono:pixelsize=12:antialias=true

And applied this diff:

    diff --git a/xmenu.c b/xmenu.c
index 51412b3..0069264 100644
--- a/xmenu.c
+++ b/xmenu.c
@@ -225,7 +225,7 @@ initresources(void)
    config.separator_color = strdup(xval.addr);
  if (XrmGetResource(xdb, "xmenu.border", "*", &type, &xval) == True)
    config.border_color = strdup(xval.addr);
- if (XrmGetResource(xdb, "xmenu.font", "*", &type, &xval) == True)
+ if (XrmGetResource(xdb, "xmenu.faceName", "*", &type, &xval) == True)
    config.font = strdup(xval.addr);
 
  XrmDestroyDatabase(xdb);

It is more like a workaround than a real fix... sorry for that.

While compiling Iam getting this warnings

xmenu.c:388:39: warning: this statement may fall through [-Wimplicit-fallthrough=]
388 | passclickflag = 1;
| ~~~~~~~~~~~~~~^~~
xmenu.c:390:17: note: here
390 | case 'x':


Thanks for the awesome program :)

Workaround position

Hey everyone who wants to implement this nice tool

I made workaround @phillbush i hope u wont be mad i made "the issue".

mouse_location=$(xdotool getmouselocation --shell | awk '{print $1}' | sed -n 1p | grep -o '[0-9]*')
xmenu_location="0x0:0"

for i in $(seq 3780 3840); do 
if [[ $mouse_location -eq $i ]];then
  xmenu_location="3705x25:0"
else
  continue
fi; done
for i in $(seq 7630 7680); do 

if [[ $mouse_location -eq $i ]];then
  xmenu_location="7545x25:0"
else
  continue
fi; done

cat <<EOF | xmenu -i -p $xmenu_location | sh &

ignore location numbers that fits to my 32" monitors

but this does really simple thing that change position on different monitor by mouse location like polybar area where i have option "utils"

Show menu on signal

Could xmenu be configured to run in the background, displaying the menu on SIGUSR1, or some other signal?

Dividers not working anymore

So if I remember correctly this used to work and produce a menu with a divider in the middle:

printf "hello\n\nworld" | xmenu

Now I just get the following X error:

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  53 (X_CreatePixmap)
  Value in failed request:  0x0
  Serial number of failed request:  78
  Current serial number in output stream:  106

I am using NixOS unstable, which is on the latest version (4.5.5) if that helps.

Edit: I have also tried the sample script provided by this repository, which does not work either...

coordinates on multi monitor

So this is a nitpick but I figured I would ask anyways.

Currently I have a button on my bar that triggers xmenu to my cursor location. This works great because I have three monitors, and no matter which bar I click on, I will get the menu by my mouse.

The only problem I have with this is that since it goes to my cursor position, it overlaps and obscures the bar when the menu is open.

I have tries setting the coordinates as per the docs, but I suspect that this works differently for multi monitors because I used the coordinate 0x0 assuming that would be in the top left, but I could not see where it launched to at all.

So is there a way I can tell xmenu to spawn at a specific location on every monitor? Basically in the top left but with enough top padding not to obscure my bar.

[Feature request] non-operational labels

It would be nice to have non-operational labels in xmenu for the purpose of creating dialog prompts.

For example: "Close window?", "Yes", "No". The idea is taken from fluxbox:

 [nop] (label) <'icon'>

    Insert a non-operational item into the current menu. This is much like [separator],
but instead of a line, it inserts a label. This can be used to help format the menu into
blocks or sections if so desired. The label is optional, and if omitted a blank item will
be inserted.

In terms of what it could look like in xmenu, maybe prefix non-operational labels with a dot?:

printf '.Confirm?\n\nYes\tyes\nNo\tno' | xmenu

Background colour not changing on bspwm

Love the menu and it works really well with my workflow the only issue that I'm having though is that the background of the menu does not change when changing the setting in the config.h file all of the other colours work however background does not.

Point to svg file for icon

Currently I am trying to use dynamically generated icons to match my theme. These are all SVGs, and xmenu says

xmenu: cannot load icon /home/gideon/.icons/oomox-xresources-reverse-flat/apps/scalable/browser.svg

Coop with xdg-xmenu script

Hello, I tried create menu config file with xdg-menu script. The menu definition file is created correctly. But there are several apps which have no icons. In these cases the script generate lines without image icons, like this:

IMG: Science
IMG:/home/box/.cache/xdg-xmenu/icons/cantor.png Cantor (Frontend to Mathematical Software) cantor -qwindowicon cantor -qwindowtitle
R (environment for statistical computing) xterm -e R
IMG:/home/box/.cache/xdg-xmenu/icons/octave.png GNU Octave /usr/bin/octave --gui
IMG:/home/box/.cache/xdg-xmenu/icons/kalgebra.png KAlgebra (Graph Calculator) kalgebra
IMG:/home/box/.cache/xdg-xmenu/icons/kalgebra.png KAlgebra Mobile (Pocket Graph Calculator) kalgebramobile
IMG:/home/box/.cache/xdg-xmenu/icons/kalzium.png Kalzium (Periodic Table of Elements) kalzium -qwindowtitle
IMG:/home/box/.cache/xdg-xmenu/icons/marble.png KDE Marble (Virtual Globe) marble
IMG:/home/box/.cache/xdg-xmenu/icons/libreoffice-math.png LibreOffice Math (Formula Editor) libreoffice --math
IMG:/home/box/.cache/xdg-xmenu/icons/rocs.png Rocs (Rocs Graph Theory) rocs -qwindowtitle
Julia xterm -e julia
Singular xterm -e Singular

In the submenu names, there can be icons too. But if the image missing, the IMG: prefix with empty icon is present. I think that this cause this type of error after running:

โฏ xmenu < menu
xmenu: cannot load icon

there is problem that this error message doesn't show which line or better description which line is wrong. It seems that the image missing, but it is not trivial to find which line is wrong.

Add option to place `xmenu` in the center of the screen

I have xmenu bound to a keyboard shortcut, so it always appears next to the cursor. I can add -p 0x0:0 to place it in the top-left corner, but I'd rather see it directly in front of me. Could there be an option (-c, maybe) to place each popup in the monitor's center?

Xresources font choice format?

So I just set up xmenu on my new laptop and am using the AUR package and the .Xresources theming for the first time (also added it for pmenu) and it works great!!

The only issue is that previously I specified a font inside config.h (FontAwesome) that I was using for icon characters/symbols that wouldn't look out of place.

image

Since switching to this new configuration method, my FontAwesome icons show up as absurdly small

image

This is how I was configuring my fonts in config.h

  .font = "HackNerdFont:size=9,FontAwesome:size=9",

And this is how I am configuring them in my .Xresources

xmenu.font:                  xft:Hack Nerd Font Mono:size=8:antialias=true,xft:FontAwesome:style=Regular:pixelsize=12

Any ideas why I'm getting a super small size for these characters? I've tried ajusting pixelsize, size, I'm not sure how to make them bigger.

[Issue] no max number of lines

there seems to be an issue with there not being a max number of lines before it would scroll so if you had 200 items all on there own line the menu would be too long and go off the page is there any way to set the max number then after that it will scroll :) kind of like -l does for dmenu

Linking xmenu to pywal?

Hello. Is the any way to link xmenu to the pywal colour-changing scheme? It already does the background colour fine (color0), and I think normal text is using color7, but selected text/bg is still just white/blue.

Is this possible right now?
Thanks.

Click & release

Would it be possible to replicate the click & release behavior like in cwm menus? I would like to right/left click the mouse on the root window, move the mouse over the desired program and release to launch it. I guess this is already possible with xclickroot but if i release the mouse while not selecting an option the menu doesn't disappear.
I found this https://git.z3bra.org/xmenu/log.html program that does exactly what I need but it's too simple for my needs.

PS: thanks for the awesome program

dwm-flexipatch and opensuse

Hi! I was having this issue with xmenu, specifically the fact that it doesn't launch 100% of the time.

It's been isolated to my setup, which is openSUSE Tumbleweed. Launching it by right-clicking the =[] (layouts) tag wouldn't work and determined that something in the program caused it.

I don't have much logs of it due to it relying on a script.

Launching via the terminal works however.

Create search item

Just like we have any linux menu, they have a search menu. How can I add this to xmenu? This is what I've currently got.
fff

Here's what I would like to have. When I hover over the Search item on the xmenu selection list, I would like to be able to type, and it'll autofill, like the following.
fff
Then, it'll start to filter out all the items.
How can I achieve this?

[FEATURE REQUEST] Warp pointer on scroll

Hi, first of all thanks for the great work. I really appreciate xmenu.
I find myself often trying to scroll thorough the entries to select one. Unfortunately to actually confirm/enter the entry one must either use the Enter-key which is difficult to reach when using the mouse or using the pointer which slows me personally down (it also makes the scrolling kinda obsolete).
So i thought it would be great to have an option, where the mouse gets warped to the current entry when scrolling or entering a new submenu. I look forward to hear your opinion about it,
Cheers.

feature suggestion: prompt mode

similar to dmenu, make a prompt at the cursor's position waiting for key input, ignoring all but the ASCII character set. this can replace useless hard-set dependencies in xfiles.

Submenus don't move with main menu

If you use the -w flag with the example script it becomes possible to move the main menu. Hovering to open the submenu will cause it to spawn in the original location. I'm using i3 as my window manager.

1589888574

clarification regarding xclickroot and xmenu -x

I am seeking to understand the relationship between xclickroot and xmenu.

If xmenu -x option is used, is xclickroot a dependency or does xclickroot provide some additional functionality or perhaps is deprecated with the current xmenu version?

[Enhancement] dmenu-like filtering of menus - typing the first several characters of a menu item would select that line

Dunno if this is trivial or not, but in an effort to make xmenu more keyboard driven it would be nice to be able to start typing to navigate to a menu entry, for those with lots of items. Similar to how dmenu filters out items if they don't match what you have typed, or NNN file browser's type-to-nav functionality.

Using xmenu primarily with a keyboard feels really nice, this would be the icing on the cake.

This is a great project and has become a staple in my workflow. Keep up the great work!

How to run examples

Can somebody help me to run the examples with the Xresources file ? I try running it using sh xmenu.sh -N /home/daniel/xmenu/examples/Xresources . It shows the xmenu but does not seem to read the Xresource file as I have increase the font size and nothing happens

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.