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
null
A plugin for Flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle.

flake8-bugbear A plugin for Flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycode

Python Code Quality Authority 869 Dec 30, 2022
Optional static typing for Python 3 and 2 (PEP 484)

Mypy: Optional Static Typing for Python Got a question? Join us on Gitter! We don't have a mailing list; but we are always happy to answer questions o

Python 14.4k Jan 8, 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 1, 2023
coala provides a unified command-line interface for linting and fixing all your code, regardless of the programming languages you use.

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." ― John F. Woods coala provides a

coala development group 3.4k Dec 29, 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
Automated security testing using bandit and flake8.

flake8-bandit Automated security testing built right into your workflow! You already use flake8 to lint all your code for errors, ensure docstrings ar

Tyler Wince 96 Jan 1, 2023
PEP-484 typing stubs for SQLAlchemy 1.4 and SQLAlchemy 2.0

SQLAlchemy 2 Stubs These are PEP-484 typing stubs for SQLAlchemy 1.4 and 2.0. They are released concurrently along with a Mypy extension which is desi

SQLAlchemy 139 Dec 30, 2022
A framework for detecting, highlighting and correcting grammatical errors on natural language text.

Gramformer Human and machine generated text often suffer from grammatical and/or typographical errors. It can be spelling, punctuation, grammatical or

Prithivida 1.3k Jan 8, 2023
Utilities for pycharm code formatting (flake8 and black)

Pycharm External Tools Extentions to Pycharm code formatting tools. Currently supported are flake8 and black on a selected code block. Usage Flake8 [P

Haim Daniel 13 Nov 3, 2022
A lightweight wrapper for PyTorch that provides a simple declarative API for context switching between devices, distributed modes, mixed-precision, and PyTorch extensions.

A lightweight wrapper for PyTorch that provides a simple declarative API for context switching between devices, distributed modes, mixed-precision, and PyTorch extensions.

Fidelity Investments 56 Sep 13, 2022