config 6.2 KB

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