pc0.config 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. # Default config for sway
  2. #
  3. # Copy this to ~/.config/sway/config and edit it to your liking.
  4. #
  5. # Read `man 5 sway` for a complete reference.
  6. ### Variables
  7. #
  8. # Logo key. Use Mod1 for Alt.
  9. set $mod Mod4
  10. # Home row direction keys, like vim
  11. set $left h
  12. set $down j
  13. set $up k
  14. set $right l
  15. # Your preferred terminal emulator
  16. set $term alacritty
  17. # Your preferred web browser
  18. set $browser firefox
  19. # Your preferred application launcher
  20. # Note: it's recommended that you pass the final command to sway
  21. set $menu dmenu_path | bemenu-run --fb '#000000' --ab '#000000' --tb '#000000' --nb '#000000' --tf '#ffffff' --hf '#ffffff' --hb '#2e8b57' --border 1 --bdr '#333333' --line-height 25 --hp 10 --fn 'DejaVu Sans Mono 10' --list 20 --center --no-spacing | xargs swaymsg exec
  22. ### Output configuration
  23. #
  24. # Default wallpaper (more resolutions are available in /gnu/store/npk7022f0c2i9cjidh7133pklh27hqv3-sway-1.0/share/backgrounds/sway/)
  25. # output * bg fill
  26. #
  27. # Example configuration:
  28. #
  29. # output HDMI-A-1 resolution 1920x1080 position 1920,0
  30. #
  31. # You can get the names of your outputs by running: swaymsg -t get_outputs
  32. output * bg #000000 solid_color
  33. exec swaymsg create_output HEADLESS-1
  34. output HEADLESS-1 resolution 1920x1080@240.084Hz
  35. exec swaymsg create_output HEADLESS-2
  36. output HEADLESS-2 resolution 3840x2160@240.084Hz
  37. exec swaymsg create_output HEADLESS-3
  38. output HEADLESS-3 resolution 3840x2160@240.084Hz
  39. exec swaymsg create_output HEADLESS-4
  40. output HEADLESS-4 resolution 640x1080@240.084Hz
  41. exec swaymsg create_output HEADLESS-5
  42. output HEADLESS-5 resolution 3840x2160@240.084Hz
  43. exec swaymsg create_output HEADLESS-6
  44. output HEADLESS-6 resolution 3840x2160@240.084Hz
  45. exec swaymsg create_output HEADLESS-7
  46. output HEADLESS-7 resolution 3840x2160@240.084Hz
  47. output HDMI-A-3 position 0 0
  48. output DP-3 position 2560 0
  49. output HEADLESS-1 position 6400 0
  50. # When yes, repeating a workspace switch command will switch back to the prior
  51. # workspace. For example, if you are currently on workspace 1, switch to
  52. # workspace 2, then invoke the workspace 2 command again, you will be returned
  53. # to workspace 1. Default is no.
  54. workspace_auto_back_and_forth yes
  55. workspace 11 output HDMI-A-2
  56. workspace 21 output HEADLESS-1
  57. workspace 31 output HEADLESS-2
  58. workspace 41 output HEADLESS-3
  59. workspace 51 output HEADLESS-4
  60. workspace 61 output HEADLESS-5
  61. workspace 71 output HEADLESS-6
  62. workspace 81 output HEADLESS-7
  63. ### Idle configuration
  64. #
  65. # Example configuration:
  66. #
  67. # exec swayidle -w \
  68. # timeout 300 'swaylock -f -c 000000' \
  69. # timeout 600 'swaymsg "output * dpms off"' \
  70. # resume 'swaymsg "output * dpms on"' \
  71. # before-sleep 'swaylock -f -c 000000'
  72. #
  73. # This will lock your screen after 300 seconds of inactivity, then turn off
  74. # your displays after another 300 seconds, and turn your screens back on when
  75. # resumed. It will also lock your screen before your computer goes to sleep.
  76. # exec swayidle -w \
  77. # timeout 600 'swaymsg "output * dpms off"' \
  78. # resume 'swaymsg "output * dpms on"'
  79. #
  80. # Clipboard
  81. #
  82. # https://github.com/yory8/clipman
  83. exec wl-paste -t text --watch clipman store
  84. exec wl-paste -p -t text --watch clipman store -P --histpath="~/.local/share/clipman-primary.json"
  85. bindsym $mod+y exec clipman pick -t wofi
  86. ### Input configuration
  87. #
  88. # Example configuration:
  89. #
  90. # input "2:14:SynPS/2_Synaptics_TouchPad" {
  91. # dwt enabled
  92. # tap enabled
  93. # natural_scroll enabled
  94. # middle_emulation enabled
  95. # }
  96. #
  97. # You can get the names of your inputs by running: swaymsg -t get_inputs
  98. # Read `man 5 sway-input` for more information about this section.
  99. ### Key bindings
  100. #
  101. # Basics:
  102. #
  103. # start a terminal
  104. bindsym $mod+Return exec $term
  105. # start a web browser
  106. bindsym $mod+Shift+w exec $browser
  107. bindsym $mod+Shift+m exec looking-glass-client-wrapper
  108. bindsym $mod+Shift+s exec bemenu-passmenu
  109. bindsym $mod+Shift+v exec virt-manager
  110. # kill focused window
  111. bindsym $mod+Shift+q kill
  112. # start your launcher
  113. bindsym $mod+d exec $menu
  114. # Drag floating windows by holding down $mod and left mouse button.
  115. # Resize them with right mouse button + $mod.
  116. # Despite the name, also works for non-floating windows.
  117. # Change normal to inverse to use left mouse button for resizing and right
  118. # mouse button for dragging.
  119. floating_modifier $mod normal
  120. bindsym button3 kill
  121. # reload the configuration file
  122. bindsym $mod+Shift+c reload
  123. # exit sway (logs you out of your Wayland session)
  124. 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 Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
  125. #
  126. # Moving around:
  127. #
  128. # Move your focus around
  129. bindsym $mod+$left focus left
  130. bindsym $mod+$down focus down
  131. bindsym $mod+$up focus up
  132. bindsym $mod+$right focus right
  133. # or use $mod+[up|down|left|right]
  134. bindsym $mod+Left focus left
  135. bindsym $mod+Down focus down
  136. bindsym $mod+Up focus up
  137. bindsym $mod+Right focus right
  138. # _move_ the focused window with the same, but add Shift
  139. bindsym $mod+Shift+$left move left
  140. bindsym $mod+Shift+$down move down
  141. bindsym $mod+Shift+$up move up
  142. bindsym $mod+Shift+$right move right
  143. # ditto, with arrow keys
  144. bindsym $mod+Shift+Left move left
  145. bindsym $mod+Shift+Down move down
  146. bindsym $mod+Shift+Up move up
  147. bindsym $mod+Shift+Right move right
  148. #
  149. # Workspaces:
  150. #
  151. # switch to workspace
  152. bindsym $mod+1 workspace 1
  153. bindsym $mod+2 workspace 2
  154. bindsym $mod+3 workspace 3
  155. bindsym $mod+4 workspace 4
  156. bindsym $mod+5 workspace 5
  157. bindsym $mod+6 workspace 6
  158. bindsym $mod+7 workspace 7
  159. bindsym $mod+8 workspace 8
  160. bindsym $mod+9 workspace 9
  161. bindsym $mod+0 workspace 10
  162. # move focused container to workspace
  163. bindsym $mod+Shift+1 move container to workspace 1
  164. bindsym $mod+Shift+2 move container to workspace 2
  165. bindsym $mod+Shift+3 move container to workspace 3
  166. bindsym $mod+Shift+4 move container to workspace 4
  167. bindsym $mod+Shift+5 move container to workspace 5
  168. bindsym $mod+Shift+6 move container to workspace 6
  169. bindsym $mod+Shift+7 move container to workspace 7
  170. bindsym $mod+Shift+8 move container to workspace 8
  171. bindsym $mod+Shift+9 move container to workspace 9
  172. bindsym $mod+Shift+0 move container to workspace 10
  173. # Note: workspaces can have any name you want, not just numbers.
  174. # We just use 1-10 as the default.
  175. bindsym $mod+Mod1+Right workspace next
  176. bindsym $mod+Mod1+Left workspace prev
  177. bindsym $mod+control+Right workspace next_on_output
  178. bindsym $mod+control+Left workspace prev_on_output
  179. # Kill all containers on a focused workspace.
  180. bindsym Control+$mod+Delete [workspace="__focused__"] kill
  181. bindsym $mod+o workspace back_and_forth
  182. #
  183. # Layout stuff:
  184. #
  185. # You can "split" the current object of your focus with
  186. # $mod+b or $mod+v, for horizontal and vertical splits
  187. # respectively.
  188. bindsym $mod+b splith
  189. bindsym $mod+v splitv
  190. # Switch the current container between different layout styles
  191. bindsym $mod+s layout stacking
  192. bindsym $mod+w layout tabbed
  193. bindsym $mod+e layout toggle split
  194. # Make the current focus fullscreen
  195. bindsym $mod+f fullscreen
  196. # Toggle the current focus between tiling and floating mode
  197. bindsym $mod+Shift+t floating toggle
  198. bindsym $mod+Shift+a sticky toggle
  199. # Swap focus between the tiling area and the floating area
  200. # bindsym $mod+space focus mode_toggle
  201. # move focus to the parent container
  202. bindsym $mod+a focus parent
  203. #
  204. # Scratchpad:
  205. #
  206. # Sway has a "scratchpad", which is a bag of holding for windows.
  207. # You can send windows there and get them back later.
  208. # Move the currently focused window to the scratchpad
  209. bindsym $mod+Shift+minus move scratchpad
  210. # Show the next scratchpad window or hide the focused scratchpad window.
  211. # If there are multiple scratchpad windows, this command cycles through them.
  212. bindsym $mod+minus scratchpad show
  213. #
  214. # Volume:
  215. #
  216. bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
  217. bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
  218. bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
  219. #
  220. # Brightness:
  221. #
  222. bindsym XF86Calculator exec brightness increase 5
  223. bindsym XF86HomePage exec brightness decrease 5
  224. bindsym XF86Mail exec brightness toggle
  225. #
  226. # Inputs:
  227. #
  228. # HDMI-1
  229. bindsym XF86AudioPrev exec sudo /home/oleg/.nix-profile/bin/ddcutil setvcp xF4 x0090 --i2c-source-addr=x50 --noverify
  230. # HDMI-2
  231. bindsym XF86AudioPlay exec sudo /home/oleg/.nix-profile/bin/ddcutil setvcp xF4 x0091 --i2c-source-addr=x50 --noverify
  232. # DP-3
  233. bindsym XF86AudioNext exec sudo /home/oleg/.nix-profile/bin/ddcutil setvcp xF4 x00d0 --i2c-source-addr=x50 --noverify
  234. #
  235. # Switch DP-3 on and off:
  236. #
  237. bindsym XF86Tools exec swaymsg "output DP-3 dpms on"
  238. bindsym XF86AudioStop exec swaymsg "output DP-3 dpms off"
  239. #
  240. # Screenshots:
  241. #
  242. # capture all screens
  243. bindsym Print exec grim -t png
  244. # capture the specified screen area
  245. bindsym Ctrl+Print exec grim -g "$(slurp -d)" -t png
  246. #
  247. # Notifications
  248. #
  249. bindsym $mod+n exec makoctl dismiss
  250. bindsym $mod+Shift+n exec makoctl dismiss --all
  251. #
  252. # Resizing containers:
  253. #
  254. mode "resize" {
  255. # left will shrink the containers width
  256. # right will grow the containers width
  257. # up will shrink the containers height
  258. # down will grow the containers height
  259. bindsym $left resize shrink width 10px
  260. bindsym $down resize grow height 10px
  261. bindsym $up resize shrink height 10px
  262. bindsym $right resize grow width 10px
  263. # ditto, with arrow keys
  264. bindsym Left resize shrink width 10px
  265. bindsym Down resize grow height 10px
  266. bindsym Up resize shrink height 10px
  267. bindsym Right resize grow width 10px
  268. # return to default mode
  269. bindsym Return mode "default"
  270. bindsym Escape mode "default"
  271. bindsym y resize set width 1920 px
  272. bindsym 2 exec /bin/sh -c 'swaymsg resize set width 320px; swaymsg resize set height 180px'
  273. bindsym 3 exec /bin/sh -c 'swaymsg resize set width 256px; swaymsg resize set height 144px'
  274. bindsym 4 exec /bin/sh -c 'swaymsg resize set width 640px; swaymsg resize set height 360px'
  275. bindsym 5 exec /bin/sh -c 'swaymsg resize set width 1280px; swaymsg resize set height 720px'
  276. bindsym 6 exec /bin/sh -c 'swaymsg resize set width 1920px; swaymsg resize set height 1080px'
  277. }
  278. bindsym $mod+r mode "resize"
  279. #
  280. # OBS:
  281. #
  282. mode "obs" {
  283. # switch to scene
  284. bindsym 0 exec /home/oleg/.local/share/chezmoi/dot_local/bin/executable_obs-websocket-http.sh edit scene scene-0
  285. bindsym 1 exec /home/oleg/.local/share/chezmoi/dot_local/bin/executable_obs-websocket-http.sh edit scene scene-1
  286. # return to default mode
  287. bindsym Return mode "default"
  288. bindsym Escape mode "default"
  289. }
  290. bindsym $mod+Shift+o mode "obs"
  291. bindsym $mod+u workspace 61
  292. bindsym $mod+i workspace 62
  293. #
  294. # Status Bar:
  295. #
  296. # Read `man 5 sway-bar` for more information about this section.
  297. #
  298. # big monitor: everything
  299. bar {
  300. output DP-3
  301. # Show bar only when mode key is pressed.
  302. mode hide
  303. position top
  304. colors {
  305. statusline #ffffff
  306. background #000000
  307. focused_workspace #66cdaa #2e8b57 #000000
  308. # active_workspace #333333 #333333 #888888
  309. inactive_workspace #000000 #000000 #ffffff
  310. urgent_workspace #eb709b #eb709b #ffffff
  311. }
  312. }
  313. # headless-1: can be viewed by wl-mirror
  314. bar {
  315. output HEADLESS-1
  316. # Show bar only when mode key is pressed.
  317. mode hide
  318. position bottom
  319. colors {
  320. statusline #ffffff
  321. background #000000
  322. focused_workspace #66cdaa #2e8b57 #000000
  323. # active_workspace #333333 #333333 #888888
  324. inactive_workspace #000000 #000000 #ffffff
  325. urgent_workspace #eb709b #eb709b #ffffff
  326. }
  327. }
  328. # headless-2: can be viewed by wl-mirror
  329. bar {
  330. output HEADLESS-2
  331. # Never show bar.
  332. mode invisible
  333. position bottom
  334. colors {
  335. statusline #ffffff
  336. background #000000
  337. focused_workspace #66cdaa #2e8b57 #000000
  338. # active_workspace #333333 #333333 #888888
  339. inactive_workspace #000000 #000000 #ffffff
  340. urgent_workspace #eb709b #eb709b #ffffff
  341. }
  342. }
  343. # headless-3: can be viewed by wl-mirror
  344. bar {
  345. output HEADLESS-3
  346. # Show bar only when mode key is pressed.
  347. mode hide
  348. position bottom
  349. colors {
  350. statusline #ffffff
  351. background #000000
  352. focused_workspace #66cdaa #2e8b57 #000000
  353. # active_workspace #333333 #333333 #888888
  354. inactive_workspace #000000 #000000 #ffffff
  355. urgent_workspace #eb709b #eb709b #ffffff
  356. }
  357. }
  358. # headless-4: can be viewed by wl-mirror
  359. bar {
  360. output HEADLESS-4
  361. # Show bar only when mode key is pressed.
  362. mode dock
  363. position bottom
  364. colors {
  365. statusline #ffffff
  366. background #000000
  367. focused_workspace #66cdaa #2e8b57 #000000
  368. # active_workspace #333333 #333333 #888888
  369. inactive_workspace #000000 #000000 #ffffff
  370. urgent_workspace #eb709b #eb709b #ffffff
  371. }
  372. }
  373. # headless-5: can be viewed by wl-mirror
  374. bar {
  375. output HEADLESS-5
  376. # Show bar only when mode key is pressed.
  377. mode dock
  378. position bottom
  379. # When the status_command prints a new line to stdout, swaybar updates.
  380. # The default just shows the current date and time.
  381. status_command exec /home/oleg/.local/bin/sensors-pc0.py
  382. colors {
  383. statusline #ffffff
  384. background #000000
  385. focused_workspace #66cdaa #2e8b57 #000000
  386. # active_workspace #333333 #333333 #888888
  387. inactive_workspace #000000 #000000 #ffffff
  388. urgent_workspace #eb709b #eb709b #ffffff
  389. }
  390. }
  391. # headless-7: can be viewed by wl-mirror
  392. bar {
  393. output HEADLESS-7
  394. # Show bar only when mode key is pressed.
  395. mode hide
  396. position bottom
  397. colors {
  398. statusline #ffffff
  399. background #000000
  400. focused_workspace #66cdaa #2e8b57 #000000
  401. # active_workspace #333333 #333333 #888888
  402. inactive_workspace #000000 #000000 #ffffff
  403. urgent_workspace #eb709b #eb709b #ffffff
  404. }
  405. }
  406. input * {
  407. xkb_layout custom,ru
  408. xkb_options grp:win_space_toggle,grp_led:scroll
  409. }
  410. input "2385:5860:Kingston_HyperX_Pulsefire_Raid" {
  411. accel_profile flat
  412. pointer_accel -0.5
  413. }
  414. # class border backgr. text indicator child_border
  415. client.focused #000000 #2e8b57 #000000 #000000 #000000
  416. client.focused_inactive #000000 #000000 #ffffff #000000 #000000
  417. client.unfocused #000000 #000000 #ffffff #000000 #000000
  418. client.urgent #bebebe #900000 #ffffff #900000 #900000
  419. client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
  420. client.background #000000
  421. # List windows properties:
  422. #
  423. # $ swaymsg -t get_tree
  424. for_window [title="Looking Glass"] border none
  425. for_window [title="Looking Glass"] resize set width 1920 px
  426. for_window [title="Wayland Output Mirror for HEADLESS-1"] border none
  427. for_window [title="Wayland Output Mirror for HEADLESS-2"] border normal
  428. for_window [title="Wayland Output Mirror for HEADLESS-3"] border normal
  429. for_window [title="Wayland Output Mirror for HEADLESS-4"] border none
  430. for_window [title="Wayland Output Mirror for HEADLESS-5"] border none
  431. for_window [title="Wayland Output Mirror for HEADLESS-6"] border none
  432. for_window [title="Wayland Output Mirror for HEADLESS-7"] border none
  433. for_window [title="xterm"] resize set width 1920 px
  434. for_window [title="Picture-in-Picture"] border none
  435. for_window [title="Picture-in-Picture"] floating enable
  436. for_window [instance="vncviewer"] border none
  437. for_window [title="Windowed Projector"] border none
  438. # for_window [title="Chatterino"] border none
  439. for_window [title="Usercard"] move position cursor