Browse Source

[sway] Bring config up to date

master
lara 3 years ago
parent
commit
c82ef3eb3a
  1. 19
      bin/import-gsettings
  2. 2
      config/dunst/dunstrc
  3. 38
      config/i3/common
  4. 3
      config/i3/config
  5. 21
      config/sway/config

19
bin/import-gsettings

@ -0,0 +1,19 @@
#!/bin/sh
# Inspired from https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
# usage: import-gsettings
config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
if [ ! -f "$config" ]; then exit 1; fi
gnome_schema="org.gnome.desktop.interface"
gtk_theme="$(sed -nE '/^gtk-theme-name/s/^gtk-theme-name\s*=\s*//p' "$config")"
icon_theme="$(sed -nE '/^gtk-icon-theme-name/s/^gtk-icon-theme-name\s*=\s*//p' "$config")"
cursor_theme="$(sed -nE '/^gtk-cursor-theme-name/s/^gtk-cursor-theme-name\s*=\s*//p' "$config")"
font_theme="$(sed -nE '/^gtk-font-name/s/^gtk-font-name\s*=\s*//p' "$config")"
gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
gsettings set "$gnome_schema" icon-theme "$icon_theme"
gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
gsettings set "$gnome_schema" font-name "$font_name"

2
config/dunst/dunstrc

@ -41,7 +41,7 @@
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 30
transparency = 20
# The height of the entire notification. If the height is smaller
# than the font height and padding combined, it will be raised

38
config/i3/common

@ -34,7 +34,18 @@ set $ws8 "8:8"
set $ws9 "9:9"
set $ws10 "10:10"
# Your preferred terminal emulator
set $term kitty --single-instance
set $term kitty --single-instance --instance-group i3
# Other utilities
set $backlightinc light -A 5
set $backlightdec light -U 5
set $volinc volcont --up
set $voldec volcont --down
set $voltog volcont --toggle
set $cliplumber cliplumber
set $mpdtoggle mpc toggle
set $mpdnext mpc next
set $mpdprev mpc prev
# Font for window titles and bar
font pango:Hack 8
@ -60,7 +71,7 @@ client.background $base07
# Basics:
# exit i3/sway
bindsym $mod+Shift+e exec $exit
bindsym $mod+Shift+q exec $exit
# lock session
bindsym Mod4+l exec $lock
@ -72,12 +83,24 @@ client.background $base07
bindsym $mod+Return exec $term
# call clipboard plumber
bindsym $mod+v exec cliplumber
bindsym $mod+v exec $cliplumber
# volume control
bindsym XF86AudioRaiseVolume exec amixer -q set Master 1%+ unmute
bindsym XF86AudioLowerVolume exec amixer -q set Master 1%- unmute
bindsym XF86AudioMute exec amixer -q set Master toggle
bindsym XF86AudioRaiseVolume exec $volinc
bindsym XF86AudioLowerVolume exec $voldec
bindsym XF86AudioMute exec $voltog
# MPD control
bindsym $mod+greater exec $mpdnext
bindsym $mod+less exec $mpdprev
bindsym $mod+p exec $mpdtoggle
bindsym XF86AudioNext exec $mpdnext
bindsym XF86AudioPrev exec $mpdprev
bindsym XF86AudioPlay exec $mpdtoggle
# brightness control (using Super because MSI weirdness)
bindsym Mod4+Up exec $backlightinc
bindsym Mod4+Down exec $backlightdec
# reload the configuration file
bindsym $mod+Shift+r reload
@ -208,6 +231,9 @@ bindsym $mod+Ctrl+$down resize grow height 5 px or 5 ppt
bindsym $mod+Ctrl+$up resize shrink height 5 px or 5 ppt
bindsym $mod+Ctrl+$right resize grow width 5 px or 5 ppt
# App specific settings
for_window [class="mpv"] floating enable
### Status Bar
#
# Read `man 5 sway-bar` for more information about this section.

3
config/i3/config

@ -269,3 +269,6 @@ set $lock i3lock -c 000000
# Application launcher
set $menu dmenu_run
# App specific settings
for_window [class="mpv"] floating enable

21
config/sway/config

@ -7,7 +7,7 @@
include ../i3/common
# exit sway (logs you out of your Wayland session)
set $exit 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'
set $exit swaymsg exit
# Screen locker
set $lock swaylock -f -c 000000
@ -16,17 +16,28 @@ set $lock swaylock -f -c 000000
# Note: it's recommended that you pass the final command to sway
set $menu dmenu_path | bemenu | xargs swaymsg exec --
# App specific settings
for_window [app_id="mpv"] floating enable
# Default wallpaper
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
# Apps autostart (run on each config reload)
exec_always {
import-gsettings
}
# Set keyboard layout
input * xkb_layout fr,ru
input * xkb_variant ,phonetic
input * xkb_layout fr,ru,fr
input * xkb_variant oss,phonetic,bepo
input * xkb_options grp:shift_caps_toggle
input * xkb_numlock enable
# Configure touchpad
input * tap enabled
# Configure touchpad (man 5 sway-input)
input type:touchpad {
tap enabled
tap_button_map lmr
}
############
# Examples #

Loading…
Cancel
Save