{"id":19388301,"url":"https://github.com/mk-fg/de-setup","last_synced_at":"2025-04-23T23:31:35.075Z","repository":{"id":2395066,"uuid":"3361541","full_name":"mk-fg/de-setup","owner":"mk-fg","description":"Local Desktop Environment setup - X11 WM, conky, mpv, systemd --user and such","archived":false,"fork":false,"pushed_at":"2025-03-23T08:46:40.000Z","size":3212,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T22:23:11.336Z","etag":null,"topics":["configuration","conky","desktop","dotfiles","lua","mpv","systemd","theme","wallpaper","xorg"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"el-cms/Tbs-admin","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mk-fg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2012-02-05T19:22:42.000Z","updated_at":"2025-03-23T08:46:43.000Z","dependencies_parsed_at":"2023-11-11T10:20:57.875Z","dependency_job_id":"242e0287-23e0-4abb-93aa-6f3f1163f30a","html_url":"https://github.com/mk-fg/de-setup","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/mk-fg%2Fde-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mk-fg%2Fde-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mk-fg%2Fde-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mk-fg%2Fde-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mk-fg","download_url":"https://codeload.github.com/mk-fg/de-setup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250532043,"owners_count":21446105,"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":["configuration","conky","desktop","dotfiles","lua","mpv","systemd","theme","wallpaper","xorg"],"created_at":"2024-11-10T10:12:24.236Z","updated_at":"2025-04-23T23:31:35.059Z","avatar_url":"https://github.com/mk-fg.png","language":"Python","readme":"# My Desktop Environment Setup\n\nMy configuration and customization bits for WM/DEs.\n\nCurrently includes stuff for [Enlightenment] (E17+) on X11.\n\nFeel free to reuse anything of value in this however you want.\n\n[Enlightenment]: https://enlightenment.org\n\n**Table of Contents**\n\n- [General Info](#hdr-general_info)\n\n- [Specific components](#hdr-specific_components)\n\n    - [Systemd system/user-session units](#hdr-systemd_system_user-session_units)\n    - [Enlightenment configs (e/e.cfg.*)](#hdr-enlightenment_configs__e_e.cfg.__)\n    - [Enlightenment Edje Themes (e/themes)](#hdr-enlightenment_edje_themes__e_themes_)\n    - [conky](#hdr-conky)\n    - [mpv](#hdr-mpv)\n\n        - [fg.status.lua](#hdr-fg.status.lua)\n        - [fg.lavfi-audio-vis.lua](#hdr-fg.lavfi-audio-vis.lua)\n        - [fg.file-keys.lua](#hdr-fg.file-keys.lua)\n\n    - [xbindkeys](#hdr-xbindkeys)\n    - [bin](#hdr-bin)\n    - [Themes](#hdr-themes)\n\nRepository URLs:\n\n- https://github.com/mk-fg/de-setup\n- https://codeberg.org/mk-fg/de-setup\n- https://fraggod.net/code/git/de-setup\n\n\n\n\u003ca name=hdr-general_info\u003e\u003c/a\u003e\u003ca name=user-content-hdr-general_info\u003e\u003c/a\u003e\n## General Info\n\nIt's not some cool tiling setup, as I prefer (and use) fullscreen windows on\nseparate \"virtual desktops\" anyway. And where I don't (e.g. floating messenger,\nterminals, mpv), just bind a key to position things at some fixed location/size\nand/or set these to be persistent for specific app windows.\n\nDon't use DE menu(s?) - either have a key to start what I need (on a constant\nvirtual desktop), use [dmenu] to launch more rare stuff or just run it from one\nof the terminals - [yeahconsole] on top or generic terminal window that's always\nopen on desktop-1.\n\n[dmenu]: https://tools.suckless.org/dmenu/\n[yeahconsole]: http://phrat.de/yeahtools.html\n\n\n\u003ca name=hdr-specific_components\u003e\u003c/a\u003e\u003ca name=user-content-hdr-specific_components\u003e\u003c/a\u003e\n## Specific components\n\nNotes on specific components of the setup, usually in their own subtrees.\n\n\n\n\u003ca name=hdr-systemd_system_user-session_units\u003e\u003c/a\u003e\u003ca name=user-content-hdr-systemd_system_user-session_units\u003e\u003c/a\u003e\n### Systemd system/user-session units\n\nDon't have any \\*dm (as in GDM, KDM, etc), simply starting WM with screen locker\n(`enlightenment -locked`) on boot instead, as there's never more than one\nphysical user here anyway.\n\n`systemd --user` + systemd-logind session setup without \\*dm is a bit\nunorthodox in general, and in my case started through a custom [pam-run]\npam-session-wrapper binary, with Xorg, WM and everything DE-related started in\nuser\\@1000 daemon's \"startx.target\" - see stuff under \"systemd\" for more info.\n\n[pam-run]: https://github.com/mk-fg/fgtk/#hdr-pam-run\n\n\n\n\u003ca name=hdr-enlightenment_configs__e_e.cfg.__\u003e\u003c/a\u003e\u003ca name=user-content-hdr-enlightenment_configs__e_e.cfg.__\u003e\u003c/a\u003e\n### Enlightenment configs (e/e.cfg.*)\n\nCreated/processed by [e-config-backup] tool (eet/TextX-based parser),\nand used to detect any new options between version upgrades, or (rare)\n[migrations between config schemas].\n\n[e-config-backup]: bin/e-config-backup\n[migrations between config schemas]:\n  https://blog.fraggod.net/2013/01/16/migrating-configuration-settings-to-e17-enlightenment-0170-from-older-e-versions.html\n\n\n\n\u003ca name=hdr-enlightenment_edje_themes__e_themes_\u003e\u003c/a\u003e\u003ca name=user-content-hdr-enlightenment_edje_themes__e_themes_\u003e\u003c/a\u003e\n### Enlightenment Edje Themes (e/themes)\n\nMostly based on ones from E repositories, and might include assets\n(icons, sounds, etc) from these, so not original by any means, just tweaked slightly.\n\nTerminology color theme ini files can be installing using `./data/colorschemes/add_color_scheme.sh`\nscript from terminology repo, as described in COLORSCHEMES.md, for example:\n\n    % ./data/colorschemes/add_color_scheme.sh \\\n      eet ~/.config/terminology/colorschemes.eet dark-fir.ini\n\n\n\n\u003ca name=hdr-conky\u003e\u003c/a\u003e\u003ca name=user-content-hdr-conky\u003e\u003c/a\u003e\n### conky\n\nCommon \"top + stuff\" vertical layout with radial displays\nand (mostly decorative) analog/binary clocks on top.\n\n`rc.laptop` is a cut-down version of `rc.desktop` for smaller screen.\n\nRequres conky lua extension enabled (at build-time, not the case on Arch\nfor some reason), with cairo support for fancy visual clocks, and uses JSON\noutput of \"sensors\" binary from [lm_sensors].\n\n![conky-sensors](https://blog.fraggod.net/images/conky_sensors.jpg)\n\nCurrent bottom part of the window is a cached events/calendar reminder,\nincluded via `${catp /run/user/1000/cal.conky}` conky-config output\nfrom [\"riet\" tool], which is updating it on its own separate schedule\n(`riet cal.rst -c /run/user/1000/conky.calendar` in crontab).\n\n\"sensors\" binary there is being run from lua with separate interval\n(configured in lua sensors= map), and its outputs cached between runs,\nso doesn't update on the same interval as while conky UI, to avoid\nrunning it every few seconds needlessly.\n\nLua script formats sensor values as `chip__feature__subfeature` (e.g.\n`k10temp-pci-00c3__Tctl__temp1_input` for `\"k10temp-pci-00c3\":{\"Tctl\":{\"temp1_input\":48.000}`\nnested-JSON data), which conky's `${lua sens_read ...}` can match by any string part\nor [lua regexp-like string.match pattern] - for example\n`${lua sens_read k10temp-pci-[^_]+__Tctl__temp%d+_input}` to match any available\ntemperature value on k10temp-pci \"Tctl\" feature (AMD CPU temperature), regardless\nof bus IDs and sensor number (as there's probably just one for Tctl).\\\nRun `lua conky/helpers.lua` from the terminal (command line) to check/test\nlua-parsed sensors' names and outputs directly, same as in conky config.\n\n[Displaying any lm_sensors data in conky] blog post has a bit more details,\nbut outdated by now - used to need separate \"sens\" binary, obsoleted by\nlm\\_sensors' `-j` option.\n\n[lm_sensors]: https://archive.kernel.org/oldwiki/hwmon.wiki.kernel.org/lm_sensors.html\n[\"riet\" tool]: https://github.com/mk-fg/rst-icalendar-event-tracker\n[lua regexp-like string.match pattern]: https://www.lua.org/manual/5.4/manual.html#6.4.1\n[Displaying any lm_sensors data in conky]:\n  https://blog.fraggod.net/2014/05/19/displaying-any-lm_sensors-data-temperature-fan-speeds-voltage-etc-in-conky.html\n\n\n\n\u003ca name=hdr-mpv\u003e\u003c/a\u003e\u003ca name=user-content-hdr-mpv\u003e\u003c/a\u003e\n### mpv\n\n`script=...` option can be used in the main config (e.g. `~/.mpv/config`) to\nload lua stuff, like this: `script=~/.mpv/fg.status.lua` (one line per script)\n\n\n\u003ca name=hdr-fg.status.lua\u003e\u003c/a\u003e\u003ca name=user-content-hdr-fg.status.lua\u003e\u003c/a\u003e\n#### [fg.status.lua]\n[fg.status.lua]: mpv/fg.status.lua\n\nDefault mpv status line replacement, with all the stuff that default one\nprovides (with a bit nicer format), plus audio/video bitrate and some extra\ncaching info.\n\nUsually can look something like this:\\\n`VAS: 00:10:16 / 00:23:40 (43%) -- cached  \u003e95% 10s+64M/64M [B/s V:366K A:15K]`\n\nWhere \"VAS\" are available streams (video/audio/subtitles), then time/position and\nbuffering% / idle / paused state prefix, cache status (cached/caching, %full,\ndecoded seconds, used/max state in dynamic B/K/M/G units), and then A/V bitrates\n(same auto-scaled units).\n\nBitrates are generally useful when streaming stuff over network.\n\n\n\u003ca name=hdr-fg.lavfi-audio-vis.lua\u003e\u003c/a\u003e\u003ca name=user-content-hdr-fg.lavfi-audio-vis.lua\u003e\u003c/a\u003e\n#### [fg.lavfi-audio-vis.lua]\n[fg.lavfi-audio-vis.lua]: mpv/fg.lavfi-audio-vis.lua\n\nParameter-tweaker script that abuses --lavfi-complex to produce visualizations\n(overlaid showcqt + avectorscope filters atm) for audio-only files if window is\nenabled/available (e.g. via --force-window=immediate) and there's no video\nstream in it (album art don't count).\n\n![mpv-ffmpeg-vis](https://blog.fraggod.net/images/mpv-ffmpeg-vis.jpg)\n\nI.e. some fancy dynamic swarming/flowing colors instead of just blank black square.\n\nAlso includes client events to toggle visualization and other --lavfi-complex\nfiltering (if any) on/off explicitly, regardless of whether it was enabled on\nstart.\n\nCan be used for key bindings, e.g. via something like `y script-message\nfg.lavfi-audio-vis.on` in input.conf, and I'm using that in a player frontend\n([emms](https://github.com/mk-fg/emacs-setup/blob/master/core/fg_emms.el)).\n\n\n\u003ca name=hdr-fg.file-keys.lua\u003e\u003c/a\u003e\u003ca name=user-content-hdr-fg.file-keys.lua\u003e\u003c/a\u003e\n#### [fg.file-keys.lua]\n[fg.file-keys.lua]: mpv/fg.file-keys.lua\n\nSimple script to remove or manage playback timestamp in currently-playing\nfilename, useful to cleanup or mark/seek whatever transient media files,\nas you go through them, e.g. one-off downloaded stuff from [yt-dlp].\n\n[yt-dlp]: https://github.com/yt-dlp/yt-dlp\n\n\n\u003ca name=hdr-xbindkeys\u003e\u003c/a\u003e\u003ca name=user-content-hdr-xbindkeys\u003e\u003c/a\u003e\n### [xbindkeys]\n[xbindkeys]: xbindkeys.scm\n\nConfig used to debounce middle-button clicks on a Razer mouse that I have -\napparently common issue with this particular brand.\nMore info in [Debounce bogus repeated mouse clicks] blog post.\n\n[Debounce bogus repeated mouse clicks]:\n  https://blog.fraggod.net/2016/05/15/debounce-bogus-repeated-mouse-clicks-in-xorg-with-xbindkeys.html\n\n\n\n\u003ca name=hdr-bin\u003e\u003c/a\u003e\u003ca name=user-content-hdr-bin\u003e\u003c/a\u003e\n### bin\n\nSomewhat-obsolete scripts for whatever startup/init functionality and key bindings.\n\nSee [fgtk repo](https://github.com/mk-fg/fgtk) for much more of these,\nincl. a ton of generic DE-independent desktop-related stuff.\n\nSomewhat notable stuff:\n\n- [fgrun](bin/fgrun) -\n  python3 wrapper for dmenu, preserving and deduplicating history,\n  as well as scraping/caching list of binaries for selection there.\n\n- [fgbg](bin/fgbg) -\n  py3/ctypes/sd-bus script to set background in whatever current DE.\n\n  Has continuous operation mode to run as desktop session daemon and cycle\n  images, as well as some options to scale/position/process them for\n  DE-background purposes using [ImageMagick] (via [wand-py] module).\n\n  Image processing is actually quite complicated (mostly copied from earlier\n  [aura] background-setter project atm), and has plenty of scale/opacity/offset/blur\n  and such options in ImageMagickOpts and ImageMagickTallScale dataclasses.\n\n- [xclipc](bin/xclipc) - obsoleted but useful key-bound script, for adding\n  some processing to some \"copy to clipboard\" operations, as well as making\n  these more universal wrt diff X selection buffers.\n\n  [exclip] is a more modern, fast and robust replacement for that hack.\n\n- xinitrc.\\* - tweaks for various X input/display parameters like keyboard rates\n  and layouts, dpms, mouse/touchpad stuff, xmodmap, etc.\n\n  Useful to keep these outside of xorg.conf to be able to change re-apply them\n  at any time without having to restart anything or remember all the commands again.\n\n- [e-config-backup]\n\n  Python3 + eet (EFL lib/tool) + [TextX]-based parser script for Enlightenment\n  (E17+) config file(s), to backup these under e/ dir here.\n\n  Whole purpose of decoding/encoding dance is to sort the sections\n  (which E orders arbitrarily) and detect/filter-out irrelevant changes\n  like remembered window positions or current (transient) wallpaper path.\n\n[ImageMagick]: https://www.imagemagick.org/\n[wand-py]: https://docs.wand-py.org/\n[aura]: https://github.com/mk-fg/aura\n[exclip]: https://blog.fraggod.net/2018/04/10/linux-x-desktop-clipboard-keys-via-exclip-tool.html\n[TextX]: https://textx.github.io/textX/\n\n\n\n\u003ca name=hdr-themes\u003e\u003c/a\u003e\u003ca name=user-content-hdr-themes\u003e\u003c/a\u003e\n### Themes\n\nDon't really need much from these, as browser, mpv, emacs and terminal have\ntheir own styles, and I spend almost all in just these few apps.\n\nUsed in [claws-mail] and dialog windows (e.g. rare \"Select File\" in browser)\nand context menus.\n\n- Theme - default GTK dark-mode one, ``~/.gtkrc-3.0``:\n\n    ``` ini\n    [Settings]\n    gtk-application-prefer-dark-theme = true\n    ```\n\n- [claws-mail] icons - [PapirusDevelopmentTeam/papirus-claws-mail-theme] (dark-bg version)\n\n[claws-mail]: https://www.claws-mail.org/\n[PapirusDevelopmentTeam/papirus-claws-mail-theme]:\n  https://github.com/PapirusDevelopmentTeam/papirus-claws-mail-theme\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmk-fg%2Fde-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmk-fg%2Fde-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmk-fg%2Fde-setup/lists"}