Skip to content

Commit

Permalink
gnome shortcuts in live
Browse files Browse the repository at this point in the history
  • Loading branch information
slspeek committed Aug 21, 2024
1 parent 1abe046 commit 8deb296
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BATS_CMD=docker run -i --rm --init -v "$(PWD):/code" -u $(USER_ID) $(BATS_IMAGE)

LATE_CMD_LOGGING_DIR=/var/log/installer-preseed/late-cmd
MINIMAL_PACKAGE_LISTS=essential-cli-tools,desktop,desktop-extra,dutch-desktop,multimedia
ALL_PACKAGE_LISTS=essential-cli-tools,cli-tools,desktop,desktop-extra,developer,dutch-desktop,docker,firewall,games,graphic,multimedia,upgrades,video-editing,virusscanner,virtmanager
ALL_PACKAGE_LISTS=essential-cli-tools,cli-tools,desktop,desktop-extra,developer,dutch-desktop,docker,firewall,games,graphic,machine-label,multimedia,printing,upgrades,video-editing,virusscanner,virtmanager
MINIMAL_LATE_CMDS=chrome-remote-desktop,error-prompt,earth-pro,firefox-extensions,google-chrome,no-gnome-initial,short-grub-pause,sudo-nopasswd,tmux-conf
COMPLETE_LATE_CMDS=$(MINIMAL_LATE_CMDS),docker,dotnet,gists,golang,megasync,prepare-education-box,uu-add-origins,uu-activate,vscode
INTERPOLATION_CMD=LATE_CMD_LOGGING_DIR=$(LATE_CMD_LOGGING_DIR) interpolate-preseed.sh
Expand Down Expand Up @@ -109,7 +109,7 @@ live_gnome_complete: prepare
$(LIVE_BUILD_CMD) -u $(DEFAULT_USER) -p $(ALL_PACKAGE_LISTS) -n gnome-complete -t gnome -c gists,error-prompt,firefox-extensions,golang,google-chrome,chrome-remote-desktop,vscode,dotnet,tmux-conf

live_gnome: prepare
$(LIVE_BUILD_CMD) -u $(DEFAULT_USER) -p essential-cli-tools,desktop,dutch-desktop -n gnome -t gnome -c gists,firefox-extensions,error-prompt,golang,google-chrome,chrome-remote-desktop,vscode,dotnet,tmux-conf
$(LIVE_BUILD_CMD) -u $(DEFAULT_USER) -p essential-cli-tools,desktop,dutch-desktop -n gnome -t gnome -c firefox-extensions,error-prompt,vscode,tmux-conf

lives: live_server live_gnome_complete live_gnome

Expand Down
3 changes: 2 additions & 1 deletion bin/live-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ lb config noauto \
--distribution bookworm \
--parent-archive-areas "main contrib non-free non-free-firmware" \
--bootappend-live "boot=live components locales=nl_NL.UTF-8 username=${DEFAULT_USER} \
user-fullname=${DEFAULT_USER_FULLNAME}" \
user-fullname=${DEFAULT_USER_FULLNAME} timezone=Europe/Amsterdam" \
"$@"
EOF
export DEFAULT_USER
Expand All @@ -84,6 +84,7 @@ cp -r ../auto .
mkdir -p config/includes.chroot/etc/skel/.config && echo yes > config/includes.chroot/etc/skel/.config/gnome-initial-setup-done
mkdir -p config/includes.chroot/etc/live/config.conf.d/
echo "LIVE_USER_DEFAULT_GROUPS=\"audio cdrom dip floppy video plugdev netdev powerdev scanner bluetooth fuse docker\"" > config/includes.chroot/etc/live/config.conf.d/10-user-setup.conf
# cp ../includes.chroot/lib/live/config/1040-gnome-shortcuts config/includes.chroot/etc/live/config.conf.d/
EOF

chmod +x $LIVE_BUILD_SCRIPT
Expand Down
1 change: 0 additions & 1 deletion package-lists/desktop
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
eog
nvidia-detect
printer-driver-all
3 changes: 0 additions & 3 deletions package-lists/essential-cli-tools
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ curl
debconf-utils
extrepo
fonts-terminus
hw-probe
memtest86+
patch
pipx
qrencode
software-properties-common
sudo
tmux
Expand Down
2 changes: 2 additions & 0 deletions package-lists/machine-label
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hw-probe
qrencode
1 change: 1 addition & 0 deletions package-lists/printing
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
printer-driver-all
48 changes: 48 additions & 0 deletions resource/live/includes.chroot/lib/live/config/1040-gnome-shortcuts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/sh

. /lib/live/config.sh

## live-config(7) - System Configuration Components
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.


#set -e

Cmdline ()
{
# Reading kernel command line
for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
do
case "${_PARAMETER}" in
live-config.username=*|username=*)
LIVE_USERNAME="${_PARAMETER#*username=}"
;;
esac
done
}

Init ()
{
# Checking if package is installed or already configured
if component_was_executed "gnome-shortcuts"
then
exit 0
fi

echo -n " gnome-shortcuts"
}

Config ()
{
sudo -u $LIVE_USERNAME dbus-run-session -- /usr/local/bin/set-shortcuts.sh
touch /var/lib/live/config/gnome-shortcuts
}

Cmdline
Init
Config
6 changes: 2 additions & 4 deletions scripts/install-appindicator.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env bash
set -e

pipx install gnome-extensions-cli --system-site-packages
sudo apt-get install --yes gnome-shell-extension-appindicator
gnome-extensions enable appindicatorsupport@rgcjonas.gmail.com

pipx ensurepath

$HOME/.local/bin/gext install 615 # AppIndicator and KStatusNotifier Support
7 changes: 5 additions & 2 deletions scripts/install-firefox-extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ EXTENSTION_URLS=( \
"https://addons.mozilla.org/firefox/downloads/file/4326974/adblock_for_youtube-0.4.8.xpi" \
"https://addons.mozilla.org/firefox/downloads/file/4202634/i_dont_care_about_cookies-3.5.0.xpi" \
"https://addons.mozilla.org/firefox/downloads/file/4320550/adblocker_ultimate-3.8.26.xpi" \
"https://web.archive.org/web/20231126113521id_/https://addons.mozilla.org/firefox/downloads/file/3857142/archive_page-0.6.0.xpi" \
)

TEMPDIR=$(mktemp -d)
Expand All @@ -17,4 +16,8 @@ do
wget --no-verbose "$i"
install-mozilla-extension-globally.sh $(basename "$i")
# or do whatever with individual element of the array
done
done

wget --no-verbose "https://web.archive.org/web/20231126113521id_/https://addons.mozilla.org/firefox/downloads/file/3857142/archive_page-0.6.0.xpi"

mv archive_page_0.6.0.xpi /usr/share/mozilla/extensions/\{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}/\{5b22cb75-8e43-4f2a-bb9b-1da0655ae564\}.xpi

0 comments on commit 8deb296

Please sign in to comment.