- Auto Update Dev Container (custom scripts, see below)
- Logitech Service (logiops)
- Auto Clean Downloads
- Using logiops as client.
/etc/logid.cfg
:
devices: ({
name: "Wireless Mouse MX Master 2S";
// A lower threshold number makes the wheel switch to free-spin mode
// quicker when scrolling fast.
smartshift: { on: true; threshold: 20; };
hiresscroll: {
hires: true;
invert: false;
target: true;
up: {
mode: "Axis";
axis: "REL_WHEEL_HI_RES";
axis_multiplier: 2;
},
down: {
mode: "Axis";
axis: "REL_WHEEL_HI_RES";
axis_multiplier: -2;
},
};
// Higher numbers make the mouse more sensitive (cursor moves faster),
// 4000 max for MX Master 3.
dpi: 1500;
buttons: (
// Make thumb button 10.
{ cid: 0x53; action = { type: "Keypress"; keys: ["KEY_BACK"]; }; },
// Make top button 11.
{ cid: 0x56; action = { type: "Keypress"; keys: ["KEY_FORWARD"]; }; },
// Gesture Button to CTRL
{ cid: 0xc3; action = { type: "Keypress"; keys: ["KEY_LEFTCTRL"]; }; },
{
cid: 0xc4;
action =
{
type: "Gestures";
gestures: (
{
direction: "Left";
mode: "OnThreshold";
action =
{
type: "Keypress";
keys: ["KEY_LEFTMETA", "KEY_PAGEDOWN"];
};
},
{
direction: "Right";
mode: "OnThreshold";
action =
{
type: "Keypress";
keys: ["KEY_LEFTMETA", "KEY_PAGEUP"];
}
},
{
direction: "None"
mode: "OnRelease";
action =
{
type: "Keypress";
keys: ["KEY_LEFTMETA"];
}
}
);
};
},
);
});
- Install dnf-automatic on the container
- Enable apply_updates in
sudoedit /etc/dnf/automatic.conf
- Export
dnf-automatic.timer
anddnf-automatic.service
from distrobox.distrobox-export --service dnf-automatic.timer
distrobox-export --service dnf-automatic.service
- Enable dnf-automatic.timer in host:
systemctl enable --now development-dnf-automatic.timer
- Update
~/.config/systemd/user/development-dnf-automatic.timer
to update at wanted time of day.
import os
import time
from pathlib import Path
from subprocess import run
MAX_DAYS = 3
current_time = time.time()
dir_path = Path.home() / "Downloads"
for f in os.listdir(dir_path):
f_full_path = dir_path / f
creation_time = os.path.getctime(f_full_path)
if (current_time - creation_time) // (24 * 60 * 60) >= MAX_DAYS:
# try:
# os.remove(f_full_path)
# except IsADirectoryError:
# shutil.rmtree(f_full_path)
run(["gio", "trash", f_full_path])
print(f"{f} removed")
Documents and Downloads folder is symlinked with host
Installed through dnf directly into the container. Exported through distrobox as both bin and app to the host
~/.profile
:
# Host Aliases
for COMMAND in "gnome-text-editor"
alias dh="distrobox-host-exec"
do
alias $COMMAND="distrobox-host-exec $COMMAND"
done
...
~/.config/fish/config.fish
:
alias dh="distrobox-host-exec"
for COMMAND in "gnome-text-editor"
alias $COMMAND="distrobox-host-exec $COMMAND"
end
Access host podman from container
~/.local/bin/podman
:
#! /bin/sh
exec distrobox-host-exec podman $@
Update script
#! /bin/python3
from pathlib import Path
from subprocess import run, check_output
git_project_path = (Path(__file__).parent / "MoreWaita").absolute()
def log(*args):
print("[UPDATE_SCRIPT]:", *args)
def get_git_hash():
hash = (
check_output(["git", "rev-parse", "HEAD"], cwd=git_project_path)
.decode()
.strip()
)
log("Found hash:", hash)
return hash
def get_updates():
pre_hash = get_git_hash()
log("Doing git pull")
run(["git", "pull"], cwd=git_project_path)
post_hash = get_git_hash()
return pre_hash != post_hash
is_update_available = get_updates()
if is_update_available:
log("Changes detected. Updating theme...")
run("./install.sh", cwd=git_project_path)
log("Notifying desktop")
run(
[
"notify-send",
"MoreWaita was updated",
"MoreWaita IconPack was updated using your own script!",
]
)
log("DONE!")
else:
log("No updates detected")
- Add
--enable-features=UseOzonePlatform,TouchpadOverscrollHistoryNavigation --ozone-platform=wayland
as arguments when executing binary on.desktop
files. - Enable Ozone in chrome flags.
Switch execution property to be:
/usr/bin/flatpak run \
--socket=wayland \
--branch=stable \
--arch=x86_64 \
--command=/app/extra/bin/spotify \
--file-forwarding com.spotify.Client \
--ozone-platform=wayland \
'--enable-features=WaylandWindowDecorations' \
@@u %U @@
Switch execution property to be:
/usr/bin/distrobox-enter -n dev -- env ELECTRON_TRASH=trash-cli GTK_USE_PORTAL=1 /usr/share/code/code --enable-features=WaylandWindowDecorations --enable-features=UseOzonePlatform --ozone-platform=wayland --unity-launch %F
📦[keyhost505@fedora ~]$ distrobox-export --service dnf-automatic.timer
ERROR: Invalid flag '--service'