Easy saving and switching between multiple KDE configurations.

Overview

Konfsave

Konfsave is a config manager. That is, it allows you to save, back up, and easily switch between different (per-user) system configurations. Each configuration is stored as a profile; the script allows you to save the current configuration as a named profile, and then load them by name. It's also possible to take these profiles somewhere else by exporting or importing them, or just copying their folder.

By default, Konfsave manages your KDE configuration - specifically, its appearance and workspace settings. This can be easily changed in config.ini. If you'd like to learn more about how to adjust the configuration, see the wiki. You can also specify additional files to include or exclude once using command line options.

Inspired by https://github.com/Prayag2/konsave.

Requirements

Python 3.8+ is required. On some systems, this means that you must use python3 instead of python.

Installation & Usage

The configuration file, config.ini, is stored in $XDG_CONFIG_HOME/konfsave (usually it's ~/.config/konfsave).
Usage instructions can be viewed with konfsave --help.

There are 2 installation options:

PyPI

Konfsave is on PyPI, which means that it can be installed with pip:
python -m pip install konfsave
After this, you should be able to run Konfsave directly from the terminal. If not, try python -m konfsave.

The crude way

This method is not recommended unless you're debugging or rewriting Konfsave.
__main__.py can be run as is; just download the repository. You can also run install.sh which will copy files to .config and link __main__.py to .local/bin/konfsave. Unlike the PyPI method, this will not allow you to easily update the program.

Future features

  • Standardizing groups so that someone else's profile can specify what it supports
  • Optionally storing profiles as Git repositories and syncing them using remotes

License

Copyright (c) 2021 Illia Boiko (selplacei) and contributors. All source code in this repository may only be used under the terms and conditions found in the LICENSE file.

You might also like...
A flexible package manager that supports multiple versions, configurations, platforms, and compilers.

Spack Spack is a multi-platform package manager that builds and installs multiple versions and configurations of software. It works on Linux, macOS, a

A flexible package manager that supports multiple versions, configurations, platforms, and compilers.

Spack Spack is a multi-platform package manager that builds and installs multiple versions and configurations of software. It works on Linux, macOS, a

Konsave lets use save your KDE Plasma customizatios and restore them very easily!
Konsave lets use save your KDE Plasma customizatios and restore them very easily!

Konsave (Save Plasma Customization) A CLI program that will let you save and apply your KDE Plasma customizations with just one command! Als

KConfig Browser is a graphical application which allows you to modify KDE configuration files found in ~/.config
KConfig Browser is a graphical application which allows you to modify KDE configuration files found in ~/.config

kconfig_browser KConfig Browser is a graphical application which allows you to modify KDE configuration files found in ~/.config Screenshot Why I crea

switching computer? changing your setup? You need to automate the download of your current setup? This is the right tool for you :incoming_envelope:

🔮 setup_shift(SS.py) switching computer? changing your setup? You need to automate the download of your current setup? This is the right tool for you

MATE Layouts is a small panel layout switching application for the MATE Desktop.
MATE Layouts is a small panel layout switching application for the MATE Desktop.

a small panel layout switching application for the MATE Desktop

Nginx UI allows you to access and modify the nginx configurations files without cli.
Nginx UI allows you to access and modify the nginx configurations files without cli.

nginx ui Table of Contents nginx ui Introduction Setup Example Docker UI Authentication Configure the auth file Configure nginx Introduction We use ng

A NetBox Plugin that gives a UI for generating, comparing and deploying configurations to devices.

netbox_config_plugin - A plugin to generate, compare and deploy configurations This plugin allows you to execute your code to generate a config for a

MagTape is a Policy-as-Code tool for Kubernetes that allows for evaluating Kubernetes resources against a set of defined policies to inform and enforce best practice configurations.
MagTape is a Policy-as-Code tool for Kubernetes that allows for evaluating Kubernetes resources against a set of defined policies to inform and enforce best practice configurations.

MagTape is a Policy-as-Code tool for Kubernetes that allows for evaluating Kubernetes resources against a set of defined policies to inform and enforce best practice configurations. MagTape includes variable policy enforcement, notifications, and targeted metrics.

Basic FastAPI starter with GraphQL, Docker, and MongoDB configurations.

FastAPI + GraphQL Starter A python starter project using FastAPI and GraphQL. This project leverages docker for containerization and provides the scri

An Open-Source Discord bot created to provide basic functionality which should be in every discord guild. We use this same bot with additional configurations for our guilds.

A Discord bot completely written to be taken from the source and built according to your own custom needs. This bot supports some core features and is

Dotfiles for my configurations!
Dotfiles for my configurations!

Dotfiles Repo Welcome! Over here, you can find my dotfiles for various applications, including QTile, Alacritty, Kitty, LunarVim, and more! Make sure

Plot-configurations for scientific publications, purely based on matplotlib

TUEplots Plot-configurations for scientific publications, purely based on matplotlib. Usage Please have a look at the examples in the example/ directo

SMTP In some vulnerable configurations, email servers can also be aggregated Use information that gives us information about the host or network Give

SMTP In some vulnerable configurations, email servers can also be aggregated Use information that gives us information about the host or network Give. The SMTP protocol supports some basic commands such as VRFY and EXPN Slowly A VRFY request asks the server to verify an email address while Which requests an EXPN request for email list membership. These requests are The power is sometimes misused to verify the existence of a user on the email server Used by hackers later

My sister is a GR of her class. She had to mark attendance of students from screenshots of teams meeting on an excel sheet. I resolved her problem by reading names from screenshots using PyTesseract and marking them present on the excel using Pandas in Python. It took me 1hr to write the code and it is saving half an hour everyday.
Telegram Bot for saving and sharing personal and group notes

EZ Notes Bot (ezNotesBot) Telegram Bot for saving and sharing personal and group notes. Usage Personal notes: reply to any message in PM to save it as

Product-Review-Summarizer - Created a product review summarizer which clustered thousands of product reviews and summarized them into a maximum of 500 characters, saving precious time of customers and helping them make a wise buying decision.

Product-Review-Summarizer - Created a product review summarizer which clustered thousands of product reviews and summarized them into a maximum of 500 characters, saving precious time of customers and helping them make a wise buying decision.

Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk
Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk

Annoy Annoy (Approximate Nearest Neighbors Oh Yeah) is a C++ library with Python bindings to search for points in space that are close to a given quer

Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk
Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk

Annoy Annoy (Approximate Nearest Neighbors Oh Yeah) is a C++ library with Python bindings to search for points in space that are close to a given quer

Comments
  • "No profile is currently active."

    I can't save my current KDE configuration (using the default config.ini) with konfsave s. I get the following error:

    Traceback (most recent call last):
      File "/usr/bin/konfsave", line 8, in <module>
        sys.exit(main())
      File "/usr/lib/python3.9/site-packages/konfsave/__main__.py", line 15, in main
        actions.parse_arguments(sys.argv)
      File "/usr/lib/python3.9/site-packages/konfsave/actions.py", line 51, in parse_arguments
        next(v for k, v in {
      File "/usr/lib/python3.9/site-packages/konfsave/actions.py", line 227, in action_save
        profiles.save(
      File "/usr/lib/python3.9/site-packages/konfsave/profiles.py", line 124, in save
        raise RuntimeError('Attempted to save the current profile, but no profile is active.')
    RuntimeError: Attempted to save the current profile, but no profile is active.
    

    Self-explanatory error, but what I'm confused about is why no profile is active in the first place. konfsave i yields a

    No profile is currently active.
    No profiles are saved.
    

    ...while I'd expect my KDE config to be detected. I'm assuming this might be because konfsave f shows me it saves a .kde4 directory in my $HOME directory, although I have a .kde dir instead. Is this tool only compatible with KDE 4? I couldn't find information related to this.

    I have a feeling I may also simply be using the tool badly, though. Nevertheless, this means I can't figure out how to export my configs and so can't use it.

    Thanks for your work so far, this project looks quite promising.

    System information: Arch Linux, KDE Plasma Version: 5.21.2, KDE Frameworks Version: 5.79.0.

    opened by OctaveLarose 3
  • Compares badly with PlasmaConfigSaver

    Compares badly with PlasmaConfigSaver

    I am trying to manage profiles. Right now I have three.

    1. Card - light creamy, light latte with contrasting text in Event Calendar. Also matching default Konsole profile needs switching, and Dolphin terminal also.

    2. Gruv is a grey-green dark profile for comfort, with matching colours in latte/konsole profile etc.

    3. Nordic - (less dark) cold colours theme.

    I was testing switching this morning, using shortcuts for restarting plasma and restarting kwin without logging out.

    konsave fails to switch terminal (konsole and dolphin) and requires manual latte restart, and is vastly inferior to the plasmaconfigsaver.

    konfsave fails to switch terminal (konsole) and fails to update the event calendar colours in latte.

    As I say, PlasmaConfigSaver usually succeeds, though I sometimes need to do kwin restart and plasmashell restart again.

    It is obviously interesting that you will have a config file. I would like to add a new default profile save path (i.e. default to ~/Dropbox/.config) and also add qbittorrent settings, as the dark icon works with profile 1, light icon with 3, and plasma icon with 2.

    opened by ben2talk 3
  • Sub-optimal restarting mechanisms for plasmashell, KWin, and Latte

    Sub-optimal restarting mechanisms for plasmashell, KWin, and Latte

    Currently, all three of these programs are restarted using the --replace option after loading the config. Not only does this create unnecessary waiting and overhead, but it may also fail due to how these programs manage their configs. Instead, existing mechanisms such as DBus should be used to reload configuration, and if that's not possible, configs should be loaded after the corresponding program has exited.

    This will be addressed in a future PR.

    enhancement 
    opened by selplacei 1
  • Git integration suggestion

    Git integration suggestion

    When implementing git integration, have you considered monitoring for changes in the repository and pulling them automatically to the client/clients and applying the active profile to update the settings?

    The use case I imagine is like so:

    • I have 2 or more instances of KDE on different computers
    • I do some tweaking and save/commit the changes using your tool on system A
    • system B detects a change in the repository and pulls the changes
    • if changes apply without conflict, refresh profile
    • if not, ignore changes and let user solve conflict

    Something like this would be awesome!

    Regards.

    enhancement 
    opened by javierurien 2
Releases(0.4.0)
  • 0.4.0(Mar 13, 2021)

    The following is now specified in the config:

    • profile-home (parent directory of all saved profiles)
    • profile-info-filename (the file stored in profiles to keep track of attributes)
    • current-profile-path (where to store the current profile's profile-info-filename copy)
    • archive-directory (where to save archives by default)
    Source code(tar.gz)
    Source code(zip)
  • 0.3.3(Mar 13, 2021)

  • 0.3.2(Mar 10, 2021)

    Fixed:

    • Saving to a new profile wouldn't switch to it
    • The options --include and --exclude raised an error when saving
    • Deleting a single profile didn't print the correct prompt
    Source code(tar.gz)
    Source code(zip)
  • 0.3.0(Mar 9, 2021)

    The config now features a more advanced system of grouping paths together under an intuitive name. More info and instructions will be added to the wiki.

    Source code(tar.gz)
    Source code(zip)
  • 0.2.1(Mar 5, 2021)

  • 0.2.0(Mar 3, 2021)

  • 0.1.0(Mar 1, 2021)

    Konfsave now has a useful feature set: it can save, load, modify, and print information about profiles. Will still need testing to make sure existing functionality works, as well as more safeguards in case things go wrong.

    Source code(tar.gz)
    Source code(zip)
Owner
I like FOSS
Enforce the same configuration across multiple projects

Nitpick Flake8 plugin to enforce the same tool configuration (flake8, isort, mypy, Pylint...) across multiple Python projects. Useful if you maintain

Augusto W. Andreoli 315 Dec 25, 2022
Mypy stubs, i.e., type information, for numpy, pandas and matplotlib

Mypy type stubs for NumPy, pandas, and Matplotlib This is a PEP-561-compliant stub-only package which provides type information for matplotlib, numpy

Predictive Analytics Lab 194 Dec 19, 2022
Silence mypy by adding or removing code comments

mypy-silent Automatically add or remove # type: ignore commends to silence mypy. Inspired by pylint-silent Why? Imagine you want to add type check for

Wu Haotian 8 Nov 30, 2022
Run isort, pyupgrade, mypy, pylint, flake8, and more on Jupyter Notebooks

Run isort, pyupgrade, mypy, pylint, flake8, mdformat, black, blacken-docs, and more on Jupyter Notebooks ✅ handles IPython magics robustly ✅ respects

663 Jan 08, 2023
Pyright extension for coc.nvim

coc-pyright Pyright extension for coc.nvim Install :CocInstall coc-pyright Note: Pyright may not work as expected if can't detect project root correct

Heyward Fann 1.1k Jan 02, 2023
Check for python builtins being used as variables or parameters

Flake8 Builtins plugin Check for python builtins being used as variables or parameters. Imagine some code like this: def max_values(list, list2):

Gil Forcada Codinachs 98 Jan 08, 2023
The strictest and most opinionated python linter ever!

wemake-python-styleguide Welcome to the strictest and most opinionated python linter ever. wemake-python-styleguide is actually a flake8 plugin with s

wemake.services 2.1k Jan 01, 2023
Flake8 plugin for managing type-checking imports & forward references

flake8-type-checking Lets you know which imports to put in type-checking blocks. For the imports you've already defined inside type-checking blocks, i

snok 67 Dec 16, 2022
Python classes with types validation at runtime.

typedclasses Python classes with types validation at runtime. (Experimental & Under Development) Installation You can install this library using Pytho

Izhar Ahmad 8 Feb 06, 2022
Type stubs for the lxml package

lxml-stubs About This repository contains external type annotations (see PEP 484) for the lxml package. Installation To use these stubs with mypy, you

25 Dec 26, 2022
Flake8 plugin to validate annotations complexity

flake8-annotations-complexity An extension for flake8 to report on too complex type annotations. Complex type annotations often means bad annotations

BestDoctor 41 Dec 28, 2022
Plugin for mypy to support zope.interface

Plugin for mypy to support zope.interface The goal is to be able to make zope interfaces to be treated as types in mypy sense. Usage Install both mypy

Shoobx 36 Oct 29, 2022
Tool for pinpointing circular imports in Python. Find cyclic imports in any project

Pycycle: Find and fix circular imports in python projects Pycycle is an experimental project that aims to help python developers fix their circular de

Vadim Kravcenko 311 Dec 15, 2022
A Pylint plugin to analyze Flask applications.

pylint-flask About pylint-flask is Pylint plugin for improving code analysis when editing code using Flask. Inspired by pylint-django. Problems pylint

Joe Schafer 62 Sep 18, 2022
mypy plugin for loguru

loguru-mypy A fancy plugin to boost up your logging with loguru mypy compatibility logoru-mypy should be compatible with mypy=0.770. Currently there

Tomasz Trębski 13 Nov 02, 2022
A python documentation linter which checks that the docstring description matches the definition.

Darglint A functional docstring linter which checks whether a docstring's description matches the actual function/method implementation. Darglint expe

Terrence Reilly 463 Dec 31, 2022
A simple program which checks Python source files for errors

Pyflakes A simple program which checks Python source files for errors. Pyflakes analyzes programs and detects various errors. It works by parsing the

Python Code Quality Authority 1.2k Dec 30, 2022
Code audit tool for python.

Pylama Code audit tool for Python and JavaScript. Pylama wraps these tools: pycodestyle (formerly pep8) © 2012-2013, Florent Xicluna; pydocstyle (form

Kirill Klenov 967 Jan 07, 2023
MyPy types for WSGI applications

WSGI Types for Python This is an attempt to bring some type safety to WSGI applications using Python's new typing features (TypedDicts, Protocols). It

Blake Williams 2 Aug 18, 2021
open source tools to generate mypy stubs from protobufs

mypy-protobuf: Generate mypy stub files from protobuf specs We just released a new major release mypy-protobuf 2. on 02/02/2021! It includes some back

Dropbox 527 Jan 03, 2023