ahkm

my swaywm config

Apr 1st, 2022
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 15.84 KB | None | 0 0
  1. ################################################################################
  2. #                                                                              
  3. #                                                                                
  4. #                                                                                
  5. #                                                                                
  6. #                                     ▓▓▓▓▓▓░                                    
  7. #                                ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓                                
  8. #                              ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓                            
  9. #                            ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓                          
  10. #                          ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒                        
  11. #                         ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓                        
  12. #                       ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓                      
  13. #                      ▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓                      
  14. #                     ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓                    
  15. #                     ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓                    
  16. #                      ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓                    
  17. #                     ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓                    
  18. #               ▓   ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▓▓▓▓    ▓              
  19. #           ▓▓      ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓    ▓▓▓▓▓▓▓▓░     ▓▓▓          
  20. #              ▓▓ ▓ ▓▓▓▓▓▓    ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓     ▓▓▓▓▓▓░ ▓ ▓▓            
  21. #                   ▓▓▓▓▓      ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓     ▓▓▓▓▓░   ▓              
  22. #          ▓▓       ▓▓▓▓▓      ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓     ▓▓▓▓▓      ▓▓▓▓        
  23. #                   ▓▓▓▓▓▓     ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓      ▓▓▓▓▓                  
  24. #         ▓▓▓▓       ▓▓▓▓▓      ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓      ▓▓▓▓        ▓▓▓▓        
  25. #         ▓▓▓▓        ▓▓▓▓▓      ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓       ▓▓▓▓▓        ▓▓▓▓        
  26. #         ▓▓▓▓░░░░░░░░░▓▓▓▓▓        ▓▓▓▓▓▓▓▓▓▓▓        ▓▓▓▓▓░░░░░░░░░▓▓▓▓        
  27. #         ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓                        ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓        
  28. #         ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓                    ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░        
  29. #                          ▓▓▓▓▓▓▓▓             ▓▓▓▓▓▓▓▓                        
  30. #                            ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓                          
  31. #                               ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓                              
  32. #                                       ▓▓▓                                      
  33. #                                                                                
  34. #                                                                                
  35. #                                                                                
  36. ##########################################################
  37. #                                                        #
  38. #                                                        #
  39. #                                                        #
  40. #    ____             _                    ___   ___     #
  41. #   |  _ \  __ _ _ __| | _____ _   _  ___ / _ \ / _ \    #
  42. #   | | | |/ _` | '__| |/ / _ \ | | |/ _ \ (_) | | | |   #
  43. #   | |_| | (_| | |  |   <  __/ |_| |  __/\__, | |_| |   #
  44. #   |____/ \__,_|_|  |_|\_\___|\__, |\___|  /_/ \___/    #
  45. #                           |___/                        #
  46. #                                                        #
  47. #                                                        #
  48. #                                                        #  
  49. ##########################################################
  50.  
  51.  
  52. # Default config for sway
  53. #
  54. # Copy this to ~/.config/sway/config and edit it to your liking.
  55. #
  56. # Read `man 5 sway` for a complete reference.
  57.  
  58. gaps inner 10
  59. gaps outer 10
  60. default_border pixel 2
  61.  
  62. input * {
  63.      xkb_layout "us,ar"
  64.      xkb_variant ",qwerty"
  65.      xkb_options "grp:win_space_toggle"
  66. }
  67. # cursor theme
  68. seat seat0 xcursor_theme Rage-Gothic 36
  69.  
  70. # Autostart Section
  71. #
  72. # fix pulseaudio
  73. exec pulseaudio --start;
  74. #exec pulseaudio --check;
  75. #exec pulseaudio -D;
  76.  
  77. # start notification
  78. exec --no-startup-id mako;
  79.  
  80. # Polkit
  81. exec /usr/libexec/polkit-mate-authentication-agent-1;
  82.  
  83. # Urxvt Settings
  84. #exec xrdb .Xresources;
  85. exec_always "systemctl --user import-environment; systemctl --user start sway-session.target"
  86. #
  87. ### Variables
  88. #
  89. # Logo key. Use Mod1 for Alt.
  90. set $mod Mod4
  91. # Home row direction keys, like vim
  92. set $left h
  93. set $down j
  94. set $up k
  95. set $right l
  96. # Your preferred terminal emulator
  97. set $term terminator
  98. # Your preferred application launcher
  99. # Note: pass the final command to swaymsg so that the resulting window can be opened
  100. # on the original workspace that the command was run on.
  101. # Start wofi
  102. #set $menu wofi --show run
  103. #
  104. # Start Rofi
  105. set $menu ulauncher
  106. ### Output configuration
  107. #
  108. # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
  109. #output * bg ~/Gallery/Gothic-wallpaper/gothic-wallpaper-hd_053939173_42.jpg  fill
  110. output * bg ~/Arts/gimp-shop/DarkEye-R/darkeye-R-BH-2-wallpaper.png  fill
  111. #
  112.  
  113. #####lockscreen######
  114.  
  115. bindsym $mod+Pause exec swaylock-blur --blur-sigma
  116.  
  117. # Example configuration:
  118. #
  119. #   output HDMI-A-1 resolution 1920x1080 position 1920,0
  120. #
  121. # You can get the names of your outputs by running: swaymsg -t get_outputs
  122.  
  123. ### Idle configuration
  124. #
  125. # Example configuration:
  126. #
  127. # exec swayidle -f -w  \
  128. #          timeout 1800 'swaylock-blur --blur-sigma \
  129. #          timeout 1805 'swaymsg "output * dpms off"' \
  130. #          resume 'swaymsg "output * dpms on"' \
  131. #          before-sleep 'swaylock-blur --blur-sigma'
  132. #
  133. # default swayidle
  134. #exec swayidle -w \
  135. #     timeout 300 'swaylock -f -c 2e2e2e' \
  136. #     timeout 600 'swaymsg "output * dpms off"' \
  137. #     resume 'swaymsg "output * dpms on"' \
  138. #     before-sleep 'swaylock -f -c 2e2e2e'
  139. #
  140. set $lock swaylock -f --screenshots --effect-blur 7x5 --fade-in 0.4
  141. exec swayidle -w timeout 10 '$lock' timeout 20 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep '$lock'
  142.  
  143. # This will lock your screen after 300 seconds of inactivity, then turn off
  144. # your displays after another 300 seconds, and turn your screens back on when
  145. # resumed. It will also lock your screen before your computer goes to sleep.
  146.  
  147. ### Input configuration
  148. #
  149. # Example configuration:
  150. #
  151. #   input "2:14:SynPS/2_Synaptics_TouchPad" {
  152. #       dwt enabled
  153. #       tap enabled
  154. #       natural_scroll enabled
  155. #       middle_emulation enabled
  156. #   }
  157. #
  158. # You can get the names of your inputs by running: swaymsg -t get_inputs
  159. # Read `man 5 sway-input` for more information about this section.
  160.  
  161. ### Key bindings
  162. #
  163. # Basics:
  164. #
  165.     # Start a terminal
  166.     bindsym $mod+Return exec $term
  167.  
  168.     # Kill focused window
  169.     bindsym $mod+q kill
  170.  
  171.     # Start your launcher
  172.     bindsym CTRL+Space exec $menu
  173.     bindsym $mod+d exec bemenu-run --tb "#2e2e2e" --tf "#ffffff" --nb "#3b3b3e"  --fb "#2e2e2e" --hb "#650615" --hf "#bcbcbc" --sf "#ffffff" --sb "#650615" --ff "#ffffff"
  174.  
  175.     # Drag floating windows by holding down $mod and left mouse button.
  176.     # Resize them with right mouse button + $mod.
  177.     # Despite the name, also works for non-floating windows.
  178.     # Change normal to inverse to use left mouse button for resizing and right
  179.     # mouse button for dragging.
  180.     floating_modifier $mod normal
  181.  
  182.     # Reload the configuration file
  183.     bindsym $mod+Shift+r reload
  184.  
  185.     # Exit sway (logs you out of your Wayland session)
  186.     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'
  187. #
  188. # Moving around:
  189. #
  190.     # Move your focus around
  191.     bindsym $mod+$left focus left
  192.     bindsym $mod+$down focus down
  193.     bindsym $mod+$up focus up
  194.     bindsym $mod+$right focus right
  195.     # Or use $mod+[up|down|left|right]
  196.     bindsym $mod+Left focus left
  197.     bindsym $mod+Down focus down
  198.     bindsym $mod+Up focus up
  199.     bindsym $mod+Right focus right
  200.  
  201.     # Move the focused window with the same, but add Shift
  202.     bindsym $mod+Shift+$left move left
  203.     bindsym $mod+Shift+$down move down
  204.     bindsym $mod+Shift+$up move up
  205.     bindsym $mod+Shift+$right move right
  206.     # Ditto, with arrow keys
  207.     bindsym $mod+Shift+Left move left
  208.     bindsym $mod+Shift+Down move down
  209.     bindsym $mod+Shift+Up move up
  210.     bindsym $mod+Shift+Right move right
  211. #
  212. # Workspaces:
  213. #
  214.     # Switch to workspace
  215.     bindsym $mod+1 workspace number 1
  216.     bindsym $mod+2 workspace number 2
  217.     bindsym $mod+3 workspace number 3
  218.     bindsym $mod+4 workspace number 4
  219.     bindsym $mod+5 workspace number 5
  220.     bindsym $mod+6 workspace number 6
  221.     bindsym $mod+7 workspace number 7
  222.     bindsym $mod+8 workspace number 8
  223.     bindsym $mod+9 workspace number 9
  224.     bindsym $mod+0 workspace number 10
  225.     # Move focused container to workspace
  226.     bindsym $mod+Shift+1 move container to workspace number 1
  227.     bindsym $mod+Shift+2 move container to workspace number 2
  228.     bindsym $mod+Shift+3 move container to workspace number 3
  229.     bindsym $mod+Shift+4 move container to workspace number 4
  230.     bindsym $mod+Shift+5 move container to workspace number 5
  231.     bindsym $mod+Shift+6 move container to workspace number 6
  232.     bindsym $mod+Shift+7 move container to workspace number 7
  233.     bindsym $mod+Shift+8 move container to workspace number 8
  234.     bindsym $mod+Shift+9 move container to workspace number 9
  235.     bindsym $mod+Shift+0 move container to workspace number 10
  236.     # Note: workspaces can have any name you want, not just numbers.
  237.     # We just use 1-10 as the default.
  238. #
  239. # Layout stuff:
  240. #
  241.     # You can "split" the current object of your focus with
  242.     # $mod+b or $mod+v, for horizontal and vertical splits
  243.     # respectively.
  244.     bindsym $mod+b splith
  245.     bindsym $mod+v splitv
  246.  
  247.     # Switch the current container between different layout styles
  248.     bindsym $mod+s layout stacking
  249.     bindsym $mod+w layout tabbed
  250.     bindsym $mod+e layout toggle split
  251.  
  252.     # Make the current focus fullscreen
  253.     bindsym $mod+f fullscreen
  254.  
  255.     # Toggle the current focus between tiling and floating mode
  256.     bindsym $mod+Shift+space floating toggle
  257.  
  258.     # Swap focus between the tiling area and the floating area
  259.     bindsym $mod+space focus mode_toggle
  260.  
  261.     # Move focus to the parent container
  262.     bindsym $mod+a focus parent
  263. #
  264. # Scratchpad:
  265. #
  266.     # Sway has a "scratchpad", which is a bag of holding for windows.
  267.     # You can send windows there and get them back later.
  268.  
  269.     # Move the currently focused window to the scratchpad
  270.     bindsym $mod+Shift+minus move scratchpad
  271.  
  272.     # Show the next scratchpad window or hide the focused scratchpad window.
  273.     # If there are multiple scratchpad windows, this command cycles through them.
  274.     bindsym $mod+minus scratchpad show
  275. #
  276. # Resizing containers:
  277. #
  278. mode "resize" {
  279.     # left will shrink the containers width
  280.     # right will grow the containers width
  281.     # up will shrink the containers height
  282.     # down will grow the containers height
  283.     bindsym $left resize shrink width 10px
  284.     bindsym $down resize grow height 10px
  285.     bindsym $up resize shrink height 10px
  286.     bindsym $right resize grow width 10px
  287.  
  288.     # Ditto, with arrow keys
  289.     bindsym Left resize shrink width 10px
  290.     bindsym Down resize grow height 10px
  291.     bindsym Up resize shrink height 10px
  292.     bindsym Right resize grow width 10px
  293.  
  294.     # Return to default mode
  295.     bindsym Return mode "default"
  296.     bindsym Escape mode "default"
  297. }
  298. bindsym $mod+r mode "resize"
  299.  
  300. # Pulse Audio controls
  301. bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume     0 +5% #increase sound volume
  302. bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume     0 -5% #decrease sound volume
  303. bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle     # mute sound
  304.  
  305. # Sreen brightness controls
  306. bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
  307. bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen  brightness
  308.  
  309. # Touchpad controls
  310. bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad
  311.  
  312. # Media player controls
  313. bindsym XF86AudioPlay exec playerctl play
  314. bindsym XF86AudioPause exec playerctl pause
  315. bindsym XF86AudioNext exec playerctl next
  316. bindsym XF86AudioPrev exec playerctl previous
  317.  
  318.  # Start Firefox
  319. bindsym $mod+Shift+w exec firefox
  320. #
  321. # Start File manager
  322. bindsym $mod+Shift+f exec pcmanfm-qt
  323. #
  324. # For screenshot
  325. #bindsym --release Print exec flameshot gui -p ~/Pictures/Screenshots
  326. #bindsym Print exec grim -c -t png
  327. #bindsym Print+Shift exec grim -g "$(slurp)" - | wl-copy
  328. #bindsym CTRL+Shift+r exec wf-recorder -f recording.mp4
  329. #bindsym CTRL+ALT+Shift+r exec wf-recorder -g "$(slurp)"
  330. # Take a screenshot with all output and save it into screenshots
  331. bindsym Print exec grim -t png ~/Pictures/Screenshot/$(date +%Y-%m-%d_%H-%m-%s).png
  332. # Take a Screenshot with the region select
  333. bindsym Shift+Print exec grim -t png -g "$(slurp)" ~/Pictures/Screenshot/$(date +%Y-%m-%d_%H-%m-%s).png
  334. #
  335. # Status Bar:
  336. #
  337. # Read `man 5 sway-bar` for more information about this section.
  338. bar {
  339.       swaybar_command waybar
  340.  colors {
  341.           background #2e2e2e
  342.           statusline #ffffff
  343.           separator  #3b3b3e
  344.  
  345.  
  346.        focused_workspace  #3b3b3e #3b3b3e #ffffff
  347.        active_workspace   #2e2e2e #3b3b3e #ffffff
  348.        inactive_workspace #2e2e2e #2e2e2e #ccb26a
  349.        urgent_workspace   #FF5555 #FF5555 #ffffff
  350.        binding_mode       #FF5555 #FF5555 #ffffff
  351.  
  352.     }
  353.  
  354.     }
  355. }
  356.  
  357.  
  358. ## class                 border  bground text    indicator child_border
  359. client.focused          #3b3b3e #3b3b3e #ffffff #650615   #3b3b3e
  360. client.focused_inactive #3b3b3e #3b3b3e #ffffff #3b3b3e   #3b3b3e
  361. client.unfocused        #2e2e2e #2e2e2e #BFBFBF #2e2e2e   #2e2e2e
  362. client.urgent           #3b3b3e #FF5555 #ffffff #FF5555   #FF5555
  363. client.placeholder      #2e2e2e #2e2e2e #ffffff #2e2e2e   #2e2e2e
  364.  
  365.  client.background       #ffffff
  366.  
  367. exec paplay ~/.local/sounds/welcomeback+startup.ogg;
  368. exec --no-startup-id redshift;
  369. # clipman
  370. exec wl-paste -t text --watch clipman store --no-persist
  371. include /etc/sway/config.d/*
  372.  
Advertisement
Add Comment
Please, Sign In to add comment