Add initial set of configuration presets

This commit is contained in:
Aleksei Bavshin 2022-05-30 21:50:33 -07:00
commit b9d1dd8eb1
No known key found for this signature in database
GPG key ID: 4F071603387A382A
11 changed files with 107 additions and 19 deletions

11
sway/50-fedora.conf Normal file
View file

@ -0,0 +1,11 @@
# Enable some configuration snippets by default
include /usr/share/sway/config.d/30-bindings-brightness-light.conf
include /usr/share/sway/config.d/30-bindings-media-playerctl.conf
include /usr/share/sway/config.d/30-bindings-volume-pactl.conf
include /usr/share/sway/config.d/60-windows-browser.conf
include /usr/share/sway/config.d/60-windows-lxqt-policykit-agent.conf
include /usr/share/sway/config.d/90-bar-waybar.conf
include /usr/share/sway/config.d/95-autostart-lxqt-policykit-agent.conf

View file

@ -23,7 +23,7 @@ set $menu dmenu_path | dmenu | xargs swaymsg exec --
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
output * bg /usr/share/backgrounds/default.png fill
#
# Example configuration:
#
@ -196,22 +196,4 @@ mode "resize" {
}
bindsym $mod+r mode "resize"
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
colors {
statusline #ffffff
background #323232
inactive_workspace #32323200 #32323200 #5c5c5c
}
}
include /etc/sway/config.d/*

View file

@ -0,0 +1,15 @@
# Key bindings for monitor brightness control with `light`
# Displays a notification with the current value if /usr/bin/notify-send is available
#
# Requires: light
# Recommends: libnotify
bindsym XF86MonBrightnessDown exec light -U 5 && \
command -v notify-send >/dev/null && \
notify-send -h string:x-canonical-private-synchronous:brightness \
-h int:value:$(light) -t 800 brightness
bindsym XF86MonBrightnessUp exec light -A 5 && \
command -v notify-send >/dev/null && \
notify-send -h string:x-canonical-private-synchronous:brightness \
-h int:value:$(light) -t 800 brightness

View file

@ -0,0 +1,17 @@
# Key bindings for media player control via MPRIS D-Bus interface
#
# Requires: playerctl
# Allow Play and Stop bindings even if the screen is locked
bindsym --locked {
XF86AudioPlay exec playerctl play-pause
XF86AudioStop exec playerctl stop
}
bindsym {
XF86AudioForward exec playerctl position +10
XF86AudioNext exec playerctl next
XF86AudioPause exec playerctl pause
XF86AudioPrev exec playerctl previous
XF86AudioRewind exec playerctl position -10
}

View file

@ -0,0 +1,11 @@
# Key bindings for pipewire and pulseaudio volume control
#
# Requires: pulseaudio-utils
# Allow volume controls even if the screen is locked
bindsym --locked {
XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
}

View file

@ -0,0 +1,6 @@
# A special mode for passing any keybindings to the focused application
mode "passthrough" {
bindsym $mod+Pause mode default
}
bindsym $mod+Pause mode "passthrough"

View file

@ -0,0 +1,15 @@
# apply mark for Xwayland and wayland native browser windows
for_window [class="Chromium-browser"] mark Browser
for_window [class="firefox"] mark Browser
for_window [app_id="Chromium-browser"] mark Browser
for_window [app_id="firefox"] mark Browser
# inhibit scrensaver for fullscreen browser windows
for_window [con_mark="Browser"] {
inhibit_idle fullscreen
}
# firefox wayland screensharing indicator
for_window [app_id="firefox" title="Firefox — Sharing Indicator"] {
floating enable
}

View file

@ -0,0 +1,4 @@
for_window [app_id="lxqt-policykit-agent"] {
floating enable
move position center
}

View file

@ -0,0 +1,17 @@
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
colors {
statusline #ffffff
background #323232
inactive_workspace #32323200 #32323200 #5c5c5c
}
}

View file

@ -0,0 +1,9 @@
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
position top
swaybar_command waybar
}

View file

@ -0,0 +1 @@
exec /usr/libexec/lxqt-policykit-agent