configuration.nix/modules/home/programs/sway/config

154 lines
4.0 KiB
Plaintext
Raw Normal View History

2023-07-03 09:30:16 +02:00
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
set $term kitty
set $menu bemenu-run | xargs swaymsg exec --
2023-07-28 08:16:12 +02:00
exec swaymsg "workspace 1; exec kitty"
2023-09-11 06:53:59 +02:00
exec swaymsg "workspace 2; exec brave"
2023-07-28 08:16:12 +02:00
2023-11-14 20:00:01 +01:00
exec systemctl --user restart bingwp.service
2023-10-01 19:18:18 +02:00
# Start a terminal
bindsym $mod+Return exec $term
2023-07-03 09:30:16 +02:00
2023-10-01 19:18:18 +02:00
# Kill focused window
bindsym $mod+Shift+c kill
2023-07-03 09:30:16 +02:00
2023-10-01 19:18:18 +02:00
# Start your launcher
bindsym $mod+p exec $menu
2023-07-03 09:30:16 +02:00
2023-10-01 19:18:18 +02:00
# Resize windows with mod + mouse
floating_modifier $mod normal
2023-07-03 09:30:16 +02:00
2023-10-01 19:18:18 +02:00
# Reload the configuration file
bindsym $mod+Shift+r reload
2023-07-03 09:30:16 +02:00
2023-10-01 19:18:18 +02:00
# Take screenshot of area and screen respectively
2023-11-06 16:22:21 +01:00
bindsym $mod+Shift+a exec screenshot area
bindsym $mod+Shift+s exec screenshot
2023-07-03 21:05:36 +02:00
2023-10-01 19:18:18 +02:00
# Lock screen
bindsym Alt+Shift+l exec swaylock
2023-07-08 09:22:58 +02:00
2023-10-20 23:57:21 +02:00
# Toggle screen
bindsym Alt+Shift+t output "eDP-1" toggle
2023-10-01 19:18:18 +02:00
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+q 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'
2023-07-03 09:30:16 +02:00
#
# Moving around:
#
2023-10-01 19:18:18 +02:00
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
2023-07-03 09:30:16 +02:00
#
# Workspaces:
#
2023-10-01 19:18:18 +02:00
# Switch to workspace
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
# Move focused container to workspace
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
2023-07-03 09:30:16 +02:00
#
# Layout stuff:
#
2023-10-01 19:18:18 +02:00
bindsym $mod+b splith
bindsym $mod+v splitv
2023-07-03 09:30:16 +02:00
2023-10-01 19:18:18 +02:00
bindsym $mod+f fullscreen
2023-07-03 09:30:16 +02:00
2023-10-01 19:18:18 +02:00
# Toggle the current focus between tiling and floating mode
2023-10-01 20:07:25 +02:00
bindsym $mod+Shift+t floating toggle
2023-07-03 09:30:16 +02:00
2023-10-01 19:18:18 +02:00
# Swap focus between the tiling area and the floating area
2023-10-01 20:07:25 +02:00
bindsym $mod+t focus mode_toggle
2023-07-03 09:30:16 +02:00
2023-10-01 19:18:18 +02:00
# Move focus to the parent container
bindsym $mod+a focus parent
2023-07-03 09:30:16 +02:00
#
# Scratchpad:
#
2023-10-01 19:18:18 +02:00
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
2023-07-03 09:30:16 +02:00
2023-10-01 19:18:18 +02:00
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
2023-07-03 09:30:16 +02:00
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
2023-07-06 13:24:01 +02:00
status_command while date +'%a %d/%m/%Y %R'; do sleep 60; done
2023-07-03 09:30:16 +02:00
colors {
statusline #ffffff
background #323232
inactive_workspace #32323200 #32323200 #5c5c5c
2023-10-01 19:18:18 +02:00
focused_workspace #a6e3a1 #a6e3a1 #000000
2023-07-03 09:30:16 +02:00
}
}
2023-10-01 19:18:18 +02:00
#
# Window styles:
#
# Focused window
client.focused #a6e3a1 #a6e3a1 #000000 #a6e3a1
# Focused but inactive window
client.focused_inactive #333333 #5f676a #ffffff #484e50
# Unfocused window
client.unfocused #333333 #222222 #888888 #292d2e
# Urgent window
client.urgent #2f343a #900000 #ffffff #900000
2023-07-03 19:27:45 +02:00
input "*"
{
xkb_layout us,bg
2023-10-01 20:07:25 +02:00
xkb_options grp:win_space_toggle
2023-07-03 19:27:45 +02:00
xkb_variant ,phonetic
}
2023-07-23 12:05:27 +02:00
exec dbus-sway-environment
2023-07-03 09:30:16 +02:00
include /etc/sway/config.d/*