{"id":15720857,"url":"https://github.com/sperry04/montog","last_synced_at":"2026-05-05T05:33:43.699Z","repository":{"id":228714793,"uuid":"774687447","full_name":"sperry04/montog","owner":"sperry04","description":"Monitor Toggle: quickly switch active monitor arrangements in Gnome/Linux","archived":false,"fork":false,"pushed_at":"2024-12-01T21:52:45.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T04:41:11.291Z","etag":null,"topics":["gnome","gtk3","monitor","python","ubuntu","utilities","xrandr"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sperry04.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":"2024-03-20T01:45:57.000Z","updated_at":"2024-07-08T23:21:21.000Z","dependencies_parsed_at":"2024-03-20T05:30:59.827Z","dependency_job_id":"7392260c-0a95-4009-a973-e0fba4804c9e","html_url":"https://github.com/sperry04/montog","commit_stats":null,"previous_names":["sperry04/montog"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sperry04%2Fmontog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sperry04%2Fmontog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sperry04%2Fmontog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sperry04%2Fmontog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sperry04","download_url":"https://codeload.github.com/sperry04/montog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246390873,"owners_count":20769478,"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":["gnome","gtk3","monitor","python","ubuntu","utilities","xrandr"],"created_at":"2024-10-03T22:00:40.231Z","updated_at":"2026-05-05T05:33:43.657Z","avatar_url":"https://github.com/sperry04.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# montog - Monitor Toggle\nGnome app indicator tool to quickly toggle enabled monitor arrangements\n\n![Screenshot](https://github.com/sperry04/montog/assets/8670817/bf8f5a9e-e8af-4411-a30d-52f24e9a76c3)\n\nhttps://github.com/sperry04/montog\n\nCopyright (C) 2024 Scott Perry (sperry04)\n\nBased loosely on monitor-switch by Rodrigo Silva (MestreLion)\n\n### Caveats\n* Developed and tested on Ubuntu 22.04 LTS / Gnome 42.9\n* Uses `xrandr` for enabling/disabling monitors\n* Only works with X11, Wayland is not supported\n\n# Usage\n\n## GTK Top Bar Menu\nRun from the command line with `$ montog` or `$ python3 montog`.  The montog menu (🖥️) will launch in the Gnome top bar.\n\n## Command Line Interface\nRunning `montog` without command line parameters will launch the top bar menu.  But it also supports a CLI mode if any of the following options are specified:\n* `$ montog -h|--help` - displays CLI usage\n* `$ montog -i|--info` - displays the About information on the console\n* `$ montog -a|--arrange \u003cname\u003e` - directly activates the arrangement named `\u003cname\u003e` (see \"Arrangements\" below)\n* `$ montog -c|--config \u003cfilename\u003e` - attempts to use the configuration file at `\u003cfilename\u003e` before trying the default files or auto-generating a configuration\n* `$ montog --autostart [True|False]` - enables/disables autostart by creating/removing a `montog.desktop` file in `~/.config/autostart/`\n* `$ montog --install [True|False]` - enables/disables in the applications menu by creating/removing a `montog.desktop` file in `~/.local/share/applications/`\n\n### Arrangements\nThe menu consists of a list of monitor _arrangements_ that can be quickly toggled.  Arrangements are intended to represent:\n* a set of enabled monitors \n* their order left-to-right (layouts with vertical components are not supported)\n* and a designated primary monitor\nso it's easy to directly select a specific layout with one click.  These arrangements can also be activated via the CLI `--arrange` parameter.\n\n### Options\nThere are several options that may be toggled on the menu:\n* _Auto-start on login_ - creates a `montog.desktop` file in `~/.config/autostart/` to automatically launch montog when you login\n* _Install in apps_ - creates a `montog.desktop` file in `~/.local/share/applications/` to add to the applications launcher.\n\n### About\nThe _About_ menu item opens a dialog with information about the system and application, including:\n* The list of connected monitors as detected by `xrandr`\n* The loaded (or auto-generated) configuration file\n* Application version\n\n### Quit\nThe _Quit_ menu exits the application\n\n## Installation\nSimply put the `montog.py` script wherever you keep your scripts.  Montog should run without any additional dependencies over the default Ubuntu Python 3.10 installation.\n\nThe first time you run montog, you can \"install\" it by checking the \"Auto-start on login\" and/or \"Install in apps\" menu options\n\n## Uninstallation\n* Either run montog and uncheck both installation options, or manually delete the `montog.desktop` files.\n* Delete `montog.py` and any configuration files you do not wish to keep.\n\n## Configuration\nBy default, montog will detect your connected (both enabled and disabled) monitors, including your primary monitor, and auto-generate a configuration for enabling all monitors, or each monitor singularly.  However, it cannot detect the correct left-to-right order for monitors that are disabled.\n\nTo properly configure montog, create a `montog-config.yaml` file in `~/.config/`, or in the same directory as `montog.py`.  An `example_montog-config.yaml` file is provided as a reference, and included in the documentation below.  The configuration file is loaded every time the menu is opened, so you may modify the file without needed to restart the application.  An illegal configuration file will cause the application to revert to the auto-generated configuration.![Screenshot from 2024-03-20 21-33-50](https://github.com/sperry04/montog/assets/8670817/a866ac2c-66aa-4f76-b5d9-21e40c272026)\n\n\n### Configuration File Format\nThe config file is standard YAML with two necessary blocks:\n* `monitors` - Maps alias names to the monitor `id` and any additional `options` you wish to pass to `xrandr` when enabling the monitor, such as resolution, frame rate, etc.\n* `arrangements` - Maps an arrangement name (which is used in the drop down menu) to a list of `enabled` monitor aliases (as defined in the `monitors` block) and a `primary` alias to indicate which monitor should be set as the primary.  The optional `label` allows a label on the menu item that is different from the arrangement's name.\n\n### Configuration Example:\nNote the use of unicode Emojis for iconography in the menu.\n\n```YAML\n# This example configuration file assumes a 3-monitor system with monitors \n# at ID's DP-0, DP-2, and DP-3 in that order, naming them with the aliases \n# \"left\", \"center\", and \"right\".\n#\n# It provides 5 arrangements for various 1, 2 or 3 enabled monitors, \n# preferring the center or left monitors as primary.  \n#\n# To use this configuration file, put it in ~/.config/ and edit the \n# monitors block to match the IDs show in the About dialog, paying attention\n# to match the IDs with the positional alias names (left/center/right).\n#\n# Emojis are used in the arrangement labels as iconography to make the menu\n# clearer when switching active monitors.\n\n# monitor aliases\n#   maps alias name to monitor ID and any additional\n#   xrandr options required by the monitor\nmonitors:\n    left: \n        id: DP-0\n        options: \"\"\n    center:\n        id: DP-2\n        options: \"\"\n    right:\n        id: DP-4\n        options: \"\"\n\n# arrangements\n#   maps arrangement name to list of enabled monitors\n#   (in left-to-right order) and a primary monitor\narrangements:\n    \"left\":\n        label: \"🖥️ 🚫 🚫  Left\"\n        enabled: [ \"left\" ]\n        primary: \"left\"\n    \"left-center\":\n        label: \"🖥️ 🖥️ 🚫  Left Two\"\n        enabled: [ \"left\", \"center\" ]\n        primary: \"left\"\n    \"all\":\n        label: \"🖥️ 🖥️ 🖥️  All Monitors\"\n        enabled: [ \"left\", \"center\", \"right\" ]\n        primary: \"center\"\n    \"center-right\":\n        label: \"🚫 🖥️ 🖥️  Right Two\"\n        enabled: [ \"center\", \"right\" ]\n        primary: \"center\"\n    \"right\":\n        label: \"🚫 🚫 🖥️  Right\"\n        enabled: [ \"right\" ]\n        primary: \"right\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsperry04%2Fmontog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsperry04%2Fmontog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsperry04%2Fmontog/lists"}