Added laptop sway config to common
This commit is contained in:
126
common/config/sway/config
Normal file
126
common/config/sway/config
Normal file
@@ -0,0 +1,126 @@
|
||||
### Variables
|
||||
set $mod Mod4
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
|
||||
set $term foot
|
||||
set $menu bemenu-run -b -i --fn "Hack Nerd Font 10" --prompt "Run:" --list "8 up"
|
||||
|
||||
### Vague.nvim palette (no inline comments)
|
||||
set $b00 #141415
|
||||
set $b01 #1c1c24
|
||||
set $b02 #2f2f3d
|
||||
set $b03 #333738
|
||||
set $b04 #c3c3d5
|
||||
set $b05 #cdcdcd
|
||||
|
||||
set $red #d8647e
|
||||
set $yellow #f3be7c
|
||||
set $hint #7e98e8
|
||||
set $float #878787
|
||||
|
||||
### UI: font, borders, gaps, colors
|
||||
font Hack Nerd Font 10
|
||||
default_border pixel 3
|
||||
default_floating_border pixel 3
|
||||
smart_borders no_gaps
|
||||
gaps inner 0
|
||||
gaps outer 0
|
||||
|
||||
client.focused $hint $b02 $b05 $hint
|
||||
client.focused_inactive $b01 $b01 $b04 $b01
|
||||
client.unfocused $b01 $b01 $b03 $b01
|
||||
client.urgent $red $red $b05 $red
|
||||
client.placeholder $b01 $b01 $b04 $b01
|
||||
client.background $b00
|
||||
|
||||
for_window [floating] border pixel 2
|
||||
|
||||
### Output
|
||||
exec_always swaybg -c $b00
|
||||
|
||||
### Lock / idle / DPMS / suspend
|
||||
set $lock swaylock -f -c $b00
|
||||
|
||||
### Input
|
||||
input type:keyboard {
|
||||
xkb_layout "us"
|
||||
}
|
||||
|
||||
### Workspace behavior
|
||||
workspace_auto_back_and_forth yes
|
||||
bindsym $mod+Tab workspace back_and_forth
|
||||
|
||||
### Key bindings
|
||||
bindsym $mod+Return exec $term
|
||||
bindsym $mod+q kill
|
||||
bindsym $mod+Space exec $menu
|
||||
bindsym $mod+Shift+c reload
|
||||
bindsym $mod+Shift+e exec swaymsg exit
|
||||
|
||||
bindsym $mod+$left focus left
|
||||
bindsym $mod+$down focus down
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$right focus right
|
||||
|
||||
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+1 workspace number 1
|
||||
bindsym $mod+2 workspace number 2
|
||||
bindsym $mod+3 workspace number 3
|
||||
bindsym $mod+4 workspace number 4
|
||||
bindsym $mod+5 workspace number 5
|
||||
bindsym $mod+6 workspace number 6
|
||||
bindsym $mod+7 workspace number 7
|
||||
bindsym $mod+8 workspace number 8
|
||||
bindsym $mod+9 workspace number 9
|
||||
bindsym $mod+0 workspace number 10
|
||||
|
||||
bindsym $mod+Shift+1 move container to workspace number 1
|
||||
bindsym $mod+Shift+2 move container to workspace number 2
|
||||
bindsym $mod+Shift+3 move container to workspace number 3
|
||||
bindsym $mod+Shift+4 move container to workspace number 4
|
||||
bindsym $mod+Shift+5 move container to workspace number 5
|
||||
bindsym $mod+Shift+6 move container to workspace number 6
|
||||
bindsym $mod+Shift+7 move container to workspace number 7
|
||||
bindsym $mod+Shift+8 move container to workspace number 8
|
||||
bindsym $mod+Shift+9 move container to workspace number 9
|
||||
bindsym $mod+Shift+0 move container to workspace number 10
|
||||
|
||||
bindsym $mod+b splith
|
||||
bindsym $mod+v splitv
|
||||
|
||||
bindsym $mod+equal fullscreen
|
||||
bindsym $mod+Shift+f floating toggle
|
||||
bindsym $mod+f focus mode_toggle
|
||||
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
bindsym $mod+minus scratchpad show
|
||||
|
||||
### Media keys
|
||||
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
|
||||
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
|
||||
|
||||
### Screenshots
|
||||
bindsym Print exec grim -g "$(slurp)" - | wl-copy
|
||||
bindsym $mod+Print exec grim - | wl-copy
|
||||
|
||||
bar {
|
||||
colors {
|
||||
focused_workspace $b01 $b01 $b05
|
||||
}
|
||||
font pango:Hack Nerd Font 10
|
||||
position bottom
|
||||
status_command ~/.config/sway/status.sh
|
||||
}
|
||||
10
common/config/sway/status.sh
Executable file
10
common/config/sway/status.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
while :; do
|
||||
capacity=$(cat /sys/class/power_supply/BAT0/capacity 2>/dev/null || echo n/a)
|
||||
temp=$(awk '{printf "%d", $1/1000}' /sys/class/thermal/thermal_zone0/temp 2>/dev/null || echo n/a)
|
||||
datetime=$(date +'%a %d %b %T')
|
||||
|
||||
echo "${capacity}% | ${temp}C | ${datetime}"
|
||||
sleep 1
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user