Instantly share code, notes, and snippets.
Last active
December 24, 2023 22:27
-
Save rbreaves/771fc40890a58b1a3070c0adb13052b7 to your computer and use it in GitHub Desktop.
ElementaryOS Latest - w/ Global Menu via Mate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Suspend and screensavers may be broken with this current implementation | |
# Not really a shell file, but mostly notes and scribbles for how to get this going. | |
# Sane double click to open file or folder default | |
gsettings set io.elementary.files.preferences single-click false | |
# HiDPI | |
gsettings set org.gnome.desktop.interface scaling-factor 2 | |
# https://www.reddit.com/r/elementaryos/comments/53gkr1/elementary_os_loki_hidpi_experience_and_tips/ | |
# Install Global Menu via Mate | |
sudo apt-get install mate-panel mate-tweak mate-core gtk2-engines-pixbuf mate-indicator-applet appmenu-gtk2-module appmenu-gtk3-module indicator-appmenu indicator-sound-gtk2 indicator-application indicator-datetime indicator-session mate-applet-brisk-menu mate-applet-appmenu | |
gsettings get io.elementary.desktop.cerbere monitored-processes | |
['wingpanel', 'plank'] | |
gsettings set io.elementary.desktop.cerbere monitored-processes "['mate-panel','plank']" | |
# reboot | |
# apply cupertino layout | |
mate-tweak --layout eleven | |
# https://sajith.me/blog/blog/2013/09/29/mate-panel-with-luna/ | |
# Xenial 16.04 Only | |
# sudo add-apt-repository ppa:enso-os/stable | |
# sudo apt-get update | |
# sudo apt install panther-launcher | |
# | |
# Does not appear to compile - WIP | |
# https://github.com/rbreaves/launchy | |
# Panther Launcher Install | |
sudo apt install pkg-config build-essential libgtk-3-dev libgee-0.8* libjson-glib-dev libgnome-menu-3-dev libsoup2.4-dev libpanel-applet-dev libmatepanelapplet-dev valac | |
# Following instructions on how to compile | |
# https://parasurv.neocities.org/slingshot-fork-panther-launcher-ubuntu-mate.html | |
sudo apt install mate-tweak | |
# disable icon animation | |
gsettings set org.mate.panel enable-animations false | |
gesettings set org.mate.panel highlight-launchers-on-mouseover false | |
# https://wiki.archlinux.org/index.php/MATE | |
# bring in missing mate panel options | |
# doesn't really seem to work though | |
# need to use wingpanel to do shutdown/logoff | |
sudo apt install indicator-applet-complete gnome-panel | |
# Fix shutdown/logoff - Method does not work | |
# some of these services are still useful though | |
systemctl --user start indicator-power.service | |
systemctl --user start indicator-keyboard.service | |
systemctl --user start indicator-sound.service | |
systemctl --user start indicator-datetime.service | |
systemctl --user start indicator-session.service | |
# https://askubuntu.com/questions/1097737/gnome-panel-applet-indicator-applet-complete-is-missing-icons | |
# Fix shutdown/logoff - Method 2 | |
wingpanel | |
dbus-send --print-reply --dest="org.gnome.Shell" /org/gnome/SessionManager/EndSessionDialog org.gnome.SessionManager.EndSessionDialog.Open uint32:2 uint32:0 uint32:60 array:objpath:/org/gnome/SessionManager/EndSessionDialog | |
# Use xprop or wmctrl to monitor wingpanel & this disappearing _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG | |
# Once it disappears then kill the wingpanel service, otherwise it glitches mate-panel by showing wingpanel stuff in it | |
# Could also just set a 10 second timer and kill wingpanel regardless.. simple. | |
# Shutdown directly: | |
dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.PowerOff" boolean:true | |
# Reboot directly: | |
dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.Reboot" boolean:true | |
# Sleep directly: | |
dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.Suspend" boolean:true | |
https://elementaryos.stackexchange.com/questions/7825/what-is-the-command-for-the-shutdown-dialogue-in-loki | |
# Logout | |
# Only works for non-scripted usage? | |
loginctl kill-session $XDG_SESSION_ID;loginctl terminate-session $XDG_SESSION_ID | |
# this logout method failed | |
# dbus-send --system --print-reply --dest=org.freedesktop.login1 \ | |
# /org/freedesktop/login1 'org.freedesktop.login1.Manager.TerminateSession' \ | |
# string:c2 | |
# list sessions | |
loginctl | |
https://unix.stackexchange.com/questions/291922/universal-way-to-logout-from-terminal-via-dbus | |
# Lock user session | |
dm-tool lock | |
# If looking to recompile gala then these are your dependencies to install | |
sudo apt install libbamf3-dev libplank-dev libgranite-dev libgnome-desktop-3-dev gnome-settings-daemon-dev libmutter-2-dev libcanberra-dev libcanberra-gtk3-dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment