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
Unbearably fast O(1) runtime type-checking in pure Python.

Look for the bare necessities, the simple bare necessities. Forget about your worries and your strife. — The Jungle Book.

beartype 1.4k Jan 01, 2023
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
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
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
👻 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
A plugin for flake8 integrating Mypy.

flake8-mypy NOTE: THIS PROJECT IS DEAD It was created in early 2017 when Mypy performance was often insufficient for in-editor linting. The Flake8 plu

Łukasz Langa 103 Jun 23, 2022
Flashcards - A flash card application with 2 optional command line arguments

Flashcards A flash card application with 2 optional command line arguments impor

Özgür Yildirim 2 Jul 15, 2022
Stubs with type annotations for ordered-set Python library

ordered-set-stubs - stubs with type annotations for ordered-set Python library Archived - now type annotations are the part of the ordered-set library

Roman Inflianskas 2 Feb 06, 2020
Flake8 wrapper to make it nice, legacy-friendly, configurable.

THE PROJECT IS ARCHIVED Forks: https://github.com/orsinium/forks It's a Flake8 wrapper to make it cool. Lint md, rst, ipynb, and more. Shareable and r

Life4 232 Dec 16, 2022
The mypy playground. Try mypy with your web browser.

mypy-playground The mypy playground provides Web UI to run mypy in the sandbox: Features Web UI and sandbox for running mypy eas

Yusuke Miyazaki 57 Jan 02, 2023
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
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
Tool to check the completeness of MANIFEST.in for Python packages

check-manifest Are you a Python developer? Have you uploaded packages to the Python Package Index? Have you accidentally uploaded broken packages with

Marius Gedminas 270 Dec 26, 2022
Utilities for refactoring imports in python-like syntax.

aspy.refactor_imports Utilities for refactoring imports in python-like syntax. Installation pip install aspy.refactor_imports Examples aspy.refactor_i

Anthony Sottile 20 Nov 01, 2022
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
: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
Collection of awesome Python types, stubs, plugins, and tools to work with them.

Awesome Python Typing Collection of awesome Python types, stubs, plugins, and tools to work with them. Contents Static type checkers Dynamic type chec

TypedDjango 1.2k Jan 04, 2023
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
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 03, 2022
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