merge bluish fork: switch display manager to greetd, overhaul installation scripts, update readme (#75)
* 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.
This commit is contained in:
@@ -29,7 +29,7 @@ MOD+Return
|
||||
# kill focused window
|
||||
MOD+q
|
||||
|
||||
# Application menu - wofi:
|
||||
# Application menu - Fuzzel:
|
||||
MOD+d
|
||||
|
||||
# Activities:
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
# Initial Setup
|
||||
exec ~/set_once.sh
|
||||
|
||||
# Config for sway
|
||||
#
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
@@ -8,6 +5,3 @@ exec ~/set_once.sh
|
||||
#
|
||||
# user config directory
|
||||
include $HOME/.config/sway/config.d/*
|
||||
|
||||
# only enable this if every app you use is compatible with wayland
|
||||
# xwayland disable
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
# sway does not set DISPLAY/WAYLAND_DISPLAY in the systemd user environment
|
||||
# See FS#63021
|
||||
# Adapted from xorg's 50-systemd-user.sh, which achieves a similar goal.
|
||||
|
||||
# Upstream refuses to set XDG_CURRENT_DESKTOP so we have to.
|
||||
exec systemctl --user set-environment XDG_CURRENT_DESKTOP=sway
|
||||
exec systemctl --user import-environment DISPLAY \
|
||||
SWAYSOCK \
|
||||
WAYLAND_DISPLAY \
|
||||
XDG_CURRENT_DESKTOP
|
||||
|
||||
exec hash dbus-update-activation-environment 2>/dev/null && \
|
||||
dbus-update-activation-environment --systemd DISPLAY \
|
||||
SWAYSOCK \
|
||||
XDG_CURRENT_DESKTOP=sway \
|
||||
WAYLAND_DISPLAY
|
||||
@@ -1,12 +1,25 @@
|
||||
# Apply xed settings with self-destructing script
|
||||
exec ~/.config/sway/scripts/xed_setup.sh
|
||||
|
||||
# Auth with polkit-gnome:
|
||||
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
|
||||
# Import environment variables for user systemd service manager
|
||||
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
||||
|
||||
# Update dbux environments with display variables
|
||||
exec hash dbus-update-activation-environment 2>/dev/null && \
|
||||
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
||||
|
||||
# Desktop notifications
|
||||
exec mako
|
||||
|
||||
# Network Applet
|
||||
exec nm-applet --indicator
|
||||
|
||||
# Start foot server
|
||||
exec_always --no-startup-id foot --server
|
||||
|
||||
# Autotiling
|
||||
exec_always ~/.config/sway/scripts/autotiling
|
||||
|
||||
|
||||
@@ -1,32 +1,20 @@
|
||||
# Logo key. Use Mod1 for Alt.
|
||||
set $mod Mod4
|
||||
|
||||
# Home row direction keys, like vim
|
||||
# Add Vim key support
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
|
||||
# audio control
|
||||
set $sink_volume pactl get-sink-volume @DEFAULT_SINK@ | grep '^Volume:' | cut -d / -f 2 | tr -d ' ' | sed 's/%//'
|
||||
set $source_volume pactl get-source-volume @DEFAULT_SOURCE@ | grep '^Volume:' | cut -d / -f 2 | tr -d ' ' | sed 's/%//'
|
||||
set $volume_down $(pactl set-sink-volume @DEFAULT_SINK@ -5% && $sink_volume)
|
||||
set $volume_up $(pactl set-sink-volume @DEFAULT_SINK@ +5% && $sink_volume)
|
||||
set $volume_mute $(pactl set-sink-mute @DEFAULT_SINK@ toggle && pactl get-sink-mute @DEFAULT_SINK@ | sed -En "/no/ s/.*/$($sink_volume)/p; /yes/ s/.*/0/p")
|
||||
set $mic_mute $(pactl set-source-mute @DEFAULT_SOURCE@ toggle && pactl get-source-mute @DEFAULT_SOURCE@ | sed -En "/no/ s/.*/$($source_volume)/p; /yes/ s/.*/0/p")
|
||||
|
||||
# Start foot server
|
||||
exec_always --no-startup-id foot --server
|
||||
|
||||
# Set default terminal emulator
|
||||
set $term footclient
|
||||
|
||||
# Your preferred application launcher
|
||||
# Note: pass the final command to swaymsg so that the resulting window can be opened
|
||||
# on the original workspace that the command was run on.
|
||||
set $menu wofi -c ~/.config/wofi/config -I
|
||||
# Application launcher
|
||||
set $launcher fuzzel
|
||||
|
||||
set $powermenu ~/.config/waybar/scripts/power-menu.sh
|
||||
# Power Menu
|
||||
set $powermenu ~/.config/sway/scripts/power_menu.sh
|
||||
|
||||
### Idle configuration
|
||||
exec swayidle -w\
|
||||
@@ -55,16 +43,14 @@ exec swayidle -w\
|
||||
bindsym $mod+q kill
|
||||
|
||||
# Start your launcher
|
||||
bindsym $mod+d exec $menu
|
||||
bindsym $mod+d exec $launcher
|
||||
|
||||
# Activities
|
||||
bindsym $mod+p exec ~/.config/wofi/windows.py
|
||||
bindsym $mod+p exec ~/.config/sway/scripts/window_switcher.sh
|
||||
|
||||
# Drag floating windows by holding down $mod and left mouse button.
|
||||
# Move windows by holding down $mod and left mouse button.
|
||||
# Resize them with right mouse button + $mod.
|
||||
# Despite the name, also works for non-floating windows.
|
||||
# Change normal to inverse to use left mouse button for resizing and right
|
||||
# mouse button for dragging.
|
||||
# Change "normal" to "inverse" to switch left and right
|
||||
floating_modifier $mod normal
|
||||
|
||||
# Reload the configuration file
|
||||
@@ -73,27 +59,28 @@ exec swayidle -w\
|
||||
#
|
||||
# Moving around:
|
||||
#
|
||||
# Move your focus around
|
||||
bindsym $mod+$left focus left
|
||||
bindsym $mod+$down focus down
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$right focus right
|
||||
# Or use $mod+[up|down|left|right]
|
||||
# Change window focus
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
# Vim key support
|
||||
bindsym $mod+$left focus left
|
||||
bindsym $mod+$down focus down
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$right focus right
|
||||
|
||||
# Move the focused window with the same, but add Shift
|
||||
bindsym $mod+Shift+$left move left
|
||||
bindsym $mod+Shift+$down move down
|
||||
bindsym $mod+Shift+$up move up
|
||||
bindsym $mod+Shift+$right move right
|
||||
# Ditto, with arrow keys
|
||||
# Move the focused window
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
# Vim key support
|
||||
bindsym $mod+Shift+$left move left
|
||||
bindsym $mod+Shift+$down move down
|
||||
bindsym $mod+Shift+$up move up
|
||||
bindsym $mod+Shift+$right move right
|
||||
|
||||
#
|
||||
# Workspaces:
|
||||
#
|
||||
@@ -121,14 +108,15 @@ exec swayidle -w\
|
||||
bindsym $mod+Shift+0 move container to workspace number 10
|
||||
# Note: workspaces can have any name you want, not just numbers.
|
||||
# We just use 1-10 as the default.
|
||||
|
||||
#
|
||||
# Layout stuff:
|
||||
#
|
||||
# You can "split" the current object of your focus with
|
||||
# $mod+b or $mod+v, for horizontal and vertical splits
|
||||
# respectively.
|
||||
bindsym $mod+b splith
|
||||
# Set how the current window will be split
|
||||
# Split the window vertically
|
||||
bindsym $mod+v splitv
|
||||
# Split the window horizontally
|
||||
bindsym $mod+b splith
|
||||
|
||||
# Switch the current container between different layout styles
|
||||
bindsym $mod+s layout stacking
|
||||
@@ -138,7 +126,7 @@ exec swayidle -w\
|
||||
# Make the current focus fullscreen
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
# Toggle the current focus between tiling and floating mode
|
||||
# Toggle between tiling and floating mode
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# Swap focus between the tiling area and the floating area
|
||||
@@ -161,30 +149,25 @@ exec swayidle -w\
|
||||
#
|
||||
# Resizing containers:
|
||||
#
|
||||
mode "resize" {
|
||||
# left will shrink the containers width
|
||||
# right will grow the containers width
|
||||
# up will shrink the containers height
|
||||
# down will grow the containers height
|
||||
bindsym $left resize shrink width 10px
|
||||
bindsym $right resize grow width 10px
|
||||
bindsym $up resize shrink height 10px
|
||||
bindsym $down resize grow height 10px
|
||||
mode "resize" {
|
||||
# Resize with arrow keys
|
||||
bindsym Left resize shrink width 10px
|
||||
bindsym Down resize grow height 10px
|
||||
bindsym Up resize shrink height 10px
|
||||
bindsym Right resize grow width 10px
|
||||
# Resize with Vim keys
|
||||
bindsym $left resize shrink width 10px
|
||||
bindsym $down resize grow height 10px
|
||||
bindsym $up resize shrink height 10px
|
||||
bindsym $right resize grow width 10px
|
||||
# Return to default mode
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mod+r mode "default"
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Ditto, with arrow keys
|
||||
bindsym Left resize shrink width 10px
|
||||
bindsym Right resize grow width 10px
|
||||
bindsym Up resize shrink height 10px
|
||||
bindsym Down resize grow height 10px
|
||||
|
||||
# Return to default mode
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Resize floating windows with mouse scroll:
|
||||
# Resize floating windows with mouse scroll:
|
||||
bindsym --whole-window --border $mod+button4 resize shrink height 5 px or 5 ppt
|
||||
bindsym --whole-window --border $mod+button5 resize grow height 5 px or 5 ppt
|
||||
bindsym --whole-window --border $mod+Shift+button4 resize shrink width 5 px or 5 ppt
|
||||
@@ -193,20 +176,13 @@ bindsym $mod+r mode "resize"
|
||||
#
|
||||
# Volume
|
||||
#
|
||||
# Control volume trough pamixer
|
||||
# bindsym --locked XF86AudioRaiseVolume exec pamixer -ui 2
|
||||
# bindsym --locked XF86AudioLowerVolume exec pamixer -ud 2
|
||||
# bindsym --locked XF86AudioMute exec pamixer -t
|
||||
|
||||
# Control volume directly trough pactl
|
||||
bindsym --locked XF86AudioRaiseVolume exec $volume_up
|
||||
bindsym --locked XF86AudioLowerVolume exec $volume_down
|
||||
bindsym --locked XF86AudioMute exec $volume_mute
|
||||
bindsym XF86AudioRaiseVolume exec pamixer -ui 2
|
||||
bindsym XF86AudioLowerVolume exec pamixer -ud 2
|
||||
bindsym XF86AudioMute exec pamixer --toggle-mute
|
||||
#
|
||||
# Player
|
||||
#
|
||||
bindsym XF86AudioPlay exec playerctl play
|
||||
bindsym XF86AudioPause exec playerctl pause
|
||||
bindsym XF86AudioPlay exec playerctl play-pause
|
||||
bindsym XF86AudioNext exec playerctl next
|
||||
bindsym XF86AudioPrev exec playerctl previous
|
||||
#
|
||||
|
||||
0
.config/sway/scripts/clamshell.sh
Normal file → Executable file
0
.config/sway/scripts/clamshell.sh
Normal file → Executable file
0
.config/sway/scripts/import-gsettings
Normal file → Executable file
0
.config/sway/scripts/import-gsettings
Normal file → Executable file
0
.config/sway/scripts/lockman.sh
Normal file → Executable file
0
.config/sway/scripts/lockman.sh
Normal file → Executable file
34
.config/sway/scripts/power_menu.sh
Executable file
34
.config/sway/scripts/power_menu.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
SELECTION="$(printf "1 - Lock\n2 - Suspend\n3 - Log out\n4 - Reboot\n5 - Reboot to UEFI\n6 - Shutdown" | fuzzel --dmenu -a top-right -l 6 -w 20 -p "Select an option: ")"
|
||||
|
||||
confirm_action() {
|
||||
local action="$1"
|
||||
CONFIRMATION="$(printf "No\nYes" | fuzzel --dmenu -a top-right -l 2 -w 20 -p "$action?")"
|
||||
[ "$CONFIRMATION" = "Yes" ]
|
||||
}
|
||||
|
||||
case $SELECTION in
|
||||
*"Lock")
|
||||
swaylock;;
|
||||
*"Suspend")
|
||||
if confirm_action "Suspend"; then
|
||||
systemctl suspend
|
||||
fi;;
|
||||
*"Log out")
|
||||
if confirm_action "Log out"; then
|
||||
swaymsg exit
|
||||
fi;;
|
||||
*"Reboot")
|
||||
if confirm_action "Reboot"; then
|
||||
systemctl reboot
|
||||
fi;;
|
||||
*"Reboot to UEFI")
|
||||
if confirm_action "Reboot to UEFI"; then
|
||||
systemctl reboot --firmware-setup
|
||||
fi;;
|
||||
*"Shutdown")
|
||||
if confirm_action "Shutdown"; then
|
||||
systemctl poweroff
|
||||
fi;;
|
||||
esac
|
||||
0
.config/sway/scripts/swayfader.py
Normal file → Executable file
0
.config/sway/scripts/swayfader.py
Normal file → Executable file
0
.config/sway/scripts/weather.sh
Normal file → Executable file
0
.config/sway/scripts/weather.sh
Normal file → Executable file
32
.config/sway/scripts/window_switcher.sh
Executable file
32
.config/sway/scripts/window_switcher.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define the lengths for each column
|
||||
ws_length=2
|
||||
app_id_length=14
|
||||
name_length=50
|
||||
|
||||
# Fetch the data from swaymsg and format it
|
||||
formatted_output=$(swaymsg -t get_tree | jq -r --arg ws_length "$ws_length" --arg app_id_length "$app_id_length" --arg name_length "$name_length" '
|
||||
def lpad($len; $char):
|
||||
if (.|length) > $len then $char * ($len - (.|length)) +.[:$len-1] + "\u2026" else $char * ($len - (.|length)) +. end;
|
||||
def rpad($len; $char):
|
||||
if (.|length) > $len then.[:$len-1] + "\u2026" else. + $char * ($len - (.|length)) end;
|
||||
..
|
||||
| objects
|
||||
| select(.type == "workspace") as $ws
|
||||
|..
|
||||
| objects
|
||||
| select(has("app_id"))
|
||||
| (if.focused then "*" else " " end) as $asterisk
|
||||
| "\($asterisk)[\($ws.name | lpad($ws_length | tonumber; " "))]\((.app_id // "xwayland") | lpad($app_id_length | tonumber; " ")): \(.name | rpad($name_length | tonumber; " ")) (\(.id))"
|
||||
')
|
||||
|
||||
# Launch fuzzel with the formatted output
|
||||
row=$(echo "$formatted_output" | fuzzel --dmenu --width=80 --lines=12)
|
||||
|
||||
# Get the container ID from the selection and focus the container
|
||||
if [ -n "$row" ]; then
|
||||
winid="${row##*(}"
|
||||
winid="${winid%%)*}"
|
||||
swaymsg "[con_id=$winid] focus"
|
||||
fi
|
||||
16
.config/sway/scripts/xed_setup.sh
Executable file
16
.config/sway/scripts/xed_setup.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Apply xed settings
|
||||
dbus-launch dconf load / < $HOME/.config/xed.dconf
|
||||
|
||||
# Notify user settings have been applied
|
||||
notify-send -i /usr/share/icons/Qogir/48/apps/accessories-text-editor.svg "Custom xed settings have been applied. "
|
||||
|
||||
# Remove xed.dconf file
|
||||
rm $HOME/.config/xed.dconf
|
||||
|
||||
# Remove xed_setup.sh from autostart config
|
||||
sed -i "/# Apply xed settings with self-destructing script/,+2d" $HOME/.config/sway/config.d/autostart_applications
|
||||
|
||||
# Remove this script
|
||||
rm $HOME/.config/sway/scripts/xed_setup.sh
|
||||
Reference in New Issue
Block a user