aboutsummaryrefslogtreecommitdiff
path: root/.config/sway
diff options
context:
space:
mode:
Diffstat (limited to '.config/sway')
-rw-r--r--.config/sway/config110
1 files changed, 59 insertions, 51 deletions
diff --git a/.config/sway/config b/.config/sway/config
index 27a841c..fcfad93 100644
--- a/.config/sway/config
+++ b/.config/sway/config
@@ -35,13 +35,9 @@ set $color13 #ff79c6
set $color14 #8be9fd
set $color15 #ffffff
-# set $background-color $color0
set $background-color #1e1f29
-# set $text-color $color6
set $text-color #f8f8f2
-# set $selection-color $color1
set $selection-color #44475a
-# set $accent-color $color12
set $accent-color #ffffff
set $laptop_screen eDP-1
@@ -55,26 +51,22 @@ client.placeholder $color0 $color0 $color5 $color0 $color0
client.background $color7
default_border pixel 8
-#xwayland enable
-xwayland disable
+xwayland enable
+# xwayland disable
# Applications
-set $term term
+set $term $(which footclient || which alacritty)
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
set $menu wofi --show drun -Iai -w 3
set $screenshot_fullscreen grim /dev/stdout | wl-copy
-#set $screenshot slurp \
-# | grim -l 0 -g - /dev/stdout \
-# | wl-copy
#set $screenshot flameshot gui
set $screenshot slurp \
| grim -l 0 -g - /dev/stdout \
| swappy -f - -o `date "+$HOME/screenshots/%Y-%m-%d_%R:%S.png"`
set $toggle_layout input "type:keyboard" xkb_switch_layout next
-set $lock swaylock
-set $toggle_bar pkill -SIGUSR1 waybar
+set $lock $(which hyprlock 2> /dev/null || which swaylock)
# brightnessctl --list | grep kbd
set $keyboard_backlight "asus::kbd_backlight"
@@ -83,6 +75,7 @@ set $keyboard_backlight "asus::kbd_backlight"
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg ~/Pictures/wall.png fill
output eDP-1 pos 1920 0
+output DP-1 pos -1920 0
output HDMI-A-1 pos 0 0
bindswitch --reload --locked lid:on output $laptop_screen disable
@@ -95,21 +88,21 @@ bindswitch --reload --locked lid:off output $laptop_screen enable
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
exec swayidle -w \
- timeout 300 'swaylock -f -c 000000' \
+ timeout 300 "$lock" \
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
- before-sleep 'swaylock -f -c 000000'
+ before-sleep "$lock"
### Input configuration
input "2821:6228:Asus_Keyboard" xkb_layout us,no
input "1:1:AT_Translated_Set_2_keyboard" xkb_layout no
input "1699:32801:Chicony_Saitek_Eclipse_II_Keyboard" xkb_layout gb,no
+input "6940:7076:Corsair_CORSAIR_K55_RGB_PRO_Gaming_Keyboard" xkb_layout no,gb
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
### Key bindings
# Basics:
-
# Start a terminal
bindsym $mod+Return exec $term
@@ -126,7 +119,7 @@ input "1699:32801:Chicony_Saitek_Eclipse_II_Keyboard" xkb_layout gb,no
# Lock screen
bindsym $mod+x exec $lock
- bindsym $mod+Shift+b exec $toggle_bar
+ bindsym $mod+Shift+b bar mode toggle
# Brightness
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
@@ -148,7 +141,7 @@ input "1699:32801:Chicony_Saitek_Eclipse_II_Keyboard" xkb_layout gb,no
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
-
+ # Media keys
bindsym --locked XF86AudioPlay exec playerctl play-pause
bindsym --locked XF86AudioNext exec playerctl next
bindsym --locked XF86AudioPrev exec playerctl previous
@@ -156,7 +149,9 @@ input "1699:32801:Chicony_Saitek_Eclipse_II_Keyboard" xkb_layout gb,no
# Toggle keyboard layout
bindsym $mod+m $toggle_layout
+ # bindsym $mod+Tab exec swayr switch-to-urgent-or-lru-window
bindsym $mod+Tab workspace back_and_forth
+ bindsym $mod+Shift+Tab exec swayr switch-workspace-or-window
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
@@ -180,10 +175,11 @@ input "1699:32801:Chicony_Saitek_Eclipse_II_Keyboard" xkb_layout gb,no
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
- # Or use $mod+[up|down|left|right]
- #bindsym $mod+Left focus left
+ # Or use $mod+[up|down]
bindsym $mod+Down focus down
bindsym $mod+Up focus up
+ # These conflict with changing workspace binds
+ #bindsym $mod+Left focus left
#bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
@@ -204,34 +200,33 @@ input "1699:32801:Chicony_Saitek_Eclipse_II_Keyboard" xkb_layout gb,no
#
# Workspaces:
#
- # 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
-
bindsym $mod+Left workspace prev
bindsym $mod+Right workspace next
- # 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
-
- bindsym $mod+Shift+Left move container to workspace prev
- bindsym $mod+Shift+Right move container to workspace next
+ # Change focus between workspaces
+ bindsym $mod+1 exec "swaysome focus 1"
+ bindsym $mod+2 exec "swaysome focus 2"
+ bindsym $mod+3 exec "swaysome focus 3"
+ bindsym $mod+4 exec "swaysome focus 4"
+ bindsym $mod+5 exec "swaysome focus 5"
+ bindsym $mod+6 exec "swaysome focus 6"
+ bindsym $mod+7 exec "swaysome focus 7"
+ bindsym $mod+8 exec "swaysome focus 8"
+ bindsym $mod+9 exec "swaysome focus 9"
+ bindsym $mod+0 exec "swaysome focus 0"
+
+ # Move containers between workspaces
+ bindsym $mod+Shift+1 exec "swaysome move 1"
+ bindsym $mod+Shift+2 exec "swaysome move 2"
+ bindsym $mod+Shift+3 exec "swaysome move 3"
+ bindsym $mod+Shift+4 exec "swaysome move 4"
+ bindsym $mod+Shift+5 exec "swaysome move 5"
+ bindsym $mod+Shift+6 exec "swaysome move 6"
+ bindsym $mod+Shift+7 exec "swaysome move 7"
+ bindsym $mod+Shift+8 exec "swaysome move 8"
+ bindsym $mod+Shift+9 exec "swaysome move 9"
+ bindsym $mod+Shift+0 exec "swaysome move 0"
+ bindsym $mod+o exec "swaysome next-output"
+ bindsym $mod+Shift+o exec "swaysome prev-output"
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
@@ -296,12 +291,23 @@ mode "resize" {
}
bindsym $mod+r mode "resize"
-
# Status Bar:
-# Read `man 5 sway-bar` for more information about this section.
bar {
- swaybar_command waybar
+ swaybar_command swaybar
+ status_command swayrbar
+ position top
+ font pango:Iosevka 12
+ height 40
+
+ colors {
+ statusline "$color4"
+ background "$color0"A0
+ separator $color8
+ focused_workspace $color8 "$color4"A0 $color11
+ inactive_workspace $color8 "$color0"A0 $color11
+ urgent_workspace $color8 "$color1"A0 $color11
+ }
}
input "type:touchpad" {
@@ -333,14 +339,16 @@ exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
-#exec pactl load-module module-null-sink media.class=Audio/Sink sink_name=my-sink channel_map=surround-51
-#exec pactl load-module module-null-sink media.class=Audio/Source/Virtual sink_name="my-source" channel_map=front-left,front-right
-#exec pactl load-module module-null-sink media.class=Audio/Duplex sink_name="Main thing" audio.position=FL,FR,RL,RR
+exec pactl load-module module-null-sink media.class=Audio/Sink sink_name=my-sink channel_map=surround-51
+exec pactl load-module module-null-sink media.class=Audio/Source/Virtual sink_name="my-source" channel_map=front-left,front-right
+exec pactl load-module module-null-sink media.class=Audio/Duplex sink_name="Main thing" audio.position=FL,FR,RL,RR
exec export SDL_VIDEODRIVER=wayland
exec export _JAVA_AWT_WM_NONREPARENTING=1
exec export QT_QPA_PLATFORM=wayland
exec export XDG_CURRENT_DESKTOP=sway
exec export XDG_SESSION_DESKTOP=sway
+exec "swaysome init 1"
+exec "swayrd"
include /etc/sway/config.d/*