{"id":13897224,"url":"https://github.com/chmouel/mounch","last_synced_at":"2025-07-09T17:40:52.597Z","repository":{"id":45580698,"uuid":"336911694","full_name":"chmouel/mounch","owner":"chmouel","description":"A simple rofi launcher","archived":false,"fork":false,"pushed_at":"2024-01-19T21:30:17.000Z","size":205,"stargazers_count":53,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-23T16:02:12.716Z","etag":null,"topics":["i3wm","linux","rofi","swaywm","wayland","wofi","x11"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chmouel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-07T23:21:17.000Z","updated_at":"2025-02-17T15:10:48.000Z","dependencies_parsed_at":"2022-07-21T09:48:17.451Z","dependency_job_id":"f781af08-34c5-4709-ab5e-5eb4c254d7ec","html_url":"https://github.com/chmouel/mounch","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmouel%2Fmounch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmouel%2Fmounch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmouel%2Fmounch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmouel%2Fmounch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chmouel","download_url":"https://codeload.github.com/chmouel/mounch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250468273,"owners_count":21435452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["i3wm","linux","rofi","swaywm","wayland","wofi","x11"],"created_at":"2024-08-06T18:03:26.485Z","updated_at":"2025-04-23T16:02:35.321Z","avatar_url":"https://github.com/chmouel.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# MOUNCH - a simple WOFI/ROFI launcher\n\n## Description\n\nMounch is a simple launcher using [ROFI](https://github.com/davatorium/rofi) on Xorg or [WOFI](https://hg.sr.ht/~scoopta/wofi) on Wayland backed by a yaml configuration file.\n\nYou simply define a set of configuration blocks for some custom commands and it will show them with the awesome rofi. The items are sorted by frequency or as the order coming from the\n`mounch.yaml` config file.\n\nWhy not just use [dmenu](https://frasertweedale.github.io/blog-redhat/posts/2020-12-01-openshift-crio-userns.html#creating-a-user-namespaced-pod---attempt-4) rofi module you may ask ?\n\n* I simply did not want to have to create a `.desktop` file for every apps I have, and find it much simpler to have everything in  a simple yaml definition.\n* I did not want to have the launcher offering everythign I have on my system\n* I wanted a curated list\n* I wanted some title that differs from what's shipped on the .desktop from the system.\n* I switch often between desktop/wm (ie: gnome/sway) and display system (xorg/wayland) and I want entries depending of the current environement\n* And I wanted to have static ordering as well as frequency based one, which is fitting my workflow.\n\n\n## Requirements\n\n* [rofi](https://github.com/davatorium/rofi) \u003e= 1.6.0\n* [wofi](https://hg.sr.ht/~scoopta/wofi) for wayland\n* [PyYaml ](https://pypi.org/project/PyYAML/)\n\n## Screenshot\n\n![image](https://user-images.githubusercontent.com/98980/142888468-ce6a5f08-6c5d-496a-8b37-20f901c7ce3f.png)\n\n## Installation\n\n## Arch AUR\n\n* Package available from here:\n\n    https://aur.archlinux.org/packages/mounch/\n\n  example config file in /usr/share/doc/mounch and helpers in /usr/share/mounch/\n\n  rofi theme is preinstalled in /usr/share/rofi/themes/\n\n## Manual\n\n1. Checkout this repository with git :\n\n        mkdir ~/git/\n        git clone https://github.com/chmouel/mounch  ~/git/mounch\n\n2. Copy the theme to your rofi config directory :\n\n        mkdir -p ~/.config/rofi \u0026\u0026 cp ~/git/mounch/rofi/mounch.rasi ~/.config/rofi/\n\n3. Setup your `mounch.yaml` in `~/.config/mounch/mounch.yaml` look at the example [here](./mounch.yaml).\n\n4. Depending on how you setup your desktop setup a key to launch the [main script](./mounch.py)\n   in `~/git/mounch/mounch.py` if you have followed thru.\n\n5. Install [pyyaml](https://pypi.org/project/PyYAML/) python library (which you\n   probably have already), packages are called\n\n## Configuration\n\nThe basic definition look like this :\n\n```yaml\nfirefox:\n  binary: gtk-launch\n  args: firefox\n  description: \"Firefox\"\n  icon: firefox\n```\n\nYou are starting by a unique id as a key from this yaml snippet called firefox,\nyou launch a binary called\n[gtk-launch](https://developer.gnome.org/gtk3/stable/gtk-launch.html) which is a\nstandard gtk tool who launch your desktop application, you give the args\n`firefox` and you use the icon firefox which is picked up from your local icon\nfiles.\n\n* args can be a list, ie:\n    args: `[\"firefox\", \"https://linux.com/\"]`\n\n* binaries are looked into your path.\n* the icons is the standard freedesktop ones, add new ones in for example:\n\n    `~/.local/share/icons/hicolor/scalable/apps/`\n\n* and if you like you can add some condition too with the `if` keyword, it must return a python\n  boolean, ie:\n\n```yaml\nfirefox:\n  binary: gtk-launch\n  args: spotify\n  description: \"Spotify\"\n  icon: spotify\n  if: 'shutil.which(\"spotify\")'\n```\n\nsee a most complete example [here](./mounch.yaml).\n\nBy default `mounch` add some sane arguments to `rofi` or `wofi` if you don't\nwant them and want to let the launcher config files set the options then use the\n`-N/--no-defaults` option.\n\n## Wayland\n\nWhen detecting wayland it will try to use [wofi](https://hg.sr.ht/~scoopta/wofi) instead of rofi, you can specify --use-rofi to force use rofi.\n\nThere is currently a bug with the stable version of wofi where the\n\"--allow-images\" flag doesn't get parsed.\n\nThe bug is fixed in the development branch of wofi and until then you will need\nto add this directive directly to your `~/.config/wofi/config` :\n\n```\nallow_images=true\n```\n\nThere is multiples options you can configure to tweak wofi with its config, see [wofi(5)](https://man.archlinux.org/man/wofi.5.en), here is mine :\n\n```\nallow_images=true\ncolors=colors\nfilter_rate=100\nallow_markup=true\nlines=15\n```\n\nIt works well with the [`dracula`](https://github.com/dracula/wofi) wofi theme (as seen on the screenshot)\n\nIf you run [sway](https://swaywm.org/) you may want to do this for your configuration so sway execute the command directly :\n\n```\nset $menu mounch -p\nbindsym $mod+d exec $menu|xargs swaymsg exec --\n```\n\nIf you run with Gnome on Wayland, you may want to make it to center new window automatically or mutter (the gnome wm) will show the windows randomly around the screen, which is quite annoying with a launcher like wofi, you just need to run this command to make it automatically centers them :\n\n```shell\ndconf write /org/gnome/mutter/center-new-windows true\n```\n\n## Internals\n\nWe cache all entries in a simple file in $HOME/.cache/mounch/cache, it's simple and has only the id name and the number of times the entry has been launched.\nBefore launch we sort that list and display the top hit at the top and the rest as configured in the mounch.yaml config file.\nAfter launch we increase the counter and rewrite the cache file.\n\n## Alternatives\n\nI rewrote it in rust, with a bit different syntax and focused to wofi/wayland called raffi and available here https://github.com/chmouel/raffi. This python version goes as fast as the rust version, there is no reason to switch if you don't care.\n\n## Misc\n\n* **License**: [Apache License](./LICENSE)\n* **Authors**: Chmouel Boudjnah \u003cchmouel@chmouel.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchmouel%2Fmounch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchmouel%2Fmounch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchmouel%2Fmounch/lists"}