This commit is contained in:
parent
2aa8ea0180
commit
d08eb3a107
3 changed files with 36 additions and 3 deletions
24
tips/distrobox/kde/.kde_bashrc
Normal file
24
tips/distrobox/kde/.kde_bashrc
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# Required for kde-builder command
|
||||||
|
if [[ $PATH != *".local/bin"* ]]; then
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Workaround for NixOS
|
||||||
|
# ENVs have nix store references and made conflict during build or run of KDE Apps, Shells, Frameworks
|
||||||
|
alias new_shell="env -u PATH -u QML2_IMPORT_PATH -u QT_PLUGIN_PATH -u NIXPKGS_QT6_QML_IMPORT_PATH -u XDG_CONFIG_DIRS bash -l"
|
||||||
|
|
||||||
|
alias build_plasma_mobile="kde-builder plasma-mobile plasma-settings plasma-desktop kactivitymanagerd"
|
||||||
|
|
||||||
|
function run_mobile() {
|
||||||
|
source "$HOME/kde/build/plasma-mobile/prefix.sh"
|
||||||
|
|
||||||
|
QT_QPA_PLATFORM=offscreen plasma-mobile-envmanager --apply-settings
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||||
|
export QT_QUICK_CONTROLS_MOBILE=1
|
||||||
|
export PLASMA_PLATFORM=phone:handheld
|
||||||
|
export QT_QUICK_CONTROLS_STYLE=org.kde.breeze
|
||||||
|
|
||||||
|
QT_QPA_PLATFORM=wayland dbus-run-session kwin_wayland --xwayland "plasmashell -p org.kde.plasma.mobileshell" --width 360 --height 720
|
||||||
|
}
|
|
@ -7,6 +7,13 @@ if [[ $PATH != *".local/bin"* ]]; then
|
||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $PATH != *"alias new_shell"* ]]; then
|
||||||
|
echo "Append new_shell alias to PATH in ~/.bashrc"
|
||||||
|
echo 'alias new_shell="env -u PATH -u QML2_IMPORT_PATH -u QT_PLUGIN_PATH -u NIXPKGS_QT6_QML_IMPORT_PATH -u XDG_CONFIG_DIRS bash -l"' >> ~/.bashrc
|
||||||
|
echo "Reload shell"
|
||||||
|
source ~/.bashrc
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Installing kde-builder"
|
echo "Installing kde-builder"
|
||||||
curl 'https://invent.kde.org/sdk/kde-builder/-/raw/master/scripts/initial_setup.sh?ref_type=heads' > ~/initial_setup.sh
|
curl 'https://invent.kde.org/sdk/kde-builder/-/raw/master/scripts/initial_setup.sh?ref_type=heads' > ~/initial_setup.sh
|
||||||
bash ~/initial_setup.sh && rm ~/initial_setup.sh
|
bash ~/initial_setup.sh && rm ~/initial_setup.sh
|
||||||
|
@ -15,6 +22,6 @@ echo "Run initial setup from kde-builder"
|
||||||
kde-builder --initial-setup
|
kde-builder --initial-setup
|
||||||
|
|
||||||
echo "Install missing dependencies"
|
echo "Install missing dependencies"
|
||||||
sudo dnf install qt6-qttools-devel
|
sudo dnf install qt6-*-devel
|
||||||
|
|
||||||
echo "Configuration DONE"
|
echo "Configuration DONE"
|
|
@ -3,10 +3,12 @@
|
||||||
## First configuration
|
## First configuration
|
||||||
|
|
||||||
1. `distrobox assemble`
|
1. `distrobox assemble`
|
||||||
> You can add --replace to recreate distrobox container
|
> You can add --replace to recreate distrobox container
|
||||||
2. `distrobox enter kdedev`
|
2. `distrobox enter kdedev`
|
||||||
3. `bash configure.sh`
|
3. `bash configure.sh`
|
||||||
4. `kde-builder run solid`
|
4. `kde-builder run solid`
|
||||||
|
> You use NixOS ? It's necessary to run `new_shell` alias before.
|
||||||
|
> The alias unset all nixos env variables with nix store references to avoid conflicts with build or run of KDE Shells/Apps/Tools.
|
||||||
|
|
||||||
## Usefull config in ~/.config/kdesrc-buildrc
|
## Usefull config in ~/.config/kdesrc-buildrc
|
||||||
|
|
||||||
|
@ -14,4 +16,4 @@ Autogenerate editor configuration
|
||||||
|
|
||||||
- generate-clion-project-config
|
- generate-clion-project-config
|
||||||
- generate-vscode-project-config
|
- generate-vscode-project-config
|
||||||
- generate-qtcreator-project-config
|
- generate-qtcreator-project-config
|
||||||
|
|
Loading…
Reference in a new issue