Cleaned up scripts folder and moved some stuff
This commit is contained in:
parent
d003263cb6
commit
02642f9dc6
33 changed files with 42 additions and 142 deletions
|
@ -4,3 +4,4 @@ set $mod Mod4
|
|||
set $term alacritty
|
||||
set $gnome-schema org.gnome.desktop.interface
|
||||
set $wallpaper ~/Pictures/Wallpapers/random/$(ls ~/Pictures/Wallpapers/random | sort -R | tail -n 1)
|
||||
set $scripts ~/.config/sway/scripts
|
||||
|
|
|
@ -6,8 +6,34 @@ bindsym $mod+Return exec $term
|
|||
# kill focused window
|
||||
bindsym $mod+w kill
|
||||
|
||||
# start your launcher
|
||||
bindsym $mod+Shift+p exec rofi-pass --bmarks
|
||||
# Modes for controlling gaps
|
||||
set $mode_gaps Gaps: (o) outer, (i) inner
|
||||
set $mode_gaps_outer Outer Gaps: j|k|0|r|i
|
||||
set $mode_gaps_inner Inner Gaps: j|k|0|r|o
|
||||
bindsym $mod+g mode "$mode_gaps"
|
||||
|
||||
mode "$mode_gaps" {
|
||||
bindsym o mode "$mode_gaps_outer"
|
||||
bindsym i mode "$mode_gaps_inner"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
mode "$mode_gaps_inner" {
|
||||
bindsym j gaps inner all minus 1
|
||||
bindsym k gaps inner all plus 1
|
||||
bindsym 0 gaps inner all set 0
|
||||
bindsym r gaps inner all set 10
|
||||
bindsym i mode "$mode_gaps_outer"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
mode "$mode_gaps_outer" {
|
||||
bindsym j gaps outer all minus 1
|
||||
bindsym k gaps outer all plus 1
|
||||
bindsym 0 gaps outer all set 0
|
||||
bindsym r gaps outer all set 10
|
||||
bindsym o mode "$mode_gaps_inner"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
# Drag floating windows by holding down $mod and left mouse button.
|
||||
# Resize them with right mouse button + $mod.
|
||||
|
@ -27,7 +53,7 @@ bindsym --locked XF86Search output eDP-1 toggle
|
|||
|
||||
# FZF
|
||||
# exit menu
|
||||
bindsym $mod+Shift+e exec $term --class fzf-launcher -e $HOME/Scripts/sway-exit.sh
|
||||
bindsym $mod+Shift+e exec $term --class fzf-launcher -e $scripts/exit.sh
|
||||
# launch a program
|
||||
bindsym $mod+d exec wofi
|
||||
bindsym $mod+Shift+d exec wofi --show run
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# vim:ft=i3config
|
||||
|
||||
exec {
|
||||
$HOME/Scripts/swayidle.sh
|
||||
$scripts/idle.sh
|
||||
autotiling
|
||||
redshift-gtk -m wayland
|
||||
telegram-desktop
|
||||
|
|
30
home/.config/sway/scripts/exit.sh
Executable file
30
home/.config/sway/scripts/exit.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
RESP=$(cat <<EOF | fzf +s --tac
|
||||
Shutdown
|
||||
Reboot
|
||||
Suspend
|
||||
Lock
|
||||
Exit
|
||||
EOF
|
||||
);
|
||||
|
||||
case "$RESP" in
|
||||
Shutdown)
|
||||
systemctl poweroff
|
||||
;;
|
||||
Reboot)
|
||||
systemctl reboot
|
||||
;;
|
||||
Suspend)
|
||||
systemctl suspend
|
||||
;;
|
||||
Lock)
|
||||
loginctl lock-session $(loginctl show-user $USER -p Sessions | cut -d'=' -f2)
|
||||
;;
|
||||
Exit)
|
||||
swaymsg exit
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
esac
|
13
home/.config/sway/scripts/idle.sh
Executable file
13
home/.config/sway/scripts/idle.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
swaylock="$HOME/.config/sway/scripts/lock.sh"
|
||||
screenon="swaymsg 'output * dpms on'"
|
||||
screenoff="swaymsg 'output * dpms off'"
|
||||
swayidle \
|
||||
lock "$swaylock" \
|
||||
unlock "pkill -9 swaylock" \
|
||||
timeout 300 "lqsd -d" \
|
||||
resume "lqsd -r" \
|
||||
timeout 600 "loginctl lock-session" \
|
||||
timeout 610 "$screenoff" \
|
||||
resume "$screenon; lqsd -r" \
|
||||
before-sleep "playerctl pause; loginctl lock-session" \
|
15
home/.config/sway/scripts/lock.sh
Executable file
15
home/.config/sway/scripts/lock.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
swaylock \
|
||||
--screenshots \
|
||||
--indicator \
|
||||
--clock \
|
||||
--datestr %Y-%m-%d \
|
||||
--effect-blur 6x10 \
|
||||
--inside-color "#2E3440" \
|
||||
--ring-color "#88C0D0" \
|
||||
--text-color "#FFFFFF" \
|
||||
--key-hl-color "#EBCB8B" \
|
||||
--inside-ver-color "#88C0D0" \
|
||||
--ring-ver-color "#88C0D0" \
|
||||
--ring-wrong-color "#BF616A" \
|
||||
--inside-wrong-color "#BF616A" \
|
34
home/.config/sway/scripts/run.sh
Executable file
34
home/.config/sway/scripts/run.sh
Executable file
|
@ -0,0 +1,34 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Set environment variables for Sway
|
||||
|
||||
# Firefox
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export MOZ_USE_XINPUT2=1
|
||||
export MOZ_WEBRENDER=1
|
||||
|
||||
# Fix java on wayland
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
|
||||
|
||||
# Enable qt5 theming and wayland support
|
||||
export QT_QPA_PLATFORMTHEME=qt5ct
|
||||
export QT_QPA_PLATFORM=wayland-egl
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
|
||||
# Fix redshift on wlroots
|
||||
export WLR_DRM_NO_ATOMIC=1
|
||||
|
||||
# Run sway
|
||||
sway
|
||||
|
||||
# Unset the variables after quitting Sway
|
||||
unset MOZ_ENABLE_WAYLAND=1
|
||||
unset MOZ_USE_XINPUT2=1
|
||||
unset MOZ_WEBRENDER=1
|
||||
unset _JAVA_AWT_WM_NONREPARENTING=1
|
||||
unset _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
|
||||
unset QT_QPA_PLATFORMTHEME=qt5ct
|
||||
unset QT_QPA_PLATFORM=wayland-egl
|
||||
unset QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
unset WLR_DRM_NO_ATOMIC=1
|
Loading…
Add table
Add a link
Reference in a new issue