{"id":22878123,"url":"https://github.com/sporestudio/dotfiles","last_synced_at":"2025-10-29T10:23:40.143Z","repository":{"id":230595372,"uuid":"779725750","full_name":"sporestudio/dotfiles","owner":"sporestudio","description":"Dotfiles are the customization files (their filenames usually begin with a period) that are used to personalize your linux or other Unix-based system. This repository contains my personal dotfiles.","archived":false,"fork":false,"pushed_at":"2024-07-27T10:44:46.000Z","size":4535,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T04:03:29.393Z","etag":null,"topics":["archlinux","bash","linux","lua","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sporestudio.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-30T15:55:52.000Z","updated_at":"2024-11-29T21:13:19.000Z","dependencies_parsed_at":"2024-07-27T11:46:27.223Z","dependency_job_id":"977698bb-bdfe-4e1b-b81a-fe43afac5780","html_url":"https://github.com/sporestudio/dotfiles","commit_stats":null,"previous_names":["sporestudio/dotfiles"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sporestudio%2Fdotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sporestudio%2Fdotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sporestudio%2Fdotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sporestudio%2Fdotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sporestudio","download_url":"https://codeload.github.com/sporestudio/dotfiles/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252785998,"owners_count":21803964,"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":["archlinux","bash","linux","lua","python"],"created_at":"2024-12-13T16:18:36.355Z","updated_at":"2025-10-29T10:23:40.079Z","avatar_url":"https://github.com/sporestudio.png","language":"Python","readme":"![image](https://github.com/sporestudio/dotfiles/assets/144621916/47ec0562-7c52-476e-ba0e-67f085fe3503)\n\n\n![image](https://github.com/sporestudio/dotfiles/assets/144621916/ecb5e301-bdf2-4a15-a4e1-5fb7f109db23)\n\n![image](https://github.com/sporestudio/dotfiles/assets/144621916/b4076f20-a39b-490d-95ce-34d5447b5954)\n\n![image](https://github.com/sporestudio/dotfiles/assets/144621916/0440bd5b-cf08-4eaa-b85b-2b3059e76b2e)\n\n\n\n# SPORE SETUP CONFIGURATION FOR ARCH LINUX\n\n\n\n\u003ca href=\"https://qtile.org/\"\u003e\u003cimg alt=\"QtileWM Logo\" height=\"100\" align = \"left\" src=\"https://docs.qtile.org/en/stable/_images/qtile-logo.svg\"\u003e\u003c/a\u003e\n\nThis project consists of the development and design of a minimalist window manager based on the Qtile window manager, which is a free and easily configurable window manager. \nIt is written entirely in Python, so here are some of the features I have developed to make the window manager completely adapted to my needs and workflow.\n\nIt is also noteworthy that Qtile is a window manager that consumes very few resources of our computer, that added to the fact that it runs in a minimalist installation distribution such as Arch Linux, makes it can run smoothly on virtually any computer.\n\n\n\n## ❄️ INFORMATION\n\n\n\n- **OS:** [Arch Linux](https://archlinux.org)\n- **WM:** [Qtile](https://qtile.org/)\n- **Terminal:** [Kitty](https://sw.kovidgoyal.net/kitty/)\n- **Shell:** [Fish](https://fishshell.com/)\n- **Editor:** [Lazy vim](https://www.lazyvim.org/) \n- **Compositor:** [Picom](https://github.com/yshui/picom)\n\n### Qtile modules:\n\n```\n├── qtile\n│   ├── icons\n│   │   ├── qtile-icon1.svg\n|   |   └── qtile-icon2.svg\n│   ├── settings\n|   |   ├── groups.py\n|   |   ├── keys.py\n|   |   ├── layouts.py  \n|   |   ├── mouse.py\n|   |   ├── path.py\n|   |   ├── screens.py\n|   |   ├── theme.py\n|   |   └── widgets.py\n|   ├── themes\n|   |   ├── dark-grey.json\n|   |   ├── dracula.json\n|   |   └── rosespine.json\n|   ├── wallpapers\n|   |   ├── cleanpaper.png\n|   |   └── simplepaper.png\n|   ├── autostart.sh\n|   ├── config.json\n|   └── config.py\n\n```\n\n#### Groups.py\n\nIn this module are configurated the workgroups of the window manager, used to allow several workspaces in which one or more programmes can be opened simultaneously.\n\nIn the code that we are going to see next, lists are configured where group names from 1 to 9 and a series of visual labels are stored. It is also defined that the layout of these groups will be in all cases \"bsp\" (binary space system), which we will talk about later. In this moment I'm using the icons label group.\n\n```python\ngroups = []\ngroup_names = [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\",]\n\n#group_labels = [\"DEV\", \"WWW\", \"SYS\", \"DOC\", \"VBOX\", \"CHAT\", \"MUS\", \"VID\", \"GFX\",]\n#group_labels = [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\",]\ngroup_labels = [\"󰮯 \", \" \", \"󰊠 \", \"󰊠 \", \" \", \" \", \"󰮯 \", \" \", \"󰊠 \",]\n\n\ngroup_layouts = [\"bsp\", \"bsp\", \"bsp\", \"bsp\", \"bsp\", \"bsp\", \"bsp\", \"bsp\", \"bsp\"]\n```\n\n\nIn the code below, we create a Group instance for each group_name.\n\n```python\nfor i in range(len(group_names)):\n    groups.append(\n        Group(\n            name=group_names[i],\n            layout=group_layouts[i].lower(),\n            label=group_labels[i],\n        ))\n```\n\nThis loop goes through each group in the groups list and defines two keyboard shortcuts (Key):\n\n- Switch to group: mod + group name (i.name). This switches the current view to the specified group\n- Move the window in focus to the group: mod + shift + group name. This moves the window that is in focus to the specified group without changing the current view.\n\n```python\nfor i in groups:\n    keys.extend(\n        [\n            # mod1 + letter of group = switch to group\n            Key(\n                [mod],\n                i.name,\n                lazy.group[i.name].toscreen(),\n                desc=\"Switch to group {}\".format(i.name),\n            ),\n            # mod1 + shift + letter of group = move focused window to group\n            Key(\n                [mod, \"shift\"],\n                i.name,\n                lazy.window.togroup(i.name, switch_group=False),\n                desc=\"Move focused window to group {}\".format(i.name),\n            ),\n        ]\n    )\n```\n\n#### Keys.py\n\nIn this module we can find the keyboard shortcuts that I have defined for the manager. Here are all the key combinations that we must use to open certain programs such as the terminal or the web browser.\n\nAs we can see below we have created a list in which using the Key() function we can define a keystroke combination to open our programs.\n\n```python\nkeys = [\n    \n    # menu\n    Key([mod], \"m\", lazy.spawn(\"rofi -show drun\")),\n\n    # windows nav\n    Key([mod, \"shift\"], \"m\", lazy.spawn(\"rofi -show\")),\n\n    # browser\n    Key([mod], \"b\", lazy.spawn(\"chromium\")),\n    Key([mod], \"f\", lazy.spawn(\"firefox\")),\n\n    # terminal\n    Key([mod], \"Return\", lazy.spawn(\"kitty\")),\n\n    # visual studio\n    Key([mod], \"v\", lazy.spawn(\"code\")),\n\n    # screenshot\n    Key([mod], \"s\", lazy.spawn(\"scrot\")),\n    Key([mod, \"shift\"], \"s\", lazy.spawn(\"scrot -s\")),\n\n]\n```\n\n\n#### Layouts.py\n\nThis code configures the layouts and rules for floating windows in Qtile. It defines how windows should look and behave, including border and margin colour, as well as rules for when windows should float rather than conform to a fixed layout. This is a crucial aspect of customising Qtile to suit the user's preferences and needs.\n\nAs we can see, the BSP (Binary Space Partitioning) layout, a layout provided by Qtile, is configured.\nBinary Space Partitioning is an effective technique for organising and managing windows in a window manager such as Qtile. It provides a flexible and efficient way to use the available space on the screen, adapting dynamically to the user's needs.\n\n```python\nlayout_conf = {\n    'border_focus': '#E3DAC9',\n    'border-width': 2,\n    'margin': 5,\n}\n\n\nlayouts = [\n    #layout.MonadTall(**layout_conf),\n    #layout.MonadWide(**layout_conf),\n    #layout.Columns(**layout_conf),\n    layout.Bsp(**layout_conf),\n    layout.Max(),\n    layout.Floating(**layout_conf),\n]\n\n\nfloating_layout = layout.Floating(\n    float_rules=[\n        *layout.Floating.default_float_rules,\n        Match(wm_class='confirmreset'),\n        Match(wm_class='makebranch'),\n        Match(wm_class='maketag'),\n        Match(wm_class='ssh-askpass'),\n        Match(wm_class='xterm'),\n        #Match(tittle='branchdialog'),\n        #Match(tittle='pinentry'),\n    ],\n    border_focus='#e3dac9'\n)\n```\n\n\n#### Mouse.py\n\nIn this module we have a configuration related to the behaviour of the mouse in floating window mode.\n\n```python\nmouse = [\n    Drag(\n        [mod],\n        \"Button1\",\n        lazy.window.set_position_floating(),\n        start=lazy.window.get_position()\n    ),\n    Drag(\n        [mod],\n        \"Button3\",\n        lazy.window.set_size_floating(),\n        start=lazy.window.get_size()\n    ),\n    Click([mod], \"Button2\", lazy.window.bring_to_front())\n]\n```\n\nThe first Drag function allows us to move the floating window around the screen with super + left mouse button, while the second one allows us to resize the window with super + right mouse button.\nThe click function allows us to bring the window in focus with the mouse to the front with super + middle mouse button.\n\n\n#### Screens.py\n\nThis code configures multiple screens in Qtile, creating a status bar. I have tried to create a minimalist and functional bar, but with a minimum of useful information.\n\n```python\ndef status_bar(widgets):\n    return bar.Bar(widgets, 38, opacity=0.92, background=\"#061113\", margin=12)\n\n\nscreens = [Screen(top=status_bar(primary_widgets))]\n\nxrandr = \"xrandr | grep -w 'connected' | cut -d ' ' -f 2 | wc -l\"\n\ncommand = subprocess.run(\n    xrandr,\n    shell=True,\n    stdout=subprocess.PIPE,\n    stderr=subprocess.PIPE,\n)\n\nif command.returncode != 0:\n    error = command.stderr.decode(\"UTF-8\")\n    logger.error(f\"Failed counting monitors using {xrandr}:\\n{error}\")\n    connected_monitors = 1\nelse:\n    connected_monitors = int(command.stdout.decode(\"UTF-8\"))\n\nif connected_monitors \u003e 1:\n    for _ in range(1, connected_monitors):\n        screens.append(Screen(top=status_bar(secondary_widgets)))\n\n```\n\nAs we can see we create a status_bar function that creates a bar (bar.Bar) provided by the Qtile libqtile library with the specified widgets, as well as the bar height, colour...\n\nWe run the command \"xrandr\" to know the number of screens and store it in the command variable, capturing the output (stdout) and the errors (stderr).\n\nWe check the number of connected monitors and if there is more than one we add it to the list of screens (screens = [ ]).\n\n#### Widgets.py\n\nThis module configures the widgets that appear in the status bar created earlier in screens.\n\nFirst we create a function that will contain all the widgets, which include an image such as the logo, the workspaces, the selected layout, the time, the version of the operating system we are using and the CPU and Ram usage.\n\n```python\ndef init_widgets_list():\n    widgets_list= [\n        widget.Image(\n            filename = \"~/.config/qtile/icons//qtile-icon1.svg\",\n            scale = \"false\",\n            mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm)},\n            padding = 2,\n        ),\n        widget.Prompt(\n            font = \"Ubuntu Nerd Font\",\n            fontsize = 14,\n            foreground = \"#f0ffff\"\n        ),\n        widget.GroupBox(\n            fontsize = 11,\n            font = 'Ubuntu Nerd Font',\n            margin_y = 3,\n            margin_x = 4,\n            padding_y = 2,\n            padding_x = 3,\n            borderwidth = 3,\n            active = colors['active'],\n            inactive = colors['inactive'],\n            rounded = False,\n            highlight_method = 'block',\n\t        urgent_alert_method='block',\n            urgent_border=colors['urgent'],\n            this_current_screen_border=colors['focus'],\n            this_screen_border=colors['grey'],\n            other_current_screen_border=colors['dark'],\n            other_screen_border=colors['dark'],\n            disable_drag=True\t\t\n        ),\n        widget.CurrentLayoutIcon(\n            foreground = \"#f0ffff\",\n            padding = 2,\n            scale = 0.5\n        ),\n        widget.Spacer(length = bar.STRETCH),\n        widget.Clock(\n            foreground = \"#f0ffff\",\n            format = \"%a, %b %d - %H:%M\",\n        ),\n        widget.Spacer(length = bar.STRETCH),\n        widget.GenPollText(\n                 update_interval = 300,\n                 func = lambda: subprocess.check_output(\"printf $(uname -r)\", shell=True, text=True),\n                 foreground = \"#f0ffff\",\n                 fmt = '❤  {}',\n                 ),\n        widget.Spacer(length = 12),\n        widget.CPU(\n                 format = '▓  {load_percent}%',\n                 foreground = \"#f0ffff\",\n                 ),\n        widget.Spacer(length = 12),\n        widget.Memory(\n                 foreground = \"#f0ffff\",\n                 mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')},\n                 format = '{MemUsed: .0f}{mm}',\n                 fmt = '󰍛  {}',\n                 ),\n        widget.Spacer(length = 8),\n        #widget.Systray(padding = 3),\n        widget.Spacer(length = 8),\n\n        ]\n    return widgets_list\n```\n\nWe define lists of widgets for primary and secondary screens using init_widgets_list().\n\n```python\nprimary_widgets = [\n    *init_widgets_list(),\n]\n\nsecondary_widgets = [\n    *init_widgets_list(),\n]\n```\n\nFinally, we set default values for widgets such as font, font size and padding.\n\n```python\nwidget_defaults = {\n    'font': 'Helvetica Bold',\n    'fontsize': 12,\n    'padding': 1,\n}\n\nextension_defaults = widget_defaults.copy()\n```\n\n\n#### Config.py\n\nFinally we have the main file, in which we import the modules created earlier, and set the start of the program with a hook.\n\n```python\n########################################\n##                                    ##\n## Spore Qtile Personal Configuration ##\n##                                    ##\n########################################\n\n## ---------- Main config ----------- ##\n\n\nfrom libqtile import hook\n\nfrom settings.keys import mod, keys\nfrom settings.groups import groups\nfrom settings.layouts import layouts, floating_layout\nfrom settings.widgets import widget_defaults, extension_defaults, myTerm\nfrom settings.screens import screens\nfrom settings.mouse import mouse\nfrom settings.path import qtile_path\n\nfrom os import path\nimport subprocess\n\n\n@hook.subscribe.startup_once\ndef autostart():\n    subprocess.call([path.join(qtile_path, 'autostart.sh')])\n\n\n\nmain = None\ndgroups_key_binder = None\ndgroups_app_rules = []\nfollow_mouse_focus = True\nbring_front_click = False\ncursor_wrap = True\nauto_fullscreen = True\nfocus_on_window_activation = 'urgent'\nwmname = \"LG3D\"\n```\n\nThe hook will run the autostart.sh file, which contains some settings for the startup of the wallpaper and the \"Picom\" composer.\nFinally I made some general settings, which can be customized.\n\n### ❄️ SETUP\n\n\u003e This is step-by-step how to install qtile with spore config. Just [R.T.F.M](https://en.wikipedia.org/wiki/RTFM).\n\n:warning: **This setup instructions only provided for Arch Linux and assuming that your AUR Helper is Paru (and other Arch-based distributions)**\n\n\n\u003cdetails\u003e\n   \n   \u003csummary\u003e\u003cb\u003e1. Install Required Dependencies and Qtile Window Manager\u003c/b\u003e\u003c/summary\u003e\n\n\n\u003e First of all you should install Qtile Window Manager\n\n```sh\nsudo pacman -S qtile\n```\n\n\u003e Install necessary dependencies\n\n```sh\nsudo pacman -S python-pip python-xlib xcb-util-keysyms\n```\n\n\n\u003e Install qtile extras\n\n```sh\nparu -S qtile-extras\n```\n\n\n\u003e You will need the Picom compositor\n\n```sh\nsudo pacman -S picom\n```\n\n\n\u003e Create a directory for the user config\n\n```sh\nmkdir -p ~/.config/qtile\ncp /usr/share/doc/qtile/default_config.py ~/.config/qtile/config.py\n```\n\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n   \u003csummary\u003e\u003cb\u003e2. Install spore.io\u003c/b\u003e\u003c/summary\u003e\n\n\n\u003e Install git\n\n```sh\nsudo pacman -S git\n```\n\n\n\u003e Clone the repository\n\n```sh\nmkdir ~/.config/qtile\ncd ~/.config/qtile\ngit clone https://github.com/sporestudio/dotfiles/tree/main/.config/qtile\n```\n\n   \n\u003c/details\u003e\n\n\n\u003e Install a few fonts in order for text and icons to be rendered properly.\n\nNecessary fonts:\n\n- **Helvetica** - [here](https://fontsgeek.com/helvetica-font)\n- **Mononoki Nerd Fonts** - [here](https://www.nerdfonts.com/font-downloads)\n- **Icons Hack Nerd Fonts** - [here](https://www.nerdfonts.com/font-downloads)\n\n\nOnce you download them and unpack them, place them into `~/.fonts` or `~/.local/share/fonts`.\n\n### ❄️ COLOR SCHEME\n\n![image](../assets/color-scheme.png)\n\nThe colour scheme is called Dark grey. As the name suggests, a combination of greys has been used together with azure white to enhance the contrast.\n\nThis combination gives a sober and elegant touch to the design and fits well with the minimalist philosophy that the window environment aims to achieve. A wallpaper has also been designed to match the theme of the environment.\n\n\n\u003c!-- License --\u003e\n\n## ❄️ LICENSE\n\nSpore.io is under \u003ca href=\"https://github.com/sporestudio/dotfiles/blob/main/LICENSE\"\u003eMIT License.\n\u003c/a\u003e\n\n\u003c!-- Author --\u003e\n\n## ❄️ AUTHOR\n\nCreated by \u003ca href=\"https://github.com/sporestudio/\"\u003esporestudio\u003c/a\u003e.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsporestudio%2Fdotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsporestudio%2Fdotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsporestudio%2Fdotfiles/lists"}