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
Reference implementation of sentinels for the Python stdlib

Sentinels This is a reference implementation of a utility for the definition of sentinel values in Python. This also includes a draft PEP for the incl

Tal Einat 22 Aug 27, 2022
Performant type-checking for python.

Pyre is a performant type checker for Python compliant with PEP 484. Pyre can analyze codebases with millions of lines of code incrementally – providi

Facebook 6.2k Jan 04, 2023
Custom Python linting through AST expressions

bellybutton bellybutton is a customizable, easy-to-configure linting engine for Python. What is this good for? Tools like pylint and flake8 provide, o

H. Chase Stevens 249 Dec 31, 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 01, 2023
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
Pylint plugin for improving code analysis for when using Django

pylint-django About pylint-django is a Pylint plugin for improving code analysis when analysing code using Django. It is also used by the Prospector t

Python Code Quality Authority 544 Jan 06, 2023
👻 Phantom types for Python

phantom-types Phantom types for Python will help you make illegal states unrepresentable and avoid shotgun parsing by enabling you to practice "Parse,

Anton Agestam 118 Dec 22, 2022
Rust like Option and Result types in Python

Option Rust-like Option and Result types in Python, slotted and fully typed. An Option type represents an optional value, every Option is either Some

45 Dec 13, 2022
Tool to automatically fix some issues reported by flake8 (forked from autoflake).

autoflake8 Introduction autoflake8 removes unused imports and unused variables from Python code. It makes use of pyflakes to do this. autoflake8 also

francisco souza 27 Sep 08, 2022
mypy plugin to type check Kubernetes resources

kubernetes-typed mypy plugin to dynamically define types for Kubernetes objects. Features Type checking for Custom Resources Type checking forkubernet

Artem Yarmoliuk 16 Oct 10, 2022
Static Typing for Python

Python static typing home. Contains the source for typing_extensions and the documentation. Also hosts a user help forum.

Python 1.3k Jan 06, 2023
flake8 plugin which checks that typing imports are properly guarded

flake8-typing-imports flake8 plugin which checks that typing imports are properly guarded installation pip install flake8-typing-imports flake8 codes

Anthony Sottile 50 Nov 01, 2022
A plugin for Flake8 that provides specializations for type hinting stub files

flake8-pyi A plugin for Flake8 that provides specializations for type hinting stub files, especially interesting for linting typeshed. Functionality A

Łukasz Langa 58 Jan 04, 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
Easy saving and switching between multiple KDE configurations.

Konfsave Konfsave is a config manager. That is, it allows you to save, back up, and easily switch between different (per-user) system configurations.

42 Sep 25, 2022
🦆 Better duck-typing with mypy-compatible extensions to Protocol

🦆 Quacks If it walks like a duck and it quacks like a duck, then it must be a duck Thanks to PEP544, Python now has protocols: a way to define duck t

Arie Bovenberg 9 Nov 14, 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
:sparkles: Surface lint errors during code review

✨ Linty Fresh ✨ Keep your codebase sparkly clean with the power of LINT! Linty Fresh parses lint errors and report them back to GitHub as comments on

Lyft 183 Dec 18, 2022
Backport Python 3.8+ typing utils & add issubtype & more

typing-utils Backport Python3.8+ typing utils & issubtype & more Install API issubtype get_origin get_args get_type_hints Install pip install typi

10 Nov 09, 2022
flake8 plugin to catch useless `assert` statements

flake8-useless-assert flake8 plugin to catch useless assert statements Download or install on the PyPI page Violations Code Description Example ULA001

1 Feb 12, 2022