{"id":17800993,"url":"https://github.com/refi64/dtweaks","last_synced_at":"2025-04-02T04:40:49.548Z","repository":{"id":69429157,"uuid":"132517797","full_name":"refi64/dtweaks","owner":"refi64","description":"A simple but powerful tool to automatically modify XDG desktop application files","archived":false,"fork":false,"pushed_at":"2018-05-07T21:21:57.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T05:06:48.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/refi64.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":"2018-05-07T21:21:41.000Z","updated_at":"2018-05-08T12:52:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"31ba57be-621d-4a9a-b492-0fce95a69866","html_url":"https://github.com/refi64/dtweaks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fdtweaks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fdtweaks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fdtweaks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fdtweaks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refi64","download_url":"https://codeload.github.com/refi64/dtweaks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246758278,"owners_count":20828919,"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":[],"created_at":"2024-10-27T12:33:06.419Z","updated_at":"2025-04-02T04:40:49.528Z","avatar_url":"https://github.com/refi64.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dtweaks\n\ndtweaks is a simple but powerful tool that lets you modify XDG desktop application\nfiles, and it contains a pacman hook to ensure those files stay modified across package\nupgrades.\n\nPRs to add hooks for other package managers would be appreciated!\n\n## Building and installing\n\nMake sure you have [Fbuild](https://github.com/felix-lang/fbuild/releases) (version\n0.3 RC 2 or greater is required) and run:\n\n```\n$ fbuild install\n```\n\n## Tweak files\n\nSay you want to edit Discord's desktop file to always pass `XDG_CURRENT_DESKTOP=Unity`\nin order to enable app indicator support on GNOME. You put this inside\n`/etc/dtweaks.d/Discord.desktop`:\n\n```ini\n[*]\nExec=/usr/bin/env XDG_CURRENT_DESKTOP=Unity $*\n```\n\nThe `$*` will automatically be replaced with the original value for `Exec`, so this\nwill just end up prepending.\n\nSee `dtweaks.desktop(5)` for more information on writing tweaks files.\n\n## Applying tweaks\n\nIf you're on Arch Linux, then you just need to reinstall the package in question. pacman\nwill run the included dtweaks hook, automatically applying the modifications.\n\nNo matter what distro you're on, if you want to run dtweaks manually, it's easy:\n\n```\n$ dtweaks /usr/share/applications/Discord.desktop\n```\n\ndtweaks takes a list of desktop files to modify, and it will search for and apply\ntweaks to each one.\n\nIf you don't feel like passing the full path, then use `-r`:\n\n```\n$ dtweaks -r Discord\n```\n\nYou can also use `-i` to read a list of files from stdin instead:\n\n```\n$ echo /usr/share/applications/Discord.desktop | dtweaks -i\n```\n\nThis is what the included pacman hook uses to run dtweaks, and it's what you'll likely\nuse if you're writing hooks for other package managers.\n\nIf you're writing your own tweaks, you'll find two more options interesting: `-n` and\n`-v`. `-n` will run any tweaks, but it will print the results to the screen *instead*\nof writing them to disk. This is useful for checking how tweaks will be applied without\nactually changing anything yet.\n\n`-v` will print verbose information when applying tweaks. You can also set\n`G_MESSAGES_DEBUG=all` before running dtweaks.\n\nOf course, these can be combined however you want:\n\n```\n$ echo Discord | dtweaks -inrv\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefi64%2Fdtweaks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefi64%2Fdtweaks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefi64%2Fdtweaks/lists"}