From fd8838672c5bc59c984154794e1aa027bc149afe Mon Sep 17 00:00:00 2001 From: Philip Mueller Date: Thu, 7 Mar 2024 18:20:40 +0700 Subject: [PATCH] [gaming] initial KDE6 profile --- oem/gaming-oem-kde6/Packages-Desktop | 299 ++++++++++++++++++ oem/gaming-oem-kde6/Packages-Live | 10 + oem/gaming-oem-kde6/Packages-Root | 70 ++++ .../etc/X11/xorg.conf.d/70-synaptics.conf | 8 + .../desktop-overlay/etc/default/grub | 67 ++++ .../desktop-overlay/etc/pam.d/sddm | 8 + .../etc/sddm.conf.d/virtualkbd.conf | 2 + .../etc/sddm.conf.d/xx-steam-deckify.conf | 11 + .../etc/sysctl.d/50-max_user_watches.conf | 1 + .../etc/xdg/autostart/steam.desktop | 39 +++ .../desktop-overlay/etc/yakuakerc | 2 + .../bin/gamescope-wayland-teardown-workaround | 12 + .../usr/bin/manjaro-post-install | 34 ++ .../desktop-overlay/usr/bin/mkswapfile | 32 ++ .../usr/bin/startplasma-steamos-oneshot | 46 +++ .../steamos-polkit-helpers/steamos-priv-write | 40 +++ .../steamos-set-hostname | 10 + .../steamos-set-timezone | 11 + .../desktop-overlay/usr/bin/steamos-update | 33 ++ .../desktop-overlay/usr/lib/os-session-select | 85 +++++ .../usr/lib/systemd/system/home-swapfile.swap | 19 ++ .../system/manjaro-post-install.service | 9 + .../swap.target.wants/home-swapfile.swap | 1 + .../system/swap.target.wants/swapfile.service | 1 + .../usr/lib/systemd/system/swapfile.service | 25 ++ .../bash-completion/completions/mkswapfile | 31 ++ .../usr/share/icons/default/index.theme | 2 + .../64x64/apps/steamdeck-gaming-return.svg | 10 + .../actions/org.manjaro.factory.reset.policy | 22 ++ .../polkit-1/actions/org.manjaro.host.policy | 32 ++ .../actions/org.manjaro.priv.write.policy | 22 ++ .../actions/org.manjaro.session.select.policy | 22 ++ .../xsessions/plasma-steamos-oneshot.desktop | 7 + oem/gaming-oem-kde6/live-overlay/etc/default | 1 + oem/gaming-oem-kde6/live-overlay/etc/fstab | 1 + oem/gaming-oem-kde6/live-overlay/etc/issue | 1 + .../live-overlay/etc/localtime | 1 + oem/gaming-oem-kde6/live-overlay/etc/pam.d | 1 + .../etc/sddm.conf.d/steam-deckify.conf | 5 + .../etc/sddm.conf.d/xx-steam-deckify.conf | 5 + .../skel/.config/autostart/calamares.desktop | 14 + .../.config/autostart/manjaro-hello.desktop | 1 + .../etc/skel/.config/kcmdisplayrc | 9 + .../skel/.config/kded_device_automounterrc | 2 + .../etc/skel/.config/kscreenlockerrc | 3 + .../live-overlay/etc/skel/.config/kwalletrc | 11 + .../live-overlay/etc/skel/.config/manjaro | 1 + .../etc/xdg/autostart/steam.desktop | 39 +++ .../live-overlay/usr/bin/calamares_polkit | 3 + .../usr/lib/calamares/modules/oemuser/main.py | 107 +++++++ oem/gaming-oem-kde6/profile.conf | 83 +++++ 51 files changed, 1311 insertions(+) create mode 100644 oem/gaming-oem-kde6/Packages-Desktop create mode 100644 oem/gaming-oem-kde6/Packages-Live create mode 100644 oem/gaming-oem-kde6/Packages-Root create mode 100644 oem/gaming-oem-kde6/desktop-overlay/etc/X11/xorg.conf.d/70-synaptics.conf create mode 100644 oem/gaming-oem-kde6/desktop-overlay/etc/default/grub create mode 100644 oem/gaming-oem-kde6/desktop-overlay/etc/pam.d/sddm create mode 100644 oem/gaming-oem-kde6/desktop-overlay/etc/sddm.conf.d/virtualkbd.conf create mode 100644 oem/gaming-oem-kde6/desktop-overlay/etc/sddm.conf.d/xx-steam-deckify.conf create mode 100644 oem/gaming-oem-kde6/desktop-overlay/etc/sysctl.d/50-max_user_watches.conf create mode 100755 oem/gaming-oem-kde6/desktop-overlay/etc/xdg/autostart/steam.desktop create mode 100644 oem/gaming-oem-kde6/desktop-overlay/etc/yakuakerc create mode 100755 oem/gaming-oem-kde6/desktop-overlay/usr/bin/gamescope-wayland-teardown-workaround create mode 100755 oem/gaming-oem-kde6/desktop-overlay/usr/bin/manjaro-post-install create mode 100755 oem/gaming-oem-kde6/desktop-overlay/usr/bin/mkswapfile create mode 100755 oem/gaming-oem-kde6/desktop-overlay/usr/bin/startplasma-steamos-oneshot create mode 100755 oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-polkit-helpers/steamos-priv-write create mode 100755 oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-polkit-helpers/steamos-set-hostname create mode 100755 oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-polkit-helpers/steamos-set-timezone create mode 100755 oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-update create mode 100755 oem/gaming-oem-kde6/desktop-overlay/usr/lib/os-session-select create mode 100644 oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/home-swapfile.swap create mode 100644 oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/manjaro-post-install.service create mode 120000 oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/swap.target.wants/home-swapfile.swap create mode 120000 oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/swap.target.wants/swapfile.service create mode 100644 oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/swapfile.service create mode 100644 oem/gaming-oem-kde6/desktop-overlay/usr/share/bash-completion/completions/mkswapfile create mode 100644 oem/gaming-oem-kde6/desktop-overlay/usr/share/icons/default/index.theme create mode 100644 oem/gaming-oem-kde6/desktop-overlay/usr/share/icons/hicolor/64x64/apps/steamdeck-gaming-return.svg create mode 100644 oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.factory.reset.policy create mode 100644 oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.host.policy create mode 100644 oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.priv.write.policy create mode 100644 oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.session.select.policy create mode 100755 oem/gaming-oem-kde6/desktop-overlay/usr/share/xsessions/plasma-steamos-oneshot.desktop create mode 120000 oem/gaming-oem-kde6/live-overlay/etc/default create mode 120000 oem/gaming-oem-kde6/live-overlay/etc/fstab create mode 120000 oem/gaming-oem-kde6/live-overlay/etc/issue create mode 120000 oem/gaming-oem-kde6/live-overlay/etc/localtime create mode 120000 oem/gaming-oem-kde6/live-overlay/etc/pam.d create mode 100644 oem/gaming-oem-kde6/live-overlay/etc/sddm.conf.d/steam-deckify.conf create mode 100644 oem/gaming-oem-kde6/live-overlay/etc/sddm.conf.d/xx-steam-deckify.conf create mode 100755 oem/gaming-oem-kde6/live-overlay/etc/skel/.config/autostart/calamares.desktop create mode 100644 oem/gaming-oem-kde6/live-overlay/etc/skel/.config/autostart/manjaro-hello.desktop create mode 100644 oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kcmdisplayrc create mode 100644 oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kded_device_automounterrc create mode 100755 oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kscreenlockerrc create mode 100644 oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kwalletrc create mode 120000 oem/gaming-oem-kde6/live-overlay/etc/skel/.config/manjaro create mode 100755 oem/gaming-oem-kde6/live-overlay/etc/xdg/autostart/steam.desktop create mode 100755 oem/gaming-oem-kde6/live-overlay/usr/bin/calamares_polkit create mode 100644 oem/gaming-oem-kde6/live-overlay/usr/lib/calamares/modules/oemuser/main.py create mode 100644 oem/gaming-oem-kde6/profile.conf diff --git a/oem/gaming-oem-kde6/Packages-Desktop b/oem/gaming-oem-kde6/Packages-Desktop new file mode 100644 index 00000000..234dab83 --- /dev/null +++ b/oem/gaming-oem-kde6/Packages-Desktop @@ -0,0 +1,299 @@ +## Hardware Specific +#handygccs-git #not needed when OGUI-QAM is used +game-devices-udev + +## Games +>extra protonutils +>extra protonup-qt +>extra steam +>extra steam-deckify +>extra gamescope-plus +>extra gamescope-session-git +>extra gamescope-session-steam-plus-git +>extra os-session-select-ogui +>extra gamemode +>multilib lib32-gamemode +>extra opengamepadui-git +>extra opengamepadui-session-git +>extra powerstation-bin + +## Network +avahi +networkmanager +networkmanager-openconnect +networkmanager-openvpn +networkmanager-pptp +networkmanager-vpnc +networkmanager-l2tp +nss-mdns # NSS support for mDNS (optdepend for avahi) +ntp +mobile-broadband-provider-info +modemmanager +openresolv +openssh +samba +usb_modeswitch + +## Libraries for Sound/Audio/Video +alsa-firmware +alsa-utils +ffmpeg +gst-libav +gst-plugins-bad +gst-plugins-base +gst-plugins-good +gst-plugins-ugly +libcanberra +>multilib lib32-libcanberra +libdvdcss +manjaro-alsa +manjaro-gstreamer +>extra manjaro-modem +manjaro-pipewire +phonon-qt5-gstreamer + +## Btrfs +grub-btrfs +>extra timeshift-autosnap-manjaro + +## Connect Packages +kamera +mtpfs +udiskie +udisks2 + +## Fonts +ttf-dejavu +# cantarell-fonts # Installed as gnome-themes-standard dependency +noto-fonts # default font +#noto-fonts-cjk # asian fonts - needed big package, ~76 mb compressed +adobe-source-sans-pro-fonts +adobe-source-han-sans-jp-fonts +adobe-source-han-sans-kr-fonts +adobe-source-han-sans-cn-fonts +>extra noto-fonts-emoji +terminus-font +>extra ttf-inconsolata +>extra ttf-indic-otf +>extra ttf-liberation +>extra ttf-droid + +## Package management +#>extra appimagelauncher +pamac-gtk3 +pamac-tray-icon-plasma +pamac-cli +#>extra apparmor +#>extra snapd +#>extra snapd-glib +#>extra pamac-snap-plugin +>extra pamac-flatpak-plugin +#discover-snap +#discover +packagekit-qt5 +>extra fwupd +#octopi +#octopi-cachecleaner +#octopi-repoeditor +#octopi-notifier-frameworks +#pamac-qt +#manjaro-application-utility + +## Printing +>extra manjaro-printer +>extra gtk3-print-backends + +## Optional dependencies for hplip +>extra python-pillow +>extra python-pip +>extra python-pyqt5 +>extra python-reportlab + +## Optional dependencies for print-manager +>extra system-config-printer # auto-detect the printer driver +>extra python-pysmbc # SMB browser support + +## Display manager +sddm +sddm-kcm + +## Plasma5 +ocean-sound-theme +audiocd-kio +bluedevil +kde-gtk-config +kdeplasma-addons +kgamma +kinfocenter +kmenuedit +kscreen +kscreenlocker +ksshaskpass +kwallet-pam +kwayland-integration +kwin +qt5-virtualkeyboard # Virtual keyboard support for kwin-wayland +kwrited +milou +plasma-desktop +plasma-nm +plasma-pa +plasma-simplemenu +plasma-workspace +>extra plasma-workspace-wallpapers +powerdevil +systemsettings +plasma-browser-integration +xdg-desktop-portal-kde +#plasma-welcome +plasma-thunderbolt + +## Themes QT/GTK/SDDM +gnome-themes-standard +oxygen # needed to provide KDE system sounds +oxygen-icons +sddm-breath-theme +grub-theme-manjaro +breeze-gtk +plymouth +plymouth-theme-manjaro + +## KDE Applications +ark +#>extra digikam +dolphin +dolphin-plugins +>extra filelight +kate +kcalc +>extra keditbookmarks +kfind +kdeconnect +okular +#>extra >x86_64 kget +#>extra >x86_64 libktorrent +#>extra >i686 kdenetwork-kget +kdenetwork-filesharing +#>extra kdenlive +khelpcenter +khotkeys +kinit # for "Open in Terminal" action +kio-extras +#>extra kleopatra +konsole +ksystemlog +kwalletmanager +gwenview +partitionmanager +>extra print-manager +>extra skanlite +spectacle + +## Optional dependencies for ark +p7zip # 7Z format support +unarchiver # RAR format support + +## Optional dependency for digikam +#>extra kipi-plugins # export to various online services +#>extra hugin # panorama tool + +## Optional dependencies for dolphin +kdegraphics-thumbnailers # PDF and PS thumbnails +ffmpegthumbs # video thumbnails + +## Optional dependencies for gwenview +kimageformats5 # support for dds, xcf, exr, psd, and more image formats +qt5-imageformats # support for tiff, webp, and more image formats + +## Optional dependencies for kaccounts-integration +kaccounts-providers + +## Optional dependencies for kdeconnect +sshfs # remote filesystem browser + +## Optional dependencies for kdenlive +#>extra cdrtools # for creation of DVD ISO images +#>extra dvdauthor # for creation of DVD +#>extra dvgrab # for firewire capture +#>extra recordmydesktop # for screen capture +#>extra vlc-nightly # for DVD preview, needs xine-ui or vlc, vlc is in "Applications" section +#>extra movit # for GPU video processing + +## Optional dependencies for okular +poppler-data # encoding data to display PDF documents containing CJK characters + +## Applications +>extra elisa +dmidecode # for inxi -m output +firefox +htop +inxi +#>extra krita +#ms-office-online +#>extra onlyoffice-desktopeditors +#>extra freeoffice +#>extra libreoffice-still +#manjaro-hello +manjaro-application-utility +manjaro-settings-manager-kcm +manjaro-settings-manager-knotifier +plasma-systemmonitor +powertop +#>extra qbittorrent +neofetch +systemd-kcm +plymouth-kcm +#>extra thunderbird +>extra vlc +yakuake + +## Documentation +#manjaro-documentation-en + +## Settings packages +#manjaro-kde-settings +manjaro-browser-settings + +## Xorg Input Drivers +xf86-input-elographics +xf86-input-evdev +xf86-input-libinput +xf86-input-void + +## Xorg Server and Graphics +>multilib lib32-libva-intel-driver +>multilib lib32-libva-mesa-driver +>multilib lib32-libva-vdpau-driver +libva-intel-driver +libva-mesa-driver +libva-vdpau-driver +mesa-utils +>multilib lib32-mesa-utils +numlockx +xdg-user-dirs +xorg-server +xorg-twm +xorg-xinit +xorg-xkill +xorg-mkfontscale + +## Vulkan +#amdvlk +#spirv-tools +vulkan-headers +vulkan-radeon +#vulkan-intel +vulkan-tools +#vkd3d +>multilib lib32-vulkan-radeon +#>multilib lib32-vulkan-intel + +## Desktop Utils +perl-file-mimeinfo +xdg-utils +>extra timeshift +#>extra kernel-alive +power-profiles-daemon + +## Misc +>basic squashfs-tools diff --git a/oem/gaming-oem-kde6/Packages-Live b/oem/gaming-oem-kde6/Packages-Live new file mode 100644 index 00000000..be195466 --- /dev/null +++ b/oem/gaming-oem-kde6/Packages-Live @@ -0,0 +1,10 @@ +grub-theme-live-manjaro +manjaro-live-skel +manjaro-live-systemd +mkinitcpio-nfs-utils +nbd + +## OEM +calamares +calamares-oem-modules +calamares-oem-kde-settings diff --git a/oem/gaming-oem-kde6/Packages-Root b/oem/gaming-oem-kde6/Packages-Root new file mode 100644 index 00000000..6af1fe8b --- /dev/null +++ b/oem/gaming-oem-kde6/Packages-Root @@ -0,0 +1,70 @@ +# Base +base + +# Manjaro +acpi +acpid +amd-ucode +b43-fwcutter +btrfs-progs +bzip2 +coreutils +cpupower +cronie +cryptsetup +device-mapper +dhclient +dhcpcd +diffutils +dmraid +dnsmasq +dosfstools +e2fsprogs +ecryptfs-utils +efibootmgr +exfatprogs +f2fs-tools +glibc-locales +grub +haveged +inetutils +intel-ucode +jfsutils +KERNEL +less +logrotate +lvm2 +man-db +#manjaro-firmware +manjaro-release +manjaro-system +manjaro-zsh-config +man-pages +mdadm +memtest86+ +memtest86+-efi +mhwd +mhwd-db +mkinitcpio-openswap +nano +nano-syntax-highlighting +nfs-utils +ntfs-3g +os-prober +perl +reiserfsprogs +rsync +s-nail +sof-firmware +spectre-meltdown-checker +sudo +sysfsutils +systemd +texinfo +usbutils +vi +wget +which +wireless-regdb +wpa_supplicant +xfsprogs diff --git a/oem/gaming-oem-kde6/desktop-overlay/etc/X11/xorg.conf.d/70-synaptics.conf b/oem/gaming-oem-kde6/desktop-overlay/etc/X11/xorg.conf.d/70-synaptics.conf new file mode 100644 index 00000000..f67a3b95 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/etc/X11/xorg.conf.d/70-synaptics.conf @@ -0,0 +1,8 @@ +Section "InputClass" + Identifier "touchpad" + Driver "synaptics" + MatchIsTouchpad "on" + Option "TapButton1" "1" + Option "TapButton2" "3" + Option "TapButton3" "2" +EndSection diff --git a/oem/gaming-oem-kde6/desktop-overlay/etc/default/grub b/oem/gaming-oem-kde6/desktop-overlay/etc/default/grub new file mode 100644 index 00000000..19fe8c43 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/etc/default/grub @@ -0,0 +1,67 @@ +# GRUB boot loader configuration + +GRUB_DEFAULT=saved +GRUB_TIMEOUT=5 +GRUB_DISTRIBUTOR="Manjaro" +GRUB_CMDLINE_LINUX_DEFAULT="quiet udev.log_priority=3 usb.autosuspend=-1" +GRUB_CMDLINE_LINUX="" + +# Preload both GPT and MBR modules so that they are not missed +GRUB_PRELOAD_MODULES="part_gpt part_msdos" + +# Uncomment to enable booting from LUKS encrypted devices +#GRUB_ENABLE_CRYPTODISK=y + +# Set to 'countdown' or 'menu' to change timeout behavior, +# press ESC key to display menu. +GRUB_TIMEOUT_STYLE=hidden + +# Uncomment to use basic console +GRUB_TERMINAL_INPUT=console + +# Uncomment to disable graphical terminal +#GRUB_TERMINAL_OUTPUT=console + +# The resolution used on graphical terminal +# note that you can use only modes which your graphic card supports via VBE +# you can see them in real GRUB with the command 'videoinfo' +GRUB_GFXMODE=auto + +# Uncomment to allow the kernel use the same resolution used by grub +GRUB_GFXPAYLOAD_LINUX=keep + +# Uncomment if you want GRUB to pass to the Linux kernel the old parameter +# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx" +#GRUB_DISABLE_LINUX_UUID=true + +# Uncomment to disable generation of recovery mode menu entries +GRUB_DISABLE_RECOVERY=true + +# Uncomment and set to the desired menu colors. Used by normal and wallpaper +# modes only. Entries specified as foreground/background. +GRUB_COLOR_NORMAL="light-gray/black" +GRUB_COLOR_HIGHLIGHT="green/black" + +# Uncomment one of them for the gfx desired, a image background or a gfxtheme +#GRUB_BACKGROUND="/usr/share/grub/background.png" +GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt" + +# Uncomment to get a beep at GRUB start +#GRUB_INIT_TUNE="480 440 1" + +# Uncomment to make GRUB remember the last selection. This requires +# setting 'GRUB_DEFAULT=saved' above. +GRUB_SAVEDEFAULT=true + +# Uncomment to disable submenus in boot menu +#GRUB_DISABLE_SUBMENU=y + +# Uncomment this option to enable os-prober execution in the grub-mkconfig command +#GRUB_DISABLE_OS_PROBER=false + +# Uncomment to ensure that the root filesystem is mounted read-only so that +# systemd-fsck can run the check automatically. We use 'fsck' by default, which +# needs 'rw' as boot parameter, to avoid delay in boot-time. 'fsck' needs to be +# removed from 'mkinitcpio.conf' to make 'systemd-fsck' work. +# See also Arch-Wiki: https://wiki.archlinux.org/index.php/Fsck#Boot_time_checking +#GRUB_ROOT_FS_RO=true diff --git a/oem/gaming-oem-kde6/desktop-overlay/etc/pam.d/sddm b/oem/gaming-oem-kde6/desktop-overlay/etc/pam.d/sddm new file mode 100644 index 00000000..1ed30b32 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/etc/pam.d/sddm @@ -0,0 +1,8 @@ +#%PAM-1.0 + +auth include system-login +auth optional pam_kwallet5.so +account include system-login +password include system-login +session include system-login +session optional pam_kwallet5.so auto_start diff --git a/oem/gaming-oem-kde6/desktop-overlay/etc/sddm.conf.d/virtualkbd.conf b/oem/gaming-oem-kde6/desktop-overlay/etc/sddm.conf.d/virtualkbd.conf new file mode 100644 index 00000000..74338801 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/etc/sddm.conf.d/virtualkbd.conf @@ -0,0 +1,2 @@ +[General] +InputMethod=qtvirtualkeyboard diff --git a/oem/gaming-oem-kde6/desktop-overlay/etc/sddm.conf.d/xx-steam-deckify.conf b/oem/gaming-oem-kde6/desktop-overlay/etc/sddm.conf.d/xx-steam-deckify.conf new file mode 100644 index 00000000..c6c22ad9 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/etc/sddm.conf.d/xx-steam-deckify.conf @@ -0,0 +1,11 @@ +# Created by Manjaro Tools +[General] +DisplayServer=wayland +[Autologin] +Relogin=true +Session=gamepadui-with-qam-session.desktop +User=gamer +[X11] +# Janky workaround for wayland sessions not stopping in sddm, kills +# all active sddm-helper sessions on teardown +DisplayStopCommand=/usr/bin/gamescope-wayland-teardown-workaround diff --git a/oem/gaming-oem-kde6/desktop-overlay/etc/sysctl.d/50-max_user_watches.conf b/oem/gaming-oem-kde6/desktop-overlay/etc/sysctl.d/50-max_user_watches.conf new file mode 100644 index 00000000..afb47d17 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/etc/sysctl.d/50-max_user_watches.conf @@ -0,0 +1 @@ +fs.inotify.max_user_watches = 16384 diff --git a/oem/gaming-oem-kde6/desktop-overlay/etc/xdg/autostart/steam.desktop b/oem/gaming-oem-kde6/desktop-overlay/etc/xdg/autostart/steam.desktop new file mode 100755 index 00000000..5ae1c468 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/etc/xdg/autostart/steam.desktop @@ -0,0 +1,39 @@ +[Desktop Entry] +Name=Steam +Comment=Application for managing and playing games on Steam +Comment[pt_BR]=Aplicativo para jogar e gerenciar jogos no Steam +Comment[bg]=Приложение за ръководене и пускане на игри в Steam +Comment[cs]=Aplikace pro spravování a hraní her ve službě Steam +Comment[da]=Applikation til at håndtere og spille spil på Steam +Comment[nl]=Applicatie voor het beheer en het spelen van games op Steam +Comment[fi]=Steamin pelien hallintaan ja pelaamiseen tarkoitettu sovellus +Comment[fr]=Application de gestion et d'utilisation des jeux sur Steam +Comment[de]=Anwendung zum Verwalten und Spielen von Spielen auf Steam +Comment[el]=Εφαρμογή διαχείρισης παιχνιδιών στο Steam +Comment[hu]=Alkalmazás a Steames játékok futtatásához és kezeléséhez +Comment[it]=Applicazione per la gestione e l'esecuzione di giochi su Steam +Comment[ja]=Steam 上でゲームを管理&プレイするためのアプリケーション +Comment[ko]=Steam에 있는 게임을 관리하고 플레이할 수 있는 응용 프로그램 +Comment[no]=Program for å administrere og spille spill på Steam +Comment[pt_PT]=Aplicação para organizar e executar jogos no Steam +Comment[pl]=Aplikacja do zarządzania i uruchamiania gier na platformie Steam +Comment[ro]=Aplicație pentru administrarea și jucatul jocurilor pe Steam +Comment[ru]=Приложение для игр и управления играми в Steam +Comment[es]=Aplicación para administrar y ejecutar juegos en Steam +Comment[sv]=Ett program för att hantera samt spela spel på Steam +Comment[zh_CN]=管理和进行 Steam 游戏的应用程序 +Comment[zh_TW]=管理並執行 Steam 遊戲的應用程式 +Comment[th]=โปรแกรมสำหรับจัดการและเล่นเกมบน Steam +Comment[tr]=Steam üzerinden oyun oynama ve düzenleme uygulaması +Comment[uk]=Програма для керування іграми та запуску ігор у Steam +Comment[vi]=Ứng dụng để quản lý và chơi trò chơi trên Steam +Exec=/usr/bin/steam -silent %U +Icon=steam +Terminal=false +Type=Application +Categories=Network;FileTransfer;Game; +Actions=Store;Community;Library;Servers;Screenshots;News;Settings;BigPicture;Friends; +PrefersNonDefaultGPU=true +X-KDE-RunOnDiscreteGpu=true +OnlyShowIn=KDE + diff --git a/oem/gaming-oem-kde6/desktop-overlay/etc/yakuakerc b/oem/gaming-oem-kde6/desktop-overlay/etc/yakuakerc new file mode 100644 index 00000000..05724026 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/etc/yakuakerc @@ -0,0 +1,2 @@ +[Dialogs] +FirstRun=false diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/bin/gamescope-wayland-teardown-workaround b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/gamescope-wayland-teardown-workaround new file mode 100755 index 00000000..e2432ece --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/gamescope-wayland-teardown-workaround @@ -0,0 +1,12 @@ +#!/bin/bash + +set -eu + +TARGETS=('/bin/bash /usr/bin/gamescope-session' + '/usr/bin/kwin_x11') + +for target in "${TARGETS[@]}"; do + for processtree in $(pgrep -xf "$target" || true); do + kill -- "-$processtree" + done +done diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/bin/manjaro-post-install b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/manjaro-post-install new file mode 100755 index 00000000..54c8a5e4 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/manjaro-post-install @@ -0,0 +1,34 @@ +#!/bin/sh + +# Set chassis +hostnamectl set-chassis handset + +# Update appstream DB +[[ -e /usr/bin/appstreamcli ]] && /usr/bin/appstreamcli refresh-cache --force + +# Set locales +localectl set-locale "en_US.UTF-8" + +# Disable this service, so it only gets run on first boot +systemctl disable manjaro-post-install.service + +# Enable HandyGCCS +if [[ -e /usr/lib/systemd/system/handycon.service ]]; then + udevadm control -R + systemctl enable --now handycon +fi + +# Start sddm +[[ -e /usr/bin/sddm ]] && systemctl enable --now sddm + +# Add ACPI Override (this might need a reboot to work) +[[ -e /usr/bin/update_rogaao ]] && /usr/bin/update_rogaao + +# Pacman Init +if [[ -e /usr/bin/pacman-key ]]; then + pacman-key --init + pacman-key --populate archlinux manjaro +fi + +# Disable the root login +#passwd --lock root diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/bin/mkswapfile b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/mkswapfile new file mode 100755 index 00000000..420e7a40 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/mkswapfile @@ -0,0 +1,32 @@ +#!/bin/bash +# -*- mode: sh; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# vim: et sts=4 sw=4 + +# SPDX-License-Identifier: LGPL-2.1+ +# +# Copyright © 2019-2021 Collabora Ltd. +# Copyright © 2019-2021 Valve Corporation. +# +# This file is part of steamos-customizations. +# +# steamos-customizations is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the License, +# or (at your option) any later version. + +set -euo pipefail + +SWAPFILE=${1:-} +SWAPSIZE=${2:-} + +fail() { echo >&2 "$@"; exit 1; } +usage() { echo >&2 "Usage: $(basename $0) FILE SIZE"; exit 1; } + +[ "$SWAPFILE" ] || usage +[ "$SWAPSIZE" ] || usage + +[ -e "$SWAPFILE" ] && fail "File '$SWAPFILE' already exists" + +dd if=/dev/zero of="$SWAPFILE" bs=1M count="$SWAPSIZE" +chmod 600 "$SWAPFILE" +mkswap "$SWAPFILE" diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/bin/startplasma-steamos-oneshot b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/startplasma-steamos-oneshot new file mode 100755 index 00000000..c906aabc --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/startplasma-steamos-oneshot @@ -0,0 +1,46 @@ +#!/bin/bash + +set -e + +die() { echo >&2 "!! $*"; exit 1; } + +SENTINEL_FILE="steamos-session-select" +SENTINEL_VALUE="plasma-steamos-oneshot.desktop" + +# If we proceed, execute this +CHAINED_SESSION="/usr/bin/startplasma-x11" +# If we decide the sentinel is consumed, execute this command instead and fail +RESTORE_SESSION=(steamos-session-select) # No arguments restores the session + +# Find or check config sentinel +check_sentinel() +{ + if [[ -z ${HOME+x} ]]; then + echo >&2 "$0: No \$HOME variable!" + # Rather than break we'll just launch plasma and hope for the best? + return 0 + fi + + local config_dir="${XDG_CONF_DIR:-"$HOME/.config"}" + ( + cd "$HOME" + cd "$config_dir" + sentinel_value="$(cat "$SENTINEL_FILE")" + [[ $sentinel_value = "$SENTINEL_VALUE" ]] || return 1 + rm "$SENTINEL_FILE" + ) || return 1 # If we couldn't read the value or it wasn't what we wanted + + # Found value and removed it, we're good to continue + return 0 +} + +if check_sentinel; then + # We found and consumed the oneshot sentinel, proceed to launch plasma + echo >&2 "$0: Found and removed sentinel file for one-shot plasma, proceeding to launch" + exec "$CHAINED_SESSION" +else + echo >&2 "$0: Sentinel value not found, executing session-select to restore session" + "${RESTORE_SESSION[@]}" || echo >&2 "$0: !! Failed to restore previous session, executing chained session" + # Session restore should've stopped us, if it is broken at least let plasma continue to open + exec "$CHAINED_SESSION" +fi diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-polkit-helpers/steamos-priv-write b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-polkit-helpers/steamos-priv-write new file mode 100755 index 00000000..a7d30f82 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-polkit-helpers/steamos-priv-write @@ -0,0 +1,40 @@ +#!/bin/bash + +set -eu + +if [[ $EUID -ne 0 ]]; +then + exec pkexec --disable-internal-agent "$0" "$@" +fi + +WRITE_PATH="$1" +WRITE_VALUE="$2" + +function CommitWrite() +{ + echo "commit: $WRITE_VALUE -> $WRITE_PATH" | systemd-cat -t p-steamos-priv-write -p warning + chmod a+w "$WRITE_PATH" + echo "$WRITE_VALUE" > "$WRITE_PATH" + exit 0 +} + +function DeclineWrite() +{ + echo "decline: $WRITE_VALUE -> $WRITE_PATH" | systemd-cat -t p-steamos-priv-write -p err + exit 1 +} + +echo "checking: $WRITE_PATH" | systemd-cat -t p-steamos-priv-write -p warning +if [[ "$WRITE_PATH" == /sys/class/backlight/*/brightness ]]; then + CommitWrite +fi + +if [[ "$WRITE_PATH" == /sys/devices/*/*/*/*/hwmon/hwmon*/led_brightness ]]; then + CommitWrite +fi + +if [[ "$WRITE_PATH" == /sys/devices/*/*/*/*/hwmon/hwmon*/content_adaptive_brightness ]]; then + CommitWrite +fi + +DeclineWrite diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-polkit-helpers/steamos-set-hostname b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-polkit-helpers/steamos-set-hostname new file mode 100755 index 00000000..f63e1644 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-polkit-helpers/steamos-set-hostname @@ -0,0 +1,10 @@ +#!/bin/bash + +set -eu + +if [[ $EUID -ne 0 ]]; +then + exec pkexec --disable-internal-agent "$0" "$@" +fi + +hostnamectl set-hostname "$1" diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-polkit-helpers/steamos-set-timezone b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-polkit-helpers/steamos-set-timezone new file mode 100755 index 00000000..2811d826 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-polkit-helpers/steamos-set-timezone @@ -0,0 +1,11 @@ +#!/bin/bash + +set -eu + +if [[ $EUID -ne 0 ]]; +then + exec pkexec --disable-internal-agent "$0" "$@" +fi + +timedatectl set-timezone "$1" + diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-update b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-update new file mode 100755 index 00000000..22de3008 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/bin/steamos-update @@ -0,0 +1,33 @@ +#! /bin/bash + +# The Steam client is known to call this script with the following parameter combinations: +# steamos-update --supports-duplicate-detection -- should do nothing +# steamos-update --enable-duplicate-detection check -- should check for update +# steamos-update check -- should check for update +# steamos-update --enable-duplicate-detection -- should perform an update +# steamos-update -- should perform an update + + +while [[ $# -gt 0 ]]; do + case $1 in + check) + CHECK=1 + shift + ;; + --supports-duplicate-detection) + EXIT=1 + shift + ;; + *) + shift + ;; + esac +done + +if [ -n "$CHECK" ]; then + exit 7 +elif [ -n "$EXIT" ]; then + exit 0 +else + exit 7 # tells Steam client there is no update to perform +fi diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/lib/os-session-select b/oem/gaming-oem-kde6/desktop-overlay/usr/lib/os-session-select new file mode 100755 index 00000000..4f248057 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/lib/os-session-select @@ -0,0 +1,85 @@ +#!/bin/bash + +set -e + +die() { echo >&2 "!! $*"; exit 1; } + +# FIXME Purge old files and use this one + +# File this script will modify, in addition to (potentially) the per-user sentinel file +CONF_FILE="/etc/sddm.conf.d/zz-steamos-autologin.conf" + +SENTINEL_FILE="steamos-session-select" + +# For sanity this shipped file must be present, to ensure we're still on a normal-looking setup. +CHECK_FILE="/etc/sddm.conf.d/manjaro.conf" + +session="${1:-gamescope}" + +session_launcher="" +create_sentinel="" +session_uses_x11="" + +case "$session" in + plasma-wayland-persistent) + session_launcher="plasmawayland.desktop" + ;; + plasma-persistent) + session_launcher="plasma.desktop" + session_uses_x11=1 + ;; + plasma) + session_launcher="plasma-steamos-oneshot.desktop" + create_sentinel=1 + session_uses_x11=1 + ;; + gamescope) +# session_launcher="gamescope-session.desktop" + session_launcher="gamepadui-with-qam-session.desktop" + ;; + *) + echo >&2 "!! Unrecognized session '$session'" + exit 1 + ;; +esac + +if [[ "$2" == "--sentinel-created" ]]; then + SENTINEL_CREATED=1 +fi + +# Update config sentinel +if [[ -z $SENTINEL_CREATED ]]; then + [[ -n ${HOME+x} ]] || die "No \$HOME variable" + config_dir="${XDG_CONF_DIR:-"$HOME/.config"}" + ( + cd "$HOME" + mkdir -p "$config_dir" + cd "$config_dir" + echo "$session_launcher" > "$SENTINEL_FILE" + ) + + # If we were executed as a session user and then re-execute as root below, we don't want to set root's sentinel too + export SENTINEL_CREATED=1 + echo "Updated user selected session to $session_launcher" +fi + +# Become root +if [[ $EUID != 0 ]]; then + exec pkexec "$(realpath $0)" "$session" --sentinel-created + exit 1 +fi + +{ + if [[ -n $session_uses_x11 ]]; then + # Default is Wayland + echo "[General]" + echo "DisplayServer=X11" + fi + echo "[Autologin]" + echo "Session=$session_launcher" +} > "$CONF_FILE" + +echo "Updated system autologin session to $session_launcher" +systemctl reset-failed sddm +systemctl restart sddm +echo "Restarted SDDM" diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/home-swapfile.swap b/oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/home-swapfile.swap new file mode 100644 index 00000000..faaa9d65 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/home-swapfile.swap @@ -0,0 +1,19 @@ +# SPDX-License-Identifier: LGPL-2.1+ +# +# This file is part of steamos-customizations. +# +# steamos-customizations is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the License, +# or (at your option) any later version. + +[Unit] +Description=Swap +Requires=swapfile.service +After=swapfile.service + +[Swap] +What=/home/swapfile + +[Install] +WantedBy=swap.target diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/manjaro-post-install.service b/oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/manjaro-post-install.service new file mode 100644 index 00000000..d76a5ea9 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/manjaro-post-install.service @@ -0,0 +1,9 @@ +[Unit] +Description=Manjaro Post Install. + +[Service] +Type=simple +ExecStart=/usr/bin/manjaro-post-install + +[Install] +WantedBy=default.target diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/swap.target.wants/home-swapfile.swap b/oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/swap.target.wants/home-swapfile.swap new file mode 120000 index 00000000..ba009dc6 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/swap.target.wants/home-swapfile.swap @@ -0,0 +1 @@ +../home-swapfile.swap \ No newline at end of file diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/swap.target.wants/swapfile.service b/oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/swap.target.wants/swapfile.service new file mode 120000 index 00000000..0003d393 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/swap.target.wants/swapfile.service @@ -0,0 +1 @@ +../swapfile.service \ No newline at end of file diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/swapfile.service b/oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/swapfile.service new file mode 100644 index 00000000..c396c361 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/lib/systemd/system/swapfile.service @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: LGPL-2.1+ +# +# This file is part of steamos-customizations. +# +# steamos-customizations is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the License, +# or (at your option) any later version. + +[Unit] +Description=Create Swap File +DefaultDependencies=no +Before=shutdown.target home-swapfile.swap +Conflicts=shutdown.target +ConditionFileIsExecutable=/usr/bin/mkswapfile +ConditionPathExists=!/home/swapfile +RequiresMountsFor=/home/swapfile + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/mkswapfile /home/swapfile 1024 + +[Install] +WantedBy=swap.target diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/share/bash-completion/completions/mkswapfile b/oem/gaming-oem-kde6/desktop-overlay/usr/share/bash-completion/completions/mkswapfile new file mode 100644 index 00000000..de85d70e --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/share/bash-completion/completions/mkswapfile @@ -0,0 +1,31 @@ +# -*- mode: sh; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# vim: et sts=4 sw=4 + +# SPDX-License-Identifier: LGPL-2.1+ +# +# Copyright © 2020 Collabora Ltd. +# Copyright © 2020 Valve Corporation. +# +# This file is part of steamos-customizations. +# +# steamos-customizations is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the License, +# or (at your option) any later version. + +_mkswapfile() +{ + local cur prev words cword + _init_completion || return + + local args + _count_args + if [[ "$args" -eq 1 ]]; then + _filedir + return + elif [[ "$args" -eq 2 ]]; then + _filedir # swapsize + return + fi +} && +complete -F _mkswapfile mkswapfile diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/share/icons/default/index.theme b/oem/gaming-oem-kde6/desktop-overlay/usr/share/icons/default/index.theme new file mode 100644 index 00000000..05623f39 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/share/icons/default/index.theme @@ -0,0 +1,2 @@ +[icon theme] +Inherits=xcursor-breeze diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/share/icons/hicolor/64x64/apps/steamdeck-gaming-return.svg b/oem/gaming-oem-kde6/desktop-overlay/usr/share/icons/hicolor/64x64/apps/steamdeck-gaming-return.svg new file mode 100644 index 00000000..8245395f --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/share/icons/hicolor/64x64/apps/steamdeck-gaming-return.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.factory.reset.policy b/oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.factory.reset.policy new file mode 100644 index 00000000..78fc8a2a --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.factory.reset.policy @@ -0,0 +1,22 @@ + + + + + Manjaro + https://manjaro.org + + + Run the steamos factory reset helper + package-x-generic + + yes + yes + yes + + /usr/bin/steamos-factory-reset-config + + + + diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.host.policy b/oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.host.policy new file mode 100644 index 00000000..003e1159 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.host.policy @@ -0,0 +1,32 @@ + + + + + Manjaro + https://manjaro.org + + + Set the hostname + package-x-generic + + yes + yes + yes + + /usr/bin/steamos-polkit-helpers/steamos-set-hostname + + + + Set the timezone + package-x-generic + + yes + yes + yes + + /usr/bin/steamos-polkit-helpers/steamos-set-timezone + + + diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.priv.write.policy b/oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.priv.write.policy new file mode 100644 index 00000000..07d61ae6 --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.priv.write.policy @@ -0,0 +1,22 @@ + + + + + Manjaro + https://manjaro.org + + + Helper to write to a set of device nodes + package-x-generic + + yes + yes + yes + + /usr/bin/steamos-polkit-helpers/steamos-priv-write + + + + diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.session.select.policy b/oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.session.select.policy new file mode 100644 index 00000000..94d9f61e --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/share/polkit-1/actions/org.manjaro.session.select.policy @@ -0,0 +1,22 @@ + + + + + Manjaro Linux + https://manjaro.org + + + Helper to switch sessions + package-x-generic + + yes + yes + yes + + /usr/lib/os-session-select + + + + diff --git a/oem/gaming-oem-kde6/desktop-overlay/usr/share/xsessions/plasma-steamos-oneshot.desktop b/oem/gaming-oem-kde6/desktop-overlay/usr/share/xsessions/plasma-steamos-oneshot.desktop new file mode 100755 index 00000000..79730e7d --- /dev/null +++ b/oem/gaming-oem-kde6/desktop-overlay/usr/share/xsessions/plasma-steamos-oneshot.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=XSession +Exec=/usr/bin/startplasma-steamos-oneshot +TryExec=/usr/bin/startplasma-steamos-oneshot +DesktopNames=KDE (One-Time Launch) +Name=Plasma (One-Time Launch) +Comment=Plasma by KDE - One Time Launch Redirect for SteamOS Sessions diff --git a/oem/gaming-oem-kde6/live-overlay/etc/default b/oem/gaming-oem-kde6/live-overlay/etc/default new file mode 120000 index 00000000..812b9ffe --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/etc/default @@ -0,0 +1 @@ +../../../../shared/manjaro/live-overlay/etc/default \ No newline at end of file diff --git a/oem/gaming-oem-kde6/live-overlay/etc/fstab b/oem/gaming-oem-kde6/live-overlay/etc/fstab new file mode 120000 index 00000000..8750acae --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/etc/fstab @@ -0,0 +1 @@ +../../../../shared/manjaro/live-overlay/etc/fstab \ No newline at end of file diff --git a/oem/gaming-oem-kde6/live-overlay/etc/issue b/oem/gaming-oem-kde6/live-overlay/etc/issue new file mode 120000 index 00000000..c5198056 --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/etc/issue @@ -0,0 +1 @@ +../../../../shared/manjaro/live-overlay/etc/issue \ No newline at end of file diff --git a/oem/gaming-oem-kde6/live-overlay/etc/localtime b/oem/gaming-oem-kde6/live-overlay/etc/localtime new file mode 120000 index 00000000..5df1bb1b --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/etc/localtime @@ -0,0 +1 @@ +../../../../shared/manjaro/live-overlay/etc/localtime \ No newline at end of file diff --git a/oem/gaming-oem-kde6/live-overlay/etc/pam.d b/oem/gaming-oem-kde6/live-overlay/etc/pam.d new file mode 120000 index 00000000..68de5965 --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/etc/pam.d @@ -0,0 +1 @@ +../../../../shared/manjaro/live-overlay/etc/pam.d \ No newline at end of file diff --git a/oem/gaming-oem-kde6/live-overlay/etc/sddm.conf.d/steam-deckify.conf b/oem/gaming-oem-kde6/live-overlay/etc/sddm.conf.d/steam-deckify.conf new file mode 100644 index 00000000..6a6e02ac --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/etc/sddm.conf.d/steam-deckify.conf @@ -0,0 +1,5 @@ +# Created by Manjaro Tools +[Autologin] +Relogin=true +Session=plasma.desktop +User=manjaro diff --git a/oem/gaming-oem-kde6/live-overlay/etc/sddm.conf.d/xx-steam-deckify.conf b/oem/gaming-oem-kde6/live-overlay/etc/sddm.conf.d/xx-steam-deckify.conf new file mode 100644 index 00000000..6a6e02ac --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/etc/sddm.conf.d/xx-steam-deckify.conf @@ -0,0 +1,5 @@ +# Created by Manjaro Tools +[Autologin] +Relogin=true +Session=plasma.desktop +User=manjaro diff --git a/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/autostart/calamares.desktop b/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/autostart/calamares.desktop new file mode 100755 index 00000000..40b44648 --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/autostart/calamares.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=Install Manjaro Linux +GenericName=Live Installer +Comment=Install the operating system to disk +Comment[de]=Manjaro Linux installieren +X-GNOME-Autostart-enabled=true +Exec=kstart5 --fullscreen calamares_polkit +Icon=calamares +Terminal=false +StartupNotify=true +Type=Application +Categories=Qt;System; diff --git a/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/autostart/manjaro-hello.desktop b/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/autostart/manjaro-hello.desktop new file mode 100644 index 00000000..8d1c8b69 --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/autostart/manjaro-hello.desktop @@ -0,0 +1 @@ + diff --git a/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kcmdisplayrc b/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kcmdisplayrc new file mode 100644 index 00000000..32d417f4 --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kcmdisplayrc @@ -0,0 +1,9 @@ +[X11] +exportKDEColors=true +exportKDEFonts=false + +[DisplayEnergy] +displayEnergySaving=false +displayStandby=7 +displaySuspend=13 +displayPowerOff=19 diff --git a/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kded_device_automounterrc b/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kded_device_automounterrc new file mode 100644 index 00000000..2de8376c --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kded_device_automounterrc @@ -0,0 +1,2 @@ +[General] +AutomountOnPlugin=false diff --git a/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kscreenlockerrc b/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kscreenlockerrc new file mode 100755 index 00000000..d9c11d91 --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kscreenlockerrc @@ -0,0 +1,3 @@ +[Daemon] +Autolock=false +Timeout=0 \ No newline at end of file diff --git a/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kwalletrc b/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kwalletrc new file mode 100644 index 00000000..ba04734b --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/kwalletrc @@ -0,0 +1,11 @@ +[Wallet] +Close When Idle=false +Close on Screensaver=false +Enabled=false +Idle Timeout=10 +Launch Manager=false +Leave Manager Open=false +Leave Open=true +Prompt on Open=false +Use One Wallet=true + diff --git a/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/manjaro b/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/manjaro new file mode 120000 index 00000000..3a25db6a --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/etc/skel/.config/manjaro @@ -0,0 +1 @@ +../../../../../../shared/manjaro/live-overlay/etc/skel/.config/manjaro \ No newline at end of file diff --git a/oem/gaming-oem-kde6/live-overlay/etc/xdg/autostart/steam.desktop b/oem/gaming-oem-kde6/live-overlay/etc/xdg/autostart/steam.desktop new file mode 100755 index 00000000..c0098420 --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/etc/xdg/autostart/steam.desktop @@ -0,0 +1,39 @@ +[Desktop Entry] +Name=Steam +Comment=Application for managing and playing games on Steam +Comment[pt_BR]=Aplicativo para jogar e gerenciar jogos no Steam +Comment[bg]=Приложение за ръководене и пускане на игри в Steam +Comment[cs]=Aplikace pro spravování a hraní her ve službě Steam +Comment[da]=Applikation til at håndtere og spille spil på Steam +Comment[nl]=Applicatie voor het beheer en het spelen van games op Steam +Comment[fi]=Steamin pelien hallintaan ja pelaamiseen tarkoitettu sovellus +Comment[fr]=Application de gestion et d'utilisation des jeux sur Steam +Comment[de]=Anwendung zum Verwalten und Spielen von Spielen auf Steam +Comment[el]=Εφαρμογή διαχείρισης παιχνιδιών στο Steam +Comment[hu]=Alkalmazás a Steames játékok futtatásához és kezeléséhez +Comment[it]=Applicazione per la gestione e l'esecuzione di giochi su Steam +Comment[ja]=Steam 上でゲームを管理&プレイするためのアプリケーション +Comment[ko]=Steam에 있는 게임을 관리하고 플레이할 수 있는 응용 프로그램 +Comment[no]=Program for å administrere og spille spill på Steam +Comment[pt_PT]=Aplicação para organizar e executar jogos no Steam +Comment[pl]=Aplikacja do zarządzania i uruchamiania gier na platformie Steam +Comment[ro]=Aplicație pentru administrarea și jucatul jocurilor pe Steam +Comment[ru]=Приложение для игр и управления играми в Steam +Comment[es]=Aplicación para administrar y ejecutar juegos en Steam +Comment[sv]=Ett program för att hantera samt spela spel på Steam +Comment[zh_CN]=管理和进行 Steam 游戏的应用程序 +Comment[zh_TW]=管理並執行 Steam 遊戲的應用程式 +Comment[th]=โปรแกรมสำหรับจัดการและเล่นเกมบน Steam +Comment[tr]=Steam üzerinden oyun oynama ve düzenleme uygulaması +Comment[uk]=Програма для керування іграми та запуску ігор у Steam +Comment[vi]=Ứng dụng để quản lý và chơi trò chơi trên Steam +Exec=/usr/bin/steam -silent %U +Icon=steam +Terminal=false +Type=Application +Categories=Network;FileTransfer;Game; +Actions=Store;Community;Library;Servers;Screenshots;News;Settings;BigPicture;Friends; +PrefersNonDefaultGPU=true +X-KDE-RunOnDiscreteGpu=true +OnlyShowIn=KDE +Hidden=true diff --git a/oem/gaming-oem-kde6/live-overlay/usr/bin/calamares_polkit b/oem/gaming-oem-kde6/live-overlay/usr/bin/calamares_polkit new file mode 100755 index 00000000..182b203c --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/usr/bin/calamares_polkit @@ -0,0 +1,3 @@ +#!/bin/bash + +sudo -E /usr/bin/calamares "-D6" "$@" diff --git a/oem/gaming-oem-kde6/live-overlay/usr/lib/calamares/modules/oemuser/main.py b/oem/gaming-oem-kde6/live-overlay/usr/lib/calamares/modules/oemuser/main.py new file mode 100644 index 00000000..929e09b2 --- /dev/null +++ b/oem/gaming-oem-kde6/live-overlay/usr/lib/calamares/modules/oemuser/main.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# === This file is part of Calamares - === +# +# Copyright 2017-2021, Philip Müller +# +# Calamares is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Calamares is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Calamares. If not, see . + +import libcalamares + +import os +import logging +import crypt +from os.path import join, exists +from distutils.dir_util import copy_tree +from libcalamares.utils import target_env_call + + +class ConfigOem: + def __init__(self): + self.__root = libcalamares.globalstorage.value("rootMountPoint") + self.__groups = 'video,audio,power,disk,storage,optical,network,lp,scanner,wheel,autologin' + libcalamares.globalstorage.insert("autoLoginUser", "gamer") + libcalamares.globalstorage.insert("username", "gamer") + + @property + def root(self): + return self.__root + + @property + def groups(self): + return self.__groups + + @staticmethod + def change_user_password(user, new_password): + """ Changes the user's password """ + try: + shadow_password = crypt.crypt(new_password, crypt.mksalt(crypt.METHOD_SHA512)) + except: + logging.warning(_("Error creating password hash for user {0}".format(user))) + return False + + try: + target_env_call(['usermod', '-p', shadow_password, user]) + except: + logging.warning(_("Error changing password for user {0}".format(user))) + return False + + return True + + def remove_symlink(self, target): + for root, dirs, files in os.walk("/" + target): + for filename in files: + path = os.path.join(root, filename) + if os.path.islink(path): + os.unlink(path) + + def copy_folder(self, source, target): + if exists("/" + source): + copy_tree("/" + source, join(self.root, target), preserve_symlinks=1) + + def run(self): + target_env_call(['groupadd', 'autologin']) + target_env_call(['useradd', '-m', '-s', '/bin/bash', '-U', '-G', self.groups, 'gamer']) + self.change_user_password('gamer', 'gamer') + path = os.path.join(self.root, "etc/sudoers.d/g_gamer") + with open(path, "w") as oem_file: + oem_file.write("gamer ALL=(ALL) NOPASSWD: ALL") + + # Remove symlinks before copying + self.remove_symlink('root') + + # Copy skel to root + self.copy_folder('etc/skel', 'root') + + # Enable 'menu_auto_hide' when supported in grubenv + if exists(join(self.root, "usr/bin/grub-set-bootflag")): + target_env_call(["grub-editenv", "-", "set", "menu_auto_hide=1", "boot_success=1"]) + + # Remove unneeded ucode + cpu_ucode = target_env_call(["hwinfo", "--cpu", "|", "grep", "Vendor:", "-m1", "|", "cut", "-d\'\"\'", "-f2"]) + if cpu_ucode == "AuthenticAMD": + self.remove_pkg("intel-ucode", "boot/intel-ucode.img") + elif cpu_ucode == "GenuineIntel": + self.remove_pkg("amd-ucode", "boot/amd-ucode.img") + + return None + + +def run(): + """ Set OEM User """ + + oem = ConfigOem() + + return oem.run() diff --git a/oem/gaming-oem-kde6/profile.conf b/oem/gaming-oem-kde6/profile.conf new file mode 100644 index 00000000..bb6bcc1c --- /dev/null +++ b/oem/gaming-oem-kde6/profile.conf @@ -0,0 +1,83 @@ +########################################## +###### use this file in the profile ###### +########################################## + +# use multilib packages; x86_64 only +# multilib="true" + +displaymanager="sddm" + +# Set to false to disable autologin in the livecd +# autologin="true" + +# nonfree mhwd drivers +# nonfree_mhwd="true" + +# use extra packages as defined in pkglist to activate a full profile +# extra="false" +# extra="true" + +################ install ################ + +# unset defaults to given value +# efi_boot_loader="grub" + +# configure calamares for netinstall +# netinstall="false" + +# configure calamares to use chrootcfg instead of unpackfs +# chrootcfg="false" + +# use geoip for localization +# geoip='true' + +# configure calamares for mhwd +mhwd_used="false" + +# configure calamares for oem +oem_used="true" + +windowexp=fullscreen + +# add strict snaps: strict_snaps="core core18 gnome-3-28-1804 gtk-common-themes snap-store" +# strict_snaps="" +# add classic snaps: classic_snaps="code" +# classic_snaps="" +# choose the snap channel. Possible options are: stable, candidate, beta, edge +# snap_channel="candidate" + +# unset defaults to given values +# names must match systemd service names +enable_systemd=('bluetooth' 'cronie' 'ModemManager' 'NetworkManager' 'cups' 'haveged' 'powerstation' + 'tlp' 'ufw' 'apparmor' 'snapd.apparmor' 'snapd' 'manjaro-post-install') +enable_systemd_timers=('fstrim' 'pacman-filesdb-refresh') +disable_systemd=('pacman-init') + +# the same workgroup name if samba is used +# smb_workgroup="" + +################# livecd ################# + +# unset defaults to given value +# hostname="manjaro" + +# unset defaults to given value +# username="manjaro" + +# unset defaults to given value +# password="manjaro" + +# the login shell +# defaults to bash +login_shell="/bin/zsh" + +# unset defaults to given values +# addgroups="lp,network,power,wheel" + +# unset defaults to given values +# names must match systemd service names +# services in enable_systemd array don't need to be listed here +enable_systemd_live=('manjaro-live' 'pacman-init' 'mirrors-live') +disable_systemd_live=('tlp' 'tlp-sleep') + +custom_boot_args=('splash')