X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/configs/blobdiff_plain/ec80f07afe6f0985de1aff4d321292c93b3cb4ef..a60a7887ed404a7e5277775d8ff112850cc9cf9d:/.config/sway/config?ds=inline diff --git a/.config/sway/config b/.config/sway/config index d65a63e..7218b03 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -7,9 +7,9 @@ set $left h set $down j set $up k set $right l -set $term alacritty -set $term2 urxvt +set $term urxvt set $menu rofi -show run -display-run '> ' -display-window ' 🗔 ' +set $pass rofi-pass ### Output configuration # @@ -22,9 +22,13 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill # # You can get the names of your outputs by running: swaymsg -t get_outputs +# output DP-1 res 2560x1440 pos 1366,0 +# # 672 = 1440 - 768 +# output LVDS-1 pos 0,760 + output DP-1 res 2560x1440 pos 0,0 -# 597 = (2560/2) - (1366/2) -output LVDS-1 pos 597,1440 +# 672 = 1440 - 768 +output LVDS-1 pos 2560,760 ### Idle configuration @@ -37,18 +41,35 @@ exec swayidle \ # # Basics: # + +set $floating_term $term -name floating +for_window [class="URxvt" instance="floating"] floating enable + +set $mode_launch (⏎)urxvt | | (e)macs | (i)cecat/weasel +mode "$mode_launch" { + bindsym Return exec $floating_term, mode "default" + bindsym p exec $pass, mode "default" + bindsym e exec emacs, mode "default" + + # back to normal: Escape, or q + bindsym Escape mode "default" + bindsym q mode "default" +} + bindsym $mod+tab mode "$mode_launch" + bindsym XF86Launch1 mode "$mode_launch" + # start a terminal bindsym $mod+Return exec $term - bindsym $mod+Shift+Return exec $term2 + bindsym $mod+Shift+Return exec $floating_term # kill focused window bindsym $mod+Shift+q kill # start your launcher - bindsym $mod+d exec $menu + bindsym $mod+space exec $menu - # password manager - bindsym $mod2+space exec rofi-pass + # start your launcher + bindsym $mod+Shift+space exec $pass # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. @@ -154,16 +175,17 @@ exec swayidle \ bindsym $mod+f fullscreen # Toggle sticky-ness of the current (floating) window - bindsym $mod+$mod2+space sticky toggle + bindsym $mod+Shift+s sticky toggle # Toggle the current focus between tiling and floating mode - bindsym $mod+Shift+space floating toggle + bindsym $mod+Shift+f floating toggle # Swap focus between the tiling area and the floating area - bindsym $mod+space focus mode_toggle + bindsym $mod+grave focus mode_toggle # move focus to the parent container bindsym $mod+a focus parent + bindsym $mod+Shift+a focus child # # Scratchpad: # @@ -205,7 +227,7 @@ bindsym $mod+Shift+r mode "resize" # Power button # -set $mode_system System (l)ock, (e)xit sway, (s)uspend, (h)ibernate, (r)eboot, (S)hutdown +set $mode_system System (l)ock | (e)xit sway | (s)uspend | (h)ibernate | (r)eboot | (S)hutdown mode "$mode_system" { bindsym l exec swaylock, mode "default" bindsym e exec swaymsg exit, mode "default" @@ -221,6 +243,7 @@ mode "$mode_system" { } # bindsym XF86PowerOff mode "$mode_system" bindsym $mod+Shift+e mode "$mode_system" +bindsym XF86ScreenSaver exec swaylock # # Presentation mode @@ -246,14 +269,15 @@ mode notifications { # Screenshotting # -bindsym $mod+Shift+s mode screenshot -mode screenshot { +set $mode_screenshot (a)ll | (r)egion +mode "$mode_screenshot" { bindsym a exec grim $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default - bindsym r exec slurp | grim -g - $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default + bindsym r exec grim -g "$(slurp)" $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default bindsym Escape mode default bindsym q mode default } +bindsym Print mode "$mode_screenshot" # # Window configurations