Skip to content

Instantly share code, notes, and snippets.

@ghostface
Created August 27, 2021 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghostface/ed095be58730e2164f7ce47dd218a281 to your computer and use it in GitHub Desktop.
Save ghostface/ed095be58730e2164f7ce47dd218a281 to your computer and use it in GitHub Desktop.
Greetd + tuigreet
❯ cat /etc/greetd/tuigreet_wrap.sh
#!/bin/bash
GPU=`asusctl graphics -g`
tuigreet /home/christoph/bin/sway --sessions /etc/greetd/tuigreet_sessions --time  -i
❯ cat /etc/greetd/config.toml
[terminal]
# The VT to run the greeter on. Can be "next", "current" or a number
# designating the VT.
vt = 7

# The default session, also known as the greeter.
[default_session]

# `agreety` is the bundled agetty/login-lookalike. You can replace `$SHELL`
# with whatever you want started, such as `sway`.
#command = "agreety --cmd $SHELL"
command = "/etc/greetd/tuigreet_wrap.sh"
#command = "cage gtkgreet"

# The user to run the command as. The privileges this user must have depends
# on the greeter. A graphical greeter may for example require the user to be
# in the `video` group.
user = "greeter"
❯ cd tuigreet_sessions/
❯ ls tuigreet_sessions
      i3.desktop              integrated.desktop       river.desktop       sway_nvidia.desktop
      i3_nvidia.desktop       nvidia.desktop           sway.desktop
❯ cat tuigreet_sessions/sway.desktop
[Desktop Entry]
Name=Sway (igpu)
Comment=An i3-compatible Wayland compositor
Exec=/home/christoph/bin/sway
Type=Application
❯ cat tuigreet_sessions/integrated.desktop
[Desktop Entry]
Name=Switch to integrated GPU
Comment=switch to integrated
#Exec=sway --my-next-gpu-wont-be-nvidia
Exec=asusctl graphics -m integrated
Type=Application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment