Allow monitor hotplug and lock screen on suspend

This commit is contained in:
coolneng 2020-03-10 04:00:55 +01:00
parent c0e0786a09
commit e139aac27b
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
5 changed files with 44 additions and 18 deletions

View File

@ -19,7 +19,6 @@ set -x ZPOOL_VDEV_NAME_PATH 1
# Aliases # Aliases
alias f "fff" alias f "fff"
alias peerflix "peerflix -d" alias peerflix "peerflix -d"
alias xclip "xclip -selection clipboard"
alias xi "xbps-install -S" alias xi "xbps-install -S"
alias xu "xbps-install -Su" alias xu "xbps-install -Su"
alias xc "xbps-remove -o" alias xc "xbps-remove -o"

View File

@ -0,0 +1,8 @@
{
output eDP-1 disable
output HDMI-A-2 enable
}
{
output eDP-1 enable mode 1366x768
}

View File

@ -10,6 +10,7 @@ alias carlos carlosrodriguez@ugr.es
alias mari mjesusrodriguez@ugr.es alias mari mjesusrodriguez@ugr.es
alias bea beap@ugr.es alias bea beap@ugr.es
alias jorge jsguerrero@ugr.es alias jorge jsguerrero@ugr.es
alias boras rafagrosso@ugr.es
# Uni students # Uni students
alias elenche elenche@correo.ugr.es alias elenche elenche@correo.ugr.es

View File

@ -1,5 +1,5 @@
host zion host zion
user coolneng user coolneng
hostname 192.168.1.2 hostname 10.8.0.1
port 22 port 22
identityfile ~/.ssh/zion identityfile ~/.ssh/zion

View File

@ -23,7 +23,7 @@ set $menu /bin/rofi -show drun | xargs swaymsg exec --
### Output configuration ### Output configuration
# #
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /home/coolneng/Photos/Wallpapers/d2a0wsarpmx21.jpg fill output * bg ~/Photos/Wallpapers/d2a0wsarpmx21.jpg fill
# #
# Example configuration: # Example configuration:
# #
@ -58,8 +58,10 @@ output * bg /home/coolneng/Photos/Wallpapers/d2a0wsarpmx21.jpg fill
# #
# You can get the names of your inputs by running: swaymsg -t get_inputs # You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section. # Read `man 5 sway-input` for more information about this section.
# Keyboard layout
input * xkb_layout "es" input * xkb_layout "es"
# Touchpad settings
input "1739:29859:Synaptics_TM2985-009" { input "1739:29859:Synaptics_TM2985-009" {
dwt enabled dwt enabled
tap enabled tap enabled
@ -237,6 +239,9 @@ exec_always {
gsettings set $gnome-schema cursor-theme 'Paper' gsettings set $gnome-schema cursor-theme 'Paper'
gsettings set $gnome-schema gtk-font 'Roboto 10' gsettings set $gnome-schema gtk-font 'Roboto 10'
} }
# Enable floating windows
for_window [app_id="mpv"] floating enable
for_window [app_id="imv"] floating enable
# #
# Special keys # Special keys
@ -261,19 +266,30 @@ exec_always {
bindsym $mod+c exec clipman pick -t rofi bindsym $mod+c exec clipman pick -t rofi
# grim # grim
bindsym Print exec grim bindsym Print exec grim
# power management # power menu
bindsym $mod+Pause mode "$Pause-break" bindsym $mod+Pause mode "$Pause-break"
set $Pause-break (p) poweroff, (r) reboot set $Pause-break (p) poweroff, (r) reboot
mode "$Pause-break" { mode "$Pause-break" {
bindsym s exec --no-startup-id sudo shutdown -h now, mode "default" bindsym s exec --no-startup-id sudo shutdown -h now, mode "default"
bindsym r exec --no-startup-id sudo shutdown -r now, mode "default" bindsym r exec --no-startup-id sudo shutdown -r now, mode "default"
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
# lock screen on suspend
set $lock_bg ~/Photos/Wallpapers/wallhaven-638719.png
bindsym $mod+End exec swaylock -i $lock_bg
exec swayidle -w \
timeout 300 'swaylock -f -c 000000 -i $lock_bg' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -c 000000 -i $lock_bg'
# #
# Autostart programs # Autostart programs
# #
@ -281,20 +297,22 @@ mode "$Pause-break" {
exec wl-paste -t text --watch clipman store exec wl-paste -t text --watch clipman store
# syncthing # syncthing
exec syncthing -no-browser -home="$HOME/.config/syncthing" exec syncthing -no-browser -home="$HOME/.config/syncthing"
# emacs # wireguard
assign [class="Emacs"] $workspace3 exec doas wg-quick up /etc/wireguard/wg0.conf
exec emacs # kanshi
exec kanshi
# tmux
assign [app_id="tmux"] $workspace1
exec kitty --class tmux -- tmuxp load ~/.tmuxp/local.yaml
# firefox # firefox
assign [app_id="firefox"] $workspace2 assign [app_id="firefox"] $workspace2
exec firefox exec firefox
# tmuxp # emacs
assign [app_id="kitty"] $workspace1 assign [class="Emacs"] $workspace3
exec kitty -- tmuxp load ~/.tmuxp/local.yaml exec emacs
# #
# Program behaviour # Program behaviour
# #
# Enable floating windows
for_window [app_id="mpv"] floating enable
include /etc/sway/config.d/* include /etc/sway/config.d/*