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
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
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
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
MonkeyType as a pytest plugin.

MonkeyType as a pytest plugin.

Marius van Niekerk 36 Nov 24, 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
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
Convert relative imports to absolute

absolufy-imports A tool and pre-commit hook to automatically convert relative imports to absolute. Installation $ pip install absolufy-imports Usage a

Marco Gorelli 130 Dec 30, 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
Flake8 extension for enforcing trailing commas in python

Flake8 Extension to enforce better comma placement. Usage If you are using flake8 it's as easy as: pip install flake8-commas Now you can avoid those a

Python Code Quality Authority 127 Sep 03, 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
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
An extension for flake8 that forbids some imports statements in some modules.

flake8-obey-import-goat An extension for flake8 that forbids some imports statements in some modules. Important: this project is developed using DDD,

Ilya Lebedev 10 Nov 09, 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
Simple Python style checker in one Python file

pycodestyle (formerly called pep8) - Python style guide checker pycodestyle is a tool to check your Python code against some of the style conventions

Python Code Quality Authority 4.7k Jan 01, 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
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
Mypy stubs for the PyQt5 framework

Mypy stubs for the PyQt5 framework This repository holds the stubs of the PyQt5 framework. It uses the stub files that are produced during compilation

62 Nov 22, 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
Flake8 plugin that checks import order against various Python Style Guides

flake8-import-order A flake8 and Pylama plugin that checks the ordering of your imports. It does not check anything else about the imports. Merely tha

Python Code Quality Authority 270 Nov 24, 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