diff options
Diffstat (limited to 'sway-de/sway')
-rw-r--r-- | sway-de/sway/.config/sway/config | 82 | ||||
-rwxr-xr-x | sway-de/sway/.local/bin/dnf-needs-restarting | 4 |
2 files changed, 43 insertions, 43 deletions
diff --git a/sway-de/sway/.config/sway/config b/sway-de/sway/.config/sway/config index 7636ee0..f91ab40 100644 --- a/sway-de/sway/.config/sway/config +++ b/sway-de/sway/.config/sway/config @@ -1,3 +1,9 @@ +# Default config for sway +# +# Copy this to ~/.config/sway/config and edit it to your liking. +# +# Read `man 5 sway` for a complete reference. + ### Variables # # Logo key. Use Mod1 for Alt. @@ -8,12 +14,18 @@ set $down j set $up k set $right l # Your preferred terminal emulator +# Recommends: foot set $term foot # 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 dmenu_path | dmenu | xargs swaymsg exec -- -set $menu wofi --show=drun | xargs swaymsg exec -- +# Recommends: rofi-wayland +set $rofi_cmd rofi \ + -terminal '$term' +# Shows a combined list of the applications with desktop files and +# executables from PATH. +# TODO: add window with the next release of rofi-wayland +set $menu $rofi_cmd -show combi -combi-modes drun#run -modes combi font Noto Sans 9 default_border pixel 1 @@ -21,8 +33,10 @@ smart_borders on ### Output configuration # -output * background ~/.local/share/backgrounds/default fill - +# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) +# Requires: desktop-backgrounds-compat, swaybg +output * bg ~/.local/share/backgrounds/default fill +# # Example configuration: # # output HDMI-A-1 resolution 1920x1080 position 1920,0 @@ -35,18 +49,13 @@ output * background ~/.local/share/backgrounds/default fill # # exec swayidle -w \ # timeout 300 'swaylock -f -c 000000' \ -# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ +# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ # before-sleep 'swaylock -f -c 000000' # # 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. - exec swayidle -w \ - timeout 300 'swaylock -f' \ - timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ - before-sleep 'swaylock -f' - ### Input configuration # # Example configuration: @@ -89,22 +98,8 @@ output * background ~/.local/share/backgrounds/default fill bindsym $mod+Shift+c reload # Exit sway (logs you out of your Wayland session) - bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' - bindsym $mod+Shift+i exec swaylock - - # Media keys - bindsym XF86AudioRaiseVolume exec ~/.local/bin/setvol up - bindsym XF86AudioLowerVolume exec ~/.local/bin/setvol down - bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle - bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle - bindsym XF86MonBrightnessDown exec ~/.local/bin/setbright down - bindsym XF86MonBrightnessUp exec ~/.local/bin/setbright up - #bindsym XF86MonBrightnessDown exec brightnessctl set 5%- - #bindsym XF86MonBrightnessUp exec brightnessctl set +5% - #bindsym XF86AudioPlay exec playerctl play-pause - #bindsym XF86AudioNext exec playerctl next - #bindsym XF86AudioPrev exec playerctl previous - + bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' + bindsym $mod+Shift+i exec loginctl lock-session # # Moving around: # @@ -235,25 +230,30 @@ client.focused_inactive #efefef #efefef #4a484d #992030 #efefef client.unfocused #efefef #efefef #4a484d #992030 #efefef # -# Status Bar: waybar +# Apps # -bar { - swaybar_command waybar -} +bindsym $mod+comma exec PATH=~/.local/bin:$PATH /usr/bin/passmenu +# Include configs from 3 locations: +# - /usr/share/sway/config.d +# - /etc/sway/config.d +# - $XDG_CONFIG_HOME/sway/config.d ($HOME/.config/sway/config.d) # -# System sway config +# If multiple directories contain the files with the same name, the later +# directory takes precedence; `$XDG_CONFIG_HOME/sway/config.d/20-swayidle.conf` +# will always be loaded instead of `/usr/share/sway/config.d/20-swayidle.conf` +# or `/etc/sway/config.d/20-swayidle.conf` # - -include /etc/sway/config.d/*.conf - +# This mechanism permits overriding our default configuration per-system +# (/etc) or per-user ($XDG_CONFIG_HOME) basis. Just create the file you +# want to modify/override in the higher-level directory. # -# Apps +# For example, to disable the default bar from Fedora configs, you'll need to +# $ echo -n > "$HOME/.config/sway/config.d/90-bar.conf" # - -for_window [app_id="firefox"] inhibit_idle fullscreen -assign [app_id="firefox"] workspace number 1 - -bindsym $mod+comma exec PATH=~/.local/bin:$PATH /usr/bin/passmenu - +# Note the quoting, the $() and the arguments quoting. All the parts are equally +# important to make the magic work. And if you want to learn the secret behind +# the trick, it's all in the `wordexp(3)`. +# +include '$(/usr/libexec/sway/layered-include "/usr/share/sway/config.d/*.conf" "/etc/sway/config.d/*.conf" "${XDG_CONFIG_HOME:-$HOME/.config}/sway/config.d/*.conf")' diff --git a/sway-de/sway/.local/bin/dnf-needs-restarting b/sway-de/sway/.local/bin/dnf-needs-restarting index a080649..7fc6542 100755 --- a/sway-de/sway/.local/bin/dnf-needs-restarting +++ b/sway-de/sway/.local/bin/dnf-needs-restarting @@ -1,6 +1,6 @@ #!/bin/bash -set -eo pipefail +set -euo pipefail if command -v dnf > /dev/null; then DNFCMD="dnf" @@ -8,7 +8,7 @@ fi if command -v jq > /dev/null; then JQCMD="jq" fi -if [ -z "$DNFCMD" ] || [ -z "$JQCMD" ]; then +if [ -z "${DNFCMD+x}" ] || [ -z "${JQCMD+x}" ]; then echo "{\"tooltip\": \"requires 'jq' and 'dnf'\", \"text\": \"\"}" exit 1 fi |