dotfiles

dotfiles - ryukamish edition
Log | Files | Refs | README

config (11800B)


      1 set $mod Mod4
      2 set $left h
      3 set $down j
      4 set $up k
      5 set $right l
      6 set $term foot
      7 set $menu fuzzel
      8 set $dmenu fuzzel -d
      9 set $file_manager thunar
     10 
     11 # Catppuccin colorscheme
     12 set {
     13 	$rosewater #f5e0dc
     14 	$flamingo  #f2cdcd
     15 	$pink 		 #f5c2e7
     16 	$mauve 		 #cba6f7
     17 	$red 			 #f38ba8
     18 	$maroon 	 #eba0ac
     19 	$peach  	 #fab387
     20 	$yellow 	 #f9e2af
     21 	$green 		 #a6e3a1
     22 	$teal 		 #94e2d5
     23 	$sky 			 #89dceb
     24 	$sapphire  #74c7ec
     25 	$blue 		 #89b4fa
     26 	$lavender  #b4befe
     27 	$text			 #cdd6f4
     28 	$base			 #1e1e2e
     29 }
     30 
     31 #													border
     32 client.focused			$base $lavender $text
     33 
     34 default_border pixel 2
     35 default_floating_border pixel 2
     36 titlebar_border_thickness 2
     37 titlebar_padding 6 4
     38 
     39 smart_gaps off
     40 smart_borders off
     41 
     42 gaps inner 3
     43 gaps outer 3
     44 
     45 focus_follows_mouse no
     46 focus_on_window_activation smart
     47 
     48 # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
     49 # ┃ Outputs                         												┃
     50 # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
     51 
     52 output * bg ~/.wallpaper fill
     53 output "Chimei Innolux Corporation 0x142B Unknown" {
     54   mode 1920x1080@60Hz
     55   pos 0 0
     56   scale 1.25
     57 }
     58 
     59 output 'Acer Technologies EK220Q H3 14301552C3W01' {
     60   mode 1920x1080@100Hz
     61 	pos -1920 0
     62 }
     63 
     64 # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
     65 # ┃ Inputs                                                  ┃
     66 # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
     67 
     68 # MSI touchpad
     69 input "1267:12930:PNP0C50:00_04F3:3282_Touchpad" {
     70   natural_scroll enabled
     71 	pointer_accel 0
     72 	dwt enabled # disable while typing
     73 	tap enabled # touch click also works with physical click
     74 	scroll_factor 0.4
     75 	click_method clickfinger
     76 	scroll_method two_finger
     77 	tap_button_map lrm # selection w/o physical click
     78 }
     79 
     80 input "type:keyboard" {
     81 	# swap capslock key to escape key
     82 	xkb_options caps:escape
     83   repeat_delay 200
     84   repeat_rate 30
     85 }
     86 
     87 # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
     88 # ┃ Keybinds                                                ┃
     89 # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
     90 
     91 # Open terminal
     92 bindsym $mod+Return exec $term
     93 
     94 # Kill focused window
     95 bindsym $mod+q kill
     96 
     97 # Start your launcher
     98 bindsym $mod+Space exec $menu
     99 
    100 # File manager
    101 bindsym $mod+e exec $file_manager
    102 
    103 # Open ungoogled chromium
    104 bindsym $mod+b exec /usr/bin/helium-browser \
    105 			--enable-features=WebUIDarkMode \
    106       --disable-features=WaylandFractionalScaleV1
    107 
    108 bindsym $mod+Shift+b exec /usr/bin/librewolf
    109 
    110 # Reload the configuration file
    111 bindsym $mod+Shift+c reload
    112 
    113 # Power menu
    114 bindsym $mod+p exec ~/.local/bin/sway-power
    115 
    116 # Recall last notifications
    117 bindsym $mod+grave       exec makoctl restore
    118 
    119 # Exit sway
    120 bindsym $mod+Shift+e exec swaynag -e bottom \
    121 			  -m 'EXIT SWAY SESSION' \
    122 			  -b 'YES' 'swaymsg exit' \
    123 			  -s 'NO'
    124 
    125 # === Display ===
    126 
    127 # Lid close handling
    128 bindswitch --reload --locked lid:on output eDP-1 disable
    129 bindswitch --reload --locked lid:off output eDP-1 enable
    130 
    131 # === Navigation ===
    132 
    133 # Move your focus around
    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 # Or use $mod+[up|down|left|right]
    139 bindsym $mod+Left focus left
    140 bindsym $mod+Down focus down
    141 bindsym $mod+Up focus up
    142 bindsym $mod+Right focus right
    143 
    144 # Move the focused window with the same, but add Shift
    145 bindsym $mod+Shift+$left move left
    146 bindsym $mod+Shift+$down move down
    147 bindsym $mod+Shift+$up move up
    148 bindsym $mod+Shift+$right move right
    149 # Ditto, with arrow keys
    150 bindsym $mod+Shift+Left move left
    151 bindsym $mod+Shift+Down move down
    152 bindsym $mod+Shift+Up move up
    153 bindsym $mod+Shift+Right move right
    154 
    155 # === Workspaces ===
    156 
    157 workspace 1   1:1   output DP-1 eDP-1
    158 workspace 2   2:2   output DP-1 eDP-1
    159 workspace 3   3:3  	output DP-1 eDP-1
    160 workspace 4   4:4   output DP-1 eDP-1
    161 workspace 5   5:5   output DP-1 eDP-1
    162 workspace 6   6:6   output HDMI-A-1
    163 workspace 7   7:7  	output HDMI-A-1
    164 workspace 8   8:8 	output HDMI-A-1
    165 workspace 9   9:9   output HDMI-A-1
    166 workspace 10  0:10   output HDMI-A-1
    167 
    168 # Switch to workspace
    169 bindsym $mod+1 workspace 1	1:1
    170 bindsym $mod+2 workspace 2	2:2
    171 bindsym $mod+3 workspace 3  3:3
    172 bindsym $mod+4 workspace 4  4:4
    173 bindsym $mod+5 workspace 5  5:5
    174 bindsym $mod+6 workspace 6  6:6
    175 bindsym $mod+7 workspace 7	7:7
    176 bindsym $mod+8 workspace 8  8:8
    177 bindsym $mod+9 workspace 9 	9:9
    178 bindsym $mod+0 workspace 10 10:10
    179 # Move focused container to workspace
    180 bindsym $mod+Shift+1 move container to workspace 1	1:1
    181 bindsym $mod+Shift+2 move container to workspace 2	2:2
    182 bindsym $mod+Shift+3 move container to workspace 3  3:3
    183 bindsym $mod+Shift+4 move container to workspace 4  4:4
    184 bindsym $mod+Shift+5 move container to workspace 5  5:5
    185 bindsym $mod+Shift+6 move container to workspace 6  6:6
    186 bindsym $mod+Shift+7 move container to workspace 7	7:7
    187 bindsym $mod+Shift+8 move container to workspace 8  8:8
    188 bindsym $mod+Shift+9 move container to workspace 9 	9:9
    189 bindsym $mod+Shift+0 move container to workspace 10 10:10
    190 
    191 # Make the current focus fullscreen
    192 bindsym $mod+f fullscreen
    193 
    194 # Toggle the current focus between tiling and floating mode
    195 bindsym $mod+Shift+space floating toggle
    196 
    197 # === Resizing containers ===
    198 
    199 mode "resize" {
    200     # left will shrink the containers width
    201     # right will grow the containers width
    202     # up will shrink the containers height
    203     # down will grow the containers height
    204     bindsym $left resize shrink width 10px
    205     bindsym $down resize grow height 10px
    206     bindsym $up resize shrink height 10px
    207     bindsym $right resize grow width 10px
    208 
    209     # Ditto, with arrow keys
    210     bindsym Left resize shrink width 10px
    211     bindsym Down resize grow height 10px
    212     bindsym Up resize shrink height 10px
    213     bindsym Right resize grow width 10px
    214 
    215     # Return to default mode
    216     bindsym Return mode "default"
    217     bindsym Escape mode "default"
    218 }
    219 bindsym $mod+r mode "resize"
    220 
    221 # Switch to previous workspace
    222 bindsym $mod+bracketleft workspace prev
    223 bindcode --whole-window $mod+275 workspace prev
    224 
    225 # Switch to next workspace
    226 bindsym $mod+bracketright workspace next
    227 bindcode --whole-window $mod+276 workspace next
    228 
    229 # Split view horizontally
    230 bindsym $mod+equal slith
    231 
    232 # Split view vertically
    233 bindsym $mod+minus slitv
    234 
    235 # === Layouts ===
    236 
    237 # Activate stacking layout
    238 bindsym $mod+Shift+s layout stacking
    239 
    240 # Activate tabbed layout
    241 bindsym $mod+t layout tabbed
    242 
    243 # Toggle split layout
    244 bindsym $mod+s layout toggle split
    245 
    246 
    247 # === Media keys ===
    248 
    249 # Switching to use with Pipewire
    250 bindsym --locked XF86AudioRaiseVolume exec wpctl set-volume -l 1.5 \@DEFAULT_AUDIO_SINK@ 5%+
    251 bindsym --locked XF86AudioLowerVolume exec wpctl set-volume -l 1.5 \@DEFAULT_AUDIO_SINK@ 5%-
    252 bindsym --locked XF86AudioMute exec wpctl set-mute \@DEFAULT_AUDIO_SINK@ toggle
    253 bindsym --locked XF86AudioMicMute exec wpctl set-mute \@DEFAULT_AUDIO_SOURCE@ toggle
    254 
    255 # Special keys to adjust brightness via brightnessctl
    256 bindsym --locked XF86MonBrightnessDown exec brightnessctl set -d intel_backlight -e1 -n2 5%-
    257 bindsym --locked XF86MonBrightnessUp exec brightnessctl set -d intel_backlight -e1 -n2 5%+
    258 bindsym --locked $mod+XF86MonBrightnessDown exec ~/.local/bin/waybar-brightness down
    259 bindsym --locked $mod+XF86MonBrightnessUp exec ~/.local/bin/waybar-brightness up
    260 
    261 # === Clipboard ===
    262 
    263 # Open clipboard (copying)
    264 bindsym $mod+v exec cliphist list \
    265 		    | $dmenu \
    266 		    | cliphist decode \
    267 		    | wl-copy
    268 
    269 # Open clipboard (deleting)
    270 bindsym $mod+Shift+v exec cliphist list \
    271 		     | $dmenu \
    272 		     | cliphist delete
    273 
    274 # === Screenshot ===
    275 
    276 # Screenshot whole screen
    277 bindsym Print                 exec --no-startup-id ~/.local/bin/screenshot
    278 
    279 # Screenshot region of screen
    280 bindsym Shift+Print           exec --no-startup-id ~/.local/bin/screenshot region
    281 
    282 # Screenshot current window
    283 bindsym Ctrl+Print            exec --no-startup-id ~/.local/bin/screenshot window
    284 
    285 # Parse text on screen and copy to clipboard
    286 bindsym $mod+Print            exec --no-startup-id slurp \
    287                               | xargs -I {} grim -s 2 -t png -g {} - \
    288                               | tesseract - - \
    289                               | wl-copy -n
    290 
    291 # wlsunset toggle
    292 bindsym $mod+n              exec pgrep wlsunset \
    293                                 && pkill wlsunset \
    294                                 || wlsunset -T 4500
    295 
    296 # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
    297 # ┃ Window Rules                                            ┃
    298 # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
    299 
    300 floating_modifier $mod normal
    301 
    302 set {
    303 	$float floating enable; shadows enable; border pixel 2
    304 	$float_resize floating enable; resize set 900 800 px; border pixel 2
    305 	$popup floating enable; sticky enable; shadows enable; resize set 400 300; move positon 1500 750
    306 }
    307 
    308 for_window [app_id = "floating"] $float
    309 for_window [app_id = "floating_update"] $float
    310 for_window [title = "^Open File$"] $float_resize
    311 for_window [title = "^Save File$"] $float_resize
    312 for_window [app_id = "pavucontrol"] $float_resize
    313 for_window [app_id = "TUI.float"] $float_resize
    314 for_window [title="^Picture-in-Picture$"] $popup
    315 for_window [title="^Picture in picture$"] $popup
    316 for_window [title="^launcher$"] $float_resize
    317 for_window [app_id="hayase"] inhibit_idle fullscreen
    318 for_window [app_id="xarchiver"] $float_resize
    319 
    320 # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
    321 # ┃ Status bar                                              ┃
    322 # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
    323 
    324 no_focus [app_id="waybar"]
    325 for_window [app_id="waybar" floating] {
    326 	move position cursor
    327 	move down 60px
    328 }
    329 
    330 bar {
    331   id mainbar
    332   output *
    333   swaybar_command waybar
    334 }
    335 
    336 # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
    337 # ┃ Autostarts                      												┃
    338 # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
    339 
    340 seat * xcursor_theme Vimix-White 32
    341 exec gsettings set org.gnome.desktop.interface cursor-theme Vimix-White
    342 exec gsettings set org.gnome.desktop.interface cursor-size 32
    343 
    344 #=== Services ===
    345 
    346 # DBUS
    347 exec dbus-update-activation-environment \
    348   --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
    349 
    350 # swayidle
    351 exec swayidle -w \
    352   timeout 600 'swaylock --daemonize' \
    353   timeout 900 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
    354   before-sleep 'swaylock --daemonize'
    355 
    356 # poweralertd
    357 exec poweralertd
    358 
    359 # clipboard
    360 exec wl-paste --type text --watch cliphist store
    361 exec wl-paste --type image --watch cliphist store
    362 
    363 # Desktop notification
    364 exec mako
    365 
    366 # === Other configs ===
    367 
    368 include /etc/sway/config.d/*