config 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. #background
  2. #exec swaybg -i ~/pictures/insert_background_here.jpg
  3. exec /usr/libexec/xdg-desktop-portal -r & /usr/libexec/xdg-desktop-portal-wlr
  4. #bar for brigtness/sound/battery
  5. exec rm -f $WOBSOCK_VOLUME && mkfifo $WOBSOCK_VOLUME && tail -f $WOBSOCK_VOLUME | wob -c ~/.config/wob/wob-volume.ini
  6. exec rm -f $WOBSOCK_BRIGHTNESS && mkfifo $WOBSOCK_BRIGHTNESS && tail -f $WOBSOCK_BRIGHTNESS | wob -c ~/.config/wob/wob-brightness.ini
  7. exec rm -f $WOBSOCK_BATTERY && mkfifo $WOBSOCK_BATTERY && tail -f $WOBSOCK_BATTERY | wob -c ~/.config/wob/wob.ini
  8. #screens!
  9. output HDMI-A-1 pos 1920 0
  10. output eDP-1 pos 0 0
  11. workspace 1 output eDP-1
  12. workspace 2 output HDMI-A-1
  13. #directions
  14. set $up k
  15. set $down j
  16. set $left h
  17. set $right l
  18. set $Mod Mod4
  19. # use Mouse+Mod4 to drag floating windows to their wanted position
  20. floating_modifier $Mod
  21. # kill focused window
  22. bindsym $Mod+Shift+q kill
  23. bindsym Mod1+F4 kill, exec "~/scripts/shutdown_handler.sh"
  24. # change focus
  25. bindsym $Mod+$left focus left
  26. bindsym $Mod+$down focus down
  27. bindsym $Mod+$up focus up
  28. bindsym $Mod+$right focus right
  29. # alternatively, you can use the cursor keys:
  30. bindsym $Mod+Left focus left
  31. bindsym $Mod+Down focus down
  32. bindsym $Mod+Up focus up
  33. bindsym $Mod+Right focus right
  34. # move focused window - yes, vim bindings.
  35. bindsym $Mod+Shift+$left move left
  36. bindsym $Mod+Shift+$down move down
  37. bindsym $Mod+Shift+$up move up
  38. bindsym $Mod+Shift+$right move right
  39. # alternatively, you can use the cursor keys:
  40. bindsym $Mod+Shift+Left move left
  41. bindsym $Mod+Shift+Down move down
  42. bindsym $Mod+Shift+Up move up
  43. bindsym $Mod+Shift+Right move right
  44. # split in horizontal orientation
  45. bindsym $Mod+shift+v split h
  46. # split in vertical orientation
  47. bindsym $Mod+v split v
  48. # enter fullscreen mode for the focused container
  49. bindsym $Mod+f fullscreen toggle
  50. # change container layout (stacked, tabbed, toggle split)
  51. bindsym $Mod+s layout stacking
  52. bindsym $Mod+w layout tabbed
  53. bindsym $Mod+Shift+w layout toggle split
  54. # toggle tiling / floating
  55. bindsym $Mod+Shift+space floating toggle
  56. # switch to workspace
  57. bindsym $Mod+1 workspace 1
  58. bindsym $Mod+2 workspace 2
  59. bindsym $Mod+3 workspace 3
  60. bindsym $Mod+4 workspace 4
  61. bindsym $Mod+5 workspace 5
  62. bindsym $Mod+6 workspace 6
  63. bindsym $Mod+7 workspace 7
  64. bindsym $Mod+8 workspace 8
  65. bindsym $Mod+9 workspace 9
  66. bindsym $Mod+0 workspace 10
  67. bindsym $Mod+Tab workspace next
  68. bindsym $Mod+Shift+Tab workspace prev
  69. # move focused container to workspace
  70. bindsym $Mod+Shift+1 move container to workspace 1
  71. bindsym $Mod+Shift+2 move container to workspace 2
  72. bindsym $Mod+Shift+3 move container to workspace 3
  73. bindsym $Mod+Shift+4 move container to workspace 4
  74. bindsym $Mod+Shift+5 move container to workspace 5
  75. bindsym $Mod+Shift+6 move container to workspace 6
  76. bindsym $Mod+Shift+7 move container to workspace 7
  77. bindsym $Mod+Shift+8 move container to workspace 8
  78. bindsym $Mod+Shift+9 move container to workspace 9
  79. bindsym $Mod+Shift+0 move container to workspace 10
  80. # resize window (you can also use the mouse for that)
  81. mode "resize" {
  82. # These bindings trigger as soon as you enter the resize mode
  83. # Pressing left will shrink the window’s width.
  84. # Pressing right will grow the window’s width.
  85. # Pressing up will shrink the window’s height.
  86. # Pressing down will grow the window’s height.
  87. bindsym $left resize shrink width 10 px or 10 ppt
  88. bindsym $down resize shrink height 10 px or 10 ppt
  89. bindsym $up resize grow height 10 px or 10 ppt
  90. bindsym $right resize grow width 10 px or 10 ppt
  91. # same bindings, but for the arrow keys
  92. bindsym Left resize shrink width 10 px or 10 ppt
  93. bindsym Down resize shrink height 10 px or 10 ppt
  94. bindsym Up resize grow height 10 px or 10 ppt
  95. bindsym Right resize grow width 10 px or 10 ppt
  96. # back to normal: Enter or Escape
  97. bindsym Return mode "default"
  98. bindsym Escape mode "default"
  99. }
  100. #device specifig config
  101. input 1:1:AT_Translated_Set_2_keyboard {
  102. xkb_options caps:escape
  103. xkb_numlock enable
  104. xkb_layout de
  105. }
  106. input 1267:12299:ELAN0501:00_04F3:300B_Touchpad {
  107. tap enabled
  108. natural_scroll disabled
  109. dwt disabled
  110. }
  111. bindsym $Mod+r mode "resize"
  112. # reload the configuration file
  113. bindsym $Mod+Shift+c reload
  114. # restart sway inplace (preserves your layout/session, can be used to upgrade sway)
  115. bindsym $Mod+Shift+r restart
  116. bindsym $Mod+Space exec "cat ~/desktop/applications.txt | wofi --dmenu | dash"
  117. # exit sway
  118. bindsym $Mod+Shift+e exec "swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your sway session.' -b 'Yes, exit sway' 'swaymsg exit'"
  119. # PROGRAM SHORTCUTS
  120. bindsym $Mod+Return exec foot
  121. bindsym $Mod+e exec thunar
  122. bindsym Print exec grimshot save area ~/screenshots/$(date "+2023-11-25_20-27-33").png
  123. bindsym $Mod+Shift+Control+l exec swaylock
  124. # SCREEN BACKLIGHT
  125. bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- && brightnessctl g > $WOBSOCK_BRIGHTNESS
  126. bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+ && brightnessctl g > $WOBSOCK_BRIGHTNESS
  127. # VOLUME
  128. bindsym XF86AudioRaiseVolume exec ~/scripts/volume_handler.sh "+" "$WOBSOCK_VOLUME"
  129. bindsym XF86AudioLowerVolume exec ~/scripts/volume_handler.sh "-" "$WOBSOCK_VOLUME"
  130. bindsym XF86AudioMute exec ~/scripts/volume_handler.sh "m" "$WOBSOCK_VOLUME"
  131. # BATTERY INDICATOR
  132. bindsym $Mod+b exec acpi | grep -Po '(\d+)(?=%)' > $WOBSOCK_BATTERY
  133. # just some cosmetic options
  134. #class border backgr. text indicator child_border
  135. client.background #222222 #222222
  136. client.focused #33DD33 #222222 #FFFFFF #33DD33 #33DD33
  137. default_border pixel
  138. for_window {
  139. [app_id="connman-gtk"] floating enable
  140. [app_id="firefox"] inhibit_idle fullscreen
  141. [app_id="(?i)firefox"] inhibit_idle fullscreen
  142. [class="love-11.3"] floating enable
  143. [class="love-11.4"] floating enable
  144. [title="Panda"] floating enable
  145. [app_id="zenity"] floating enable
  146. [window_role="pop-up"] floating enable
  147. [window_role="bubble"] floating enable
  148. [window_role="dialog"] floating enable
  149. [window_type="dialog"] floating enable
  150. [title="(?:Open|Save) (?:File|Folder|As)"] floating enable
  151. [title="Sharing Indicator"] floating enable, move position 1500 0
  152. }