qtile-profiles
Im using my laptop for work and private stuff and wanted to use some kind of profiles.
Installation
You can install the package using pip
pip install qtile-profiles
Usage
from qtile_profiles import Profile, ProfileManager
def set_browser(browser: str):
subprocess.run(
f"xdg-mime default {browser} x-scheme-handler/http",
shell=True,
)
subprocess.run(
f"xdg-mime default {browser} x-scheme-handler/https",
shell=True,
)
work = Profile(
programs={ # define some aliases for shorter commands later
"firefox": "firefox",
"thunderbird": "flatpak run org.mozilla.Thunderbird", # see 6 lines down
"teams": "chromium --app=https://teams.office.com",
},
init=[ # spawn these program when calling initialize
("web", ["firefox"]),
("chat", ["mattermost-desktop", "teams"]),
("mail", ["tunderbird"]), # here we can use thunderbird insead of calling flatpak
("kp", ["keepassxc"]),
],
on_load=lambda qtile: set_browser("firefox.desktop") # callback, call when profile is selected
)
privat = Profile(
programs={
"firefox": "firefox -P privat",
"thunderbird": "thunderbird",
"discord": "discord",
},
init=[
("web", ["firefox"]),
("chat", ["signal-desktop", "discord"]),
("mail", ["thunderbird"]),
("kp", ["keepassxc"]),
],
on_load=lambda qtile: set_browser("firefox-privat.desktop")
)
profiles = ProfileManager([work, privat])
keys.extend([
Key([super], "p", lazy.function(profiles.next_profile)),
Key([super], "f", lazy.function(profiles.spawn, "firefox")),
Key([super], "i", lazy.function(profiles.current_profile.spawn_init)),
])
Metadata
Release files for qtile-profiles 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qtile-profiles-0.1.2.tar.gz | 13.9 kB | Without provenance | Details for qtile-profiles-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qtile_profiles-0.1.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for qtile_profiles-0.1.2-py2.py3-none-any.whl |
Total release size: 28.1 kB
Release files / qtile-profiles-0.1.2.tar.gz
| Download URL | qtile-profiles-0.1.2.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef75068b39e4da1d31846c7402694e09f447e3e7be9f4aeabc5cbc6d6d3e110c
|
|
BLAKE2b-256 checksum How to use checksums |
11e4286377be41feebde116245519c41ca11983a5f62ed0d90b9b334ec2ecbad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|
Release files / qtile_profiles-0.1.2-py2.py3-none-any.whl
| Download URL | qtile_profiles-0.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
dc486ce9ba3759ca8a48f74d19583274f07ea1a9e4677b904ef84543f7daa535
|
|
BLAKE2b-256 checksum How to use checksums |
157fc61d3fa2b62a91dd99e233b88e1ec9b98107cbf8a0fab82609091f8cdae9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|
Security for qtile-profiles 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.