Felix Delattre
ef9efc1fd2
Add .config/sway/bin/i3blocks-battery Add .config/sway/bin/toggletouchpad.sh Add .config/sway/blocks.conf Add .config/sway/config Add .config/sway/wallpaper.jpg
257 lines
8 KiB
Text
257 lines
8 KiB
Text
# sway config file (v4)
|
||
|
||
set $mod Mod4
|
||
|
||
# Font for window titles. Will also be used by the bar unless a different font
|
||
# is used in the bar {} block below.
|
||
#font pango:monospace 8
|
||
font pango:DejaVu Sans Mono 8
|
||
|
||
for_window [class="^."] border pixel 2
|
||
for_window [app_id="x-terminal-emulator"] border pixel 2
|
||
for_window [app_id="org.gnome.Nautilus"] border pixel 2
|
||
hide_edge_borders smart
|
||
|
||
titlebar_padding 1
|
||
titlebar_border_thickness 0
|
||
|
||
# Window border
|
||
set $bo #00adee
|
||
set $se #363636
|
||
set $ur #f7003a
|
||
set $dr #bb0020
|
||
set $t1 #888888
|
||
set $t2 #ffffff
|
||
set $bl #000001
|
||
|
||
client.focused $bl $bo $bl $t2
|
||
client.unfocused $bl $se $t1 $se
|
||
client.focused_inactive $bl $bl $bo $se
|
||
client.urgent $ur $ur $bl $ur
|
||
client.background $bl
|
||
|
||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||
floating_modifier $mod
|
||
|
||
# kill focused window
|
||
bindsym $mod+Shift+q kill
|
||
|
||
# rofi is a nice programm launcher
|
||
bindsym $mod+d exec rofi -show run
|
||
|
||
# Terminal shortcut
|
||
bindsym $mod+Return exec i3-sensible-terminal
|
||
|
||
# change focus
|
||
bindsym $mod+Left focus left
|
||
bindsym $mod+Down focus down
|
||
bindsym $mod+Up focus up
|
||
bindsym $mod+Right focus right
|
||
|
||
bindsym $mod+j focus left
|
||
bindsym $mod+k focus down
|
||
bindsym $mod+l focus up
|
||
bindsym $mod+semicolon focus right
|
||
|
||
# move focused window
|
||
bindsym $mod+Shift+Left move left
|
||
bindsym $mod+Shift+Down move down
|
||
bindsym $mod+Shift+Up move up
|
||
bindsym $mod+Shift+Right move right
|
||
|
||
bindsym $mod+Shift+j move left
|
||
bindsym $mod+Shift+k move down
|
||
bindsym $mod+Shift+l move up
|
||
bindsym $mod+Shift+semicolon move right
|
||
|
||
bindsym $mod+Shift+1 move workspace $workspace1
|
||
bindsym $mod+Shift+2 move workspace $workspace2
|
||
bindsym $mod+Shift+3 move workspace $workspace3
|
||
bindsym $mod+Shift+4 move workspace $workspace4
|
||
bindsym $mod+Shift+5 move workspace $workspace5
|
||
bindsym $mod+Shift+6 move workspace $workspace6
|
||
bindsym $mod+Shift+7 move workspace $workspace7
|
||
bindsym $mod+Shift+8 move workspace $workspace8
|
||
bindsym $mod+Shift+9 move workspace $workspace9
|
||
bindsym $mod+Shift+0 move workspace $workspace10
|
||
|
||
# split in horizontal orientation
|
||
# bindsym $mod+h split h
|
||
|
||
# split in vertical orientation
|
||
# bindsym $mod+v split v
|
||
|
||
# enter fullscreen mode for the focused container
|
||
bindsym $mod+f fullscreen toggle
|
||
|
||
# change container layout (stacked, tabbed, toggle split)
|
||
bindsym $mod+s layout stacking
|
||
bindsym $mod+w layout tabbed
|
||
bindsym $mod+e layout toggle split
|
||
|
||
# toggle tiling / floating
|
||
# bindsym $mod+Shift+space floating toggle
|
||
|
||
# change focus between tiling / floating windows
|
||
# bindsym $mod+space focus mode_toggle
|
||
|
||
# focus the parent container
|
||
# bindsym $mod+a focus parent
|
||
|
||
# focus the child container
|
||
#bindsym $mod+d focus child
|
||
|
||
set $workspace1 1
|
||
set $workspace2 2
|
||
set $workspace3 3
|
||
set $workspace4 4
|
||
set $workspace5 5
|
||
set $workspace6 6
|
||
set $workspace7 7
|
||
set $workspace8 8
|
||
set $workspace9 9
|
||
set $workspace10 10
|
||
|
||
workspace $workspace1 output LVDS-1
|
||
workspace $workspace2 output LVDS-1
|
||
workspace $workspace3 output LVDS-1
|
||
workspace $workspace4 output LVDS-1
|
||
workspace $workspace5 output LVDS-1
|
||
workspace $workspace6 output LVDS-1
|
||
workspace $workspace7 output LVDS-1
|
||
workspace $workspace8 output LVDS-1
|
||
workspace $workspace9 output LVDS-1
|
||
workspace $workspace10 output LVDS-1
|
||
|
||
# switch to workspace
|
||
bindsym $mod+1 workspace $workspace1
|
||
bindsym $mod+2 workspace $workspace2
|
||
bindsym $mod+3 workspace $workspace3
|
||
bindsym $mod+4 workspace $workspace4
|
||
bindsym $mod+5 workspace $workspace5
|
||
bindsym $mod+6 workspace $workspace6
|
||
bindsym $mod+7 workspace $workspace7
|
||
bindsym $mod+8 workspace $workspace8
|
||
bindsym $mod+9 workspace $workspace9
|
||
bindsym $mod+0 workspace $workspace10
|
||
|
||
# reload the configuration file
|
||
bindsym $mod+Shift+c reload
|
||
|
||
# resize window (you can also use the mouse for that)
|
||
mode "resize" {
|
||
# These bindings trigger as soon as you enter the resize mode
|
||
|
||
# Pressing left will shrink the window’s width.
|
||
# Pressing right will grow the window’s width.
|
||
# Pressing up will shrink the window’s height.
|
||
# Pressing down will grow the window’s height.
|
||
bindsym j resize shrink width 10 px or 10 ppt
|
||
bindsym k resize grow height 10 px or 10 ppt
|
||
bindsym l resize shrink height 10 px or 10 ppt
|
||
bindsym semicolon resize grow width 10 px or 10 ppt
|
||
|
||
# same bindings, but for the arrow keys
|
||
bindsym Left resize shrink width 10 px or 10 ppt
|
||
bindsym Down resize grow height 10 px or 10 ppt
|
||
bindsym Up resize shrink height 10 px or 10 ppt
|
||
bindsym Right resize grow width 10 px or 10 ppt
|
||
|
||
# back to normal: Enter or Escape
|
||
bindsym Return mode "default"
|
||
bindsym Escape mode "default"
|
||
}
|
||
|
||
bindsym $mod+r mode "resize"
|
||
|
||
bindsym $mod+Tab workspace next
|
||
bindsym $mod+Shift+Tab workspace prev
|
||
|
||
# bindsym $mod+Shift+n exec --no-startup-id ~/.config/sway/bin/monitors.sh one
|
||
# bindsym $mod+Shift+m exec --no-startup-id ~/.config/sway/bin/monitors.sh two
|
||
|
||
# Move workspaces on monitors
|
||
bindsym Shift+$mod+bracketright move workspace to output right
|
||
bindsym Shift+$mod+bracketleft move workspace to output left
|
||
|
||
# Pulse Audio controls
|
||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
|
||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
|
||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
|
||
|
||
# Sreen brightness controls
|
||
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
|
||
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
|
||
#bindsym XF86MonBrightnessUp exec ~/.config/sway/bin/brightness.sh increase # increase screen brightness
|
||
#bindsym XF86MonBrightnessDown exec ~/.config/sway/bin/brightness.sh decrease # decrease screen brightness
|
||
|
||
# Touchpad controls
|
||
# bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad
|
||
|
||
# Media player controls
|
||
bindsym XF86AudioPlay exec playerctl play
|
||
bindsym XF86AudioPause exec playerctl pause
|
||
bindsym XF86AudioNext exec playerctl next
|
||
bindsym XF86AudioPrev exec playerctl previous
|
||
|
||
# Set background wallpaper
|
||
exec --no-startup-id nm-applet --indicator
|
||
exec --no-startup-id blueman-applet
|
||
exec --no-startup-id volumeicon
|
||
exec_always --no-startup-id feh --bg-scale ~/.config/sway/personal/wallpaper.jpg
|
||
|
||
set $locker swaylock -c 000000 --daemonize --ignore-empty-password --show-failed-attempts
|
||
exec swayidle -w \
|
||
timeout 300 'swaymsg "output * dpms off"' \
|
||
timeout 305 "$lock_command" \
|
||
timeout 5 'if pgrep -x swaylock; then swaymsg "output * dpms off"; fi' \
|
||
resume 'swaymsg "output * dpms on"' \
|
||
before-sleep "$lock_command"
|
||
|
||
# Logout commands
|
||
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
|
||
mode "$mode_system" {
|
||
bindsym l exec --no-startup-id $locker, mode "default"
|
||
bindsym e exec --no-startup-id swaymsg exit, mode "default"
|
||
bindsym s exec --no-startup-id $locker && systemctl suspend, mode "default"
|
||
bindsym h exec --no-startup-id $locker && systemctl hibernate, mode "default"
|
||
bindsym r exec --no-startup-id systemctl reboot, mode "default"
|
||
bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
|
||
|
||
# back to normal: Enter or Escape
|
||
bindsym Return mode "default"
|
||
bindsym Escape mode "default"
|
||
}
|
||
bindsym $mod+Escape mode "$mode_system"
|
||
|
||
# Start swaybar to display a workspace bar
|
||
bar {
|
||
colors {
|
||
# Whole color settings
|
||
background #000000
|
||
statusline #ffffff
|
||
separator #666666
|
||
|
||
# Type border background font
|
||
focused_workspace #000000 #000000 #007fff
|
||
active_workspace #333333 #000000 #5f676a
|
||
inactive_workspace #000000 #000000 #888888
|
||
urgent_workspace #aa0000 #990000 #ffffff
|
||
}
|
||
|
||
position top
|
||
status_command i3blocks -c ~/.config/sway/blocks.conf
|
||
}
|
||
|
||
# Use XFCE services
|
||
exec --no-startup-id xfsettingsd --sm-client-disable &
|
||
|
||
# Use compose key for more characters
|
||
exec --no-startup-id setxkbmap -option compose:ralt
|
||
|
||
input type:keyboard {
|
||
xkb_layout us
|
||
xkb_variant intl
|
||
}
|
||
|
||
output "*" bg ~/.config/sway/wallpaper.jpg fill
|