merge bluish fork: add clipboard manager, update regreet config, use systemd for suspend events (#77)

* style(waybar): remove temperature module from style.css
* Remove temperature module from style.css. We aren't using the temperature module in the Waybar so we don't need css for it.

* feat: replace sddm with greetd
* Remove sddm and eos-sddm-theme from packages-repository.txt, add greetd and greetd-regreet
* Add directory in repo for Greetd configs
* Add executable bit to scripts so it doesn't have to be set post-install
* Create home_config directory for files to be deployed to user's home root (.gtkrc-2.0, .nanorc)
* Rework the user_commands.bash script with explanatory comments, debug echoes, rework some of the commands
* Update README.md to mention installing with user_commands.bash method, update display manager references from SDDM to Greetd

To do:
* Update sway-install.sh for new deployment routine
* Debug set_once.sh (do we need this? It currently isn't being used since nothing is setting it as executable)
* setup.sh > seems to be an old version of the install script. Remove?

* fix(readme): image URL

* fix(readme.md): re-upload images

* feat(readme.md): update installation instructions

Add an ordered list to the installation instructions to accompany the Welcome/install-file picture.

* style(regreet.toml): update comment for WLR_RENDERER_ALLOW_SOFTWARE variable

* feat(setup_sway_isomode.bash): add vm detection
* Detect vm with systemd-detect-virt
* Conditionally enable WLR_RENDERER_ALLOW_SOFTWARE in ReGreet config

* fix(regreet.toml): revert welcome message to default

* feat(xed.dconf): update xed setup routine
* Add new self-destructing setup script for applying xed.dconf
* xed_setup.sh will be deployed by Sway autostart config. Script applies config, sends a notification, removes script call in autostart config, and deletes itself.
* set_once.sh and the line which calls it in ~/.config/sway/config have been deleted. The script wasn't actually doing anything to begin with since it was not executable, but now all the stuff it was supposed to do is taken care of in other scripts.

* feat(sway-install.sh): update post-install setup script
Update sway-install.sh based on the new configuration layout. The script runs as root instead of calling sudo multiple times in the script, but restores ownership to the user's home directory deploying the configs (using logname to determine the username).

* fix(sway-install.sh): update relative paths, remove call to clone repo

* fix(README.md): correct URL for user_commands.bash installation method

* fix(packages-repository.txt): remove redundant bluez-utils entry
bluez-utils is already included in the default package list in a stock EndeavourOS install with no DE.

* feat(sway): incorporate 50-systemd-user.conf into autostart_applications
* XDG_CURRENT_DESKTOP=sway is already set by the greeter
* Importing environment variables for the user systemd service manager and updating the dbus environment with display variables can be set in the autostart config.

* feat: add pamixer, update multimedia keybindings
* Add `pamixer`, allowing the volume multimedia keys to be simplified
* Use `playerctl`'s `play-pause` command by default. Having separate bindings for "play" and "pause" is appropriate if "play" and "pause" are separate multimedia keys, but what is more common is for these to be the same key.

* style: move foot server startup to autostart_applications

* style: tidy up sway config, simplify code comments
Get the config organized and make it easier to read through.

* feat: replace wofi with fuzzel
Wofi still works, but there is a notice on their sourcehut page (https://hg.sr.ht/~scoopta/wofi) that it is not actively maintained anymore. Fuzzel is an alternative picker from the same dev as Foot terminal. It is fast, highly customizable, and low resource usage.

In addition to being used as an application launcher, Wofi was being used in a script for the power menu and in a window switcher script. Those scripts have been re-written to provide the same functionality, but using Fuzzel for the picker.

* Add Fuzzel to packages-repository.txt, remove Wofi
* Add fuzzel.ini, remove Wofi configs and scripts
* Add new Fuzzel scripts to ~/.config/sway/scripts
* Update Waybar config (change Wofi calls to Fuzzel calls)
* Update Wofi mentions in cheatsheet, keyhint script, and README

* feat: add local desktop files with NoDisplay=true
Add local desktop files with NoDisplay=true for default applications which have a desktop file, but are not intended to be started from the launcher. Rather, these are utilities or menus which are meant to be started from within another application. Adding the NoDisplay=true property will help declutter the launcher's menu.

The installation scripts have also been updated to accomodate these files during the config deployment routine.

* feat(regreet): update environment variables in regreet config
* Update [env] section in ReGreet config to include environment variables set in ~/.config/environment.d/30-envvars.conf
* Add explanatory comments
* Remove ~/.config/environment.d/30-envvars.conf since it is no longer needed

* feat(logind.conf.d): remove suspend scripts and use systemd for this
Since we are using systemd, we can just send an idlehint and let systemd manage suspend events (including lid closing, etc) with logind.conf. This will be cleaner and less complicated than the scripted solutions.
* Add a drop-in for logind.conf.d to suspend after 10 minutes
* Add an accomodation to the config to lock the screen before suspend events

* feat: add cliphist
* Add [cliphist](https://github.com/sentriz/cliphist) clipboard manager
* Add watch for clipboard events to autostart config
* Add keybindings to launch cliphist with Fuzzel

* style(sway-input): remove tap_button_map lrm
Remove tap_button_map lrm from input config. lrm is the default so we do not need to explicitly set it here. Also the comment was rather confusing and unhelpful.

* feat(power_menu.sh): add selection numbers to confirmation menu
The selection numbers are handy for making a selection from the num pad, however it is needed to come back over to the arrow keys or the home row on the confirmation prompt. Adding the selection numbers to the confirmation prompt will allow completing the interaction on the num pad if desired.

* fix(regreet): correct formatting for new environment variables

* Update README.md

* Update instruction for setting WLR_NO_HARDWARE_CURSORS
* Remove mention of LXAppearance since we don't use it
* Update Wofi screenshot to Fuzzel screenshot

* feat(sudoers.d/custom): add env_keep variables for sudo
Add a sudoers drop-in for passing environment variables to sudo for QT_QPA_PLATFORM, WAYLAND_DISPLAY, and XDG_RUNTIME_DIR. These variables are commonly needed for running applications as sudo on Wayland.
This commit is contained in:
BluishHumility
2024-08-16 07:50:31 +00:00
committed by GitHub
parent aa3802ae5c
commit 6ddbb43058
12 changed files with 38 additions and 44 deletions

View File

@@ -1,10 +0,0 @@
# Default env vars.
#XDG_CURRENT_DESKTOP=sway
#XDG_SESSION_TYPE,wayland
#XDG_SESSION_DESKTOP=sway
MOZ_ENABLE_WAYLAND=1
GDK_BACKEND=wayland
WLR_NO_HARDWARE_CURSORS=1
GDK_BACKEND=wayland
WLR_RENDERER_ALLOW_SOFTWARE=1
OZONE_PLATFORM=wayland

View File

@@ -22,6 +22,10 @@ exec_always --no-startup-id foot --server
# Autotiling # Autotiling
exec_always ~/.config/sway/scripts/autotiling exec_always ~/.config/sway/scripts/autotiling
# cliphist
exec wl-paste --type text --watch cliphist store
exec wl-paste --type image --watch cliphist store
# Welcome App # Welcome App
exec dex -a -s /etc/xdg/autostart/:~/.config/autostart/ exec dex -a -s /etc/xdg/autostart/:~/.config/autostart/

View File

@@ -17,17 +17,9 @@ set $launcher fuzzel
set $powermenu ~/.config/sway/scripts/power_menu.sh set $powermenu ~/.config/sway/scripts/power_menu.sh
### Idle configuration ### Idle configuration
exec swayidle -w\ exec swayidle idlehint 1
timeout 1070 'swaylock -f -C ~/.config/swaylock/config'\ exec_always swayidle -w before-sleep "$lock"
timeout 770 'swaymsg "output * power off"' \ set $lock swaylock -C ~/.config/swaylock/config
resume 'swaymsg "output * power on"' \
before-sleep 'swaylock -C ~/.config/swaylock/config'
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
## Lock Screen
bindsym $mod+f1 exec ~/.config/sway/scripts/lockman.sh
### Key bindings ### Key bindings
# #
@@ -45,6 +37,9 @@ exec swayidle -w\
# Start your launcher # Start your launcher
bindsym $mod+d exec $launcher bindsym $mod+d exec $launcher
# Lock screen
bindsym $mod+f1 exec $lock
# Activities # Activities
bindsym $mod+p exec ~/.config/sway/scripts/window_switcher.sh bindsym $mod+p exec ~/.config/sway/scripts/window_switcher.sh
@@ -193,8 +188,17 @@ exec swayidle -w\
# #
# App shortcuts # App shortcuts
# #
# Launch the file explorer
bindsym $mod+n exec thunar bindsym $mod+n exec thunar
# Launch the browser
bindsym $mod+o exec firefox bindsym $mod+o exec firefox
# Launch the clipboard manager
bindsym $mod+Ctrl+v exec cliphist list | fuzzel -d -w 90 -l 30 -p "Select an entry to copy it to your clipboard buffer:"| cliphist decode | wl-copy
# Delete an entry from the clipboard manager
bindsym $mod+Ctrl+x exec cliphist list | fuzzel -d -w 90 -l 30 -t cc9393ff -S cc9393ff -p "Select an entry to delete it from cliphist:"| cliphist delete
# Note: you can clear all cliphist entries by running `cliphist wipe`
# #
# Screenshots # Screenshots
# #

View File

@@ -6,7 +6,6 @@
input type:touchpad { input type:touchpad {
dwt enabled dwt enabled
tap enabled tap enabled
tap_button_map lrm # Fixed autoscroll without having to scroll on browser (this thing is tested) , right click menu was not showing up idk how this works but it supresses the autoscroll
natural_scroll enabled natural_scroll enabled
} }

View File

@@ -1,8 +0,0 @@
#!/usr/bin/bash
if [-d "/proc/acpi" ]; then
if cat /proc/acpi/button/lid/*/state | grep -q open; then
swaymsg output eDP-1 enable
else
swaymsg output eDP-1 disable
fi
fi

View File

@@ -1,9 +0,0 @@
#!/bin/sh
# Times the screen off and puts it to background
swayidle \
timeout 300 'swaymsg "output * power off"' \
resume 'swaymsg "output * power on"' &
# Locks the screen immediately
swaylock
# Kills last background task so idle timer doesn't keep running
kill %%

View File

@@ -4,8 +4,8 @@ SELECTION="$(printf "1 - Lock\n2 - Suspend\n3 - Log out\n4 - Reboot\n5 - Reboot
confirm_action() { confirm_action() {
local action="$1" local action="$1"
CONFIRMATION="$(printf "No\nYes" | fuzzel --dmenu -a top-right -l 2 -w 20 -p "$action?")" CONFIRMATION="$(printf "1 - No\n2 - Yes" | fuzzel --dmenu -a top-right -l 2 -w 20 -p "$action?")"
[ "$CONFIRMATION" = "Yes" ] [ "$CONFIRMATION" = "2 - Yes" ]
} }
case $SELECTION in case $SELECTION in

View File

@@ -41,7 +41,7 @@ You can examine the contents of the script here: https://github.com/EndeavourOS-
- Screen settings in: `~/.config/sway/config.d/output` - Screen settings in: `~/.config/sway/config.d/output`
- Keybindings Cheatsheet: press keyboard icon in waybar - Keybindings Cheatsheet: press keyboard icon in waybar
- If your experiencing issues with your cursor - edit file `~/.profile` and comment out `export WLR_NO_HARDWARE_CURSORS=1` - If your experiencing issues with your cursor - edit file `/etc/greetd/regreet.toml` and uncomment `export WLR_NO_HARDWARE_CURSORS = "1"`
## Get involved at our forum: ## Get involved at our forum:
https://forum.endeavouros.com/t/sway-edition-general-conversation https://forum.endeavouros.com/t/sway-edition-general-conversation
@@ -49,7 +49,6 @@ https://forum.endeavouros.com/t/sway-edition-general-conversation
## Tutorial for sway-wm settings: ## Tutorial for sway-wm settings:
- Background handled by swaybg - Background handled by swaybg
- Gtk3 theme handled by lxappearance
- Filebrowser = Thunar - Filebrowser = Thunar
- Default Terminal-Emulator = Foot - Default Terminal-Emulator = Foot
- Text-Editor = xed/nano - Text-Editor = xed/nano
@@ -91,7 +90,8 @@ Is set to default for swaywm and can be changed to:
![sway](https://forum.endeavouros.com/uploads/default/original/3X/b/c/bc09b71d718cb09a8efd4545cc65366c5f855441.png) ![sway](https://forum.endeavouros.com/uploads/default/original/3X/b/c/bc09b71d718cb09a8efd4545cc65366c5f855441.png)
![wofi](https://forum.endeavouros.com/uploads/default/original/3X/9/d/9daff7f842bd9db097e0bb9d6be5cf5b65e6baa0.jpeg)
![fuzzel](https://github.com/user-attachments/assets/88fdbf21-83b6-44b3-a2c4-c84cbfcac585)
Waybar : Waybar :
![waybar](https://forum.endeavouros.com/uploads/default/original/3X/7/3/73b22b2a678c6836c3b2d15747b0ef28e064fbc2.png) ![waybar](https://forum.endeavouros.com/uploads/default/original/3X/7/3/73b22b2a678c6836c3b2d15747b0ef28e064fbc2.png)

View File

@@ -13,13 +13,22 @@ fit = "Cover"
# The entries defined in this section will be passed to the session as environment variables when it is started # The entries defined in this section will be passed to the session as environment variables when it is started
[env] [env]
# Set desktop and session type
XDG_SESSION_TYPE = "wayland" XDG_SESSION_TYPE = "wayland"
XDG_CURRENT_DESKTOP = "sway" XDG_CURRENT_DESKTOP = "sway"
XDG_SESSION_DESKTOP = "sway" XDG_SESSION_DESKTOP = "sway"
# Specify Wayland backends for various applications
MOZ_ENABLE_WAYLAND = "1"
OZONE_PLATFORM = "wayland"
GDK_BACKEND = "wayland"
QT_QPA_PLATFORM = "wayland"
# Prevent using hardware cursors in Wayland, forcing software-rendered cursors.
# Uncomment if you experience issues with your cursor # Uncomment if you experience issues with your cursor
#export WLR_NO_HARDWARE_CURSORS = "1" #export WLR_NO_HARDWARE_CURSORS = "1"
# Allow the Wayland renderer to fall back to software rendering if necessary.
# Uncomment if you are running in a virtual machine or have an underpowered GPU # Uncomment if you are running in a virtual machine or have an underpowered GPU
#export WLR_RENDERER_ALLOW_SOFTWARE = "1" #export WLR_RENDERER_ALLOW_SOFTWARE = "1"

1
etc/sudoers.d/custom Normal file
View File

@@ -0,0 +1 @@
Defaults env_keep += "QT_QPA_PLATFORM WAYLAND_DISPLAY XDG_RUNTIME_DIR"

View File

@@ -0,0 +1,3 @@
[Login]
IdleAction=suspend
IdleActionSec=10min

View File

@@ -2,6 +2,7 @@ acpi
arc-gtk-theme-eos arc-gtk-theme-eos
awesome-terminal-fonts awesome-terminal-fonts
brightnessctl brightnessctl
cliphist
dex dex
egl-wayland egl-wayland
file-roller file-roller