updated sway configs for multiple devices

This commit is contained in:
dalahast 2020-05-25 11:33:07 +02:00
parent 7926055261
commit 86369f52b2
3 changed files with 117 additions and 24 deletions

@ -11,11 +11,20 @@ set {
$right l $right l
$term kitty $term kitty
$menu rofi -show drun -icon-theme "Papirus-Dark" -show-icons | xargs swaymsg exec -- $menu rofi -show drun -icon-theme "Papirus-Dark" -show-icons | xargs swaymsg exec --
$windowmenu rofi -show window -icon-theme "Papirus-Dark" -show-icons
$gnome-schema org.gnome.desktop.interface $gnome-schema org.gnome.desktop.interface
$gtk_theme "Adapta-Nokto-Eta" $gtk_theme "Adapta-Nokto-Eta"
$icon_theme "Papirus-Dark" $icon_theme "Papirus-Dark"
$bg ~/Pictures/drain.jpg $bg ~/Pictures/drain.png
$lockscreen exec '~/.local/bin/lockscreen' $lockscreen exec '~/.local/bin/lockscreen'
# Heads
# For desktop
$primary DP-1
$portrait DVI-D-1
# For dankpad
#$primary LVDS-1
# For thonkpad
#$primary eDP-1
} }
# #
@ -25,6 +34,7 @@ exec_always --no-startup-id {
gsettings set $gnome-schema gtk-theme $gtk_theme gsettings set $gnome-schema gtk-theme $gtk_theme
gsettings set $gnome-schema icon-theme $icon_theme gsettings set $gnome-schema icon-theme $icon_theme
mako --anchor bottom-right > /tmp/mako.log 2>&1 mako --anchor bottom-right > /tmp/mako.log 2>&1
swaymsg focus output $primary
swayidle -w timeout 1200 "$lockscreen"\ swayidle -w timeout 1200 "$lockscreen"\
timeout 1201 'swaymsg "output * dpms off"'\ timeout 1201 'swaymsg "output * dpms off"'\
resume 'swaymsg "output * dpms on"'\ resume 'swaymsg "output * dpms on"'\
@ -34,7 +44,16 @@ exec_always --no-startup-id {
# #
### Output configuration ### Output configuration
# #
# Set desktop background # For desktop
output $primary pos 1050 200 res 1920x1200
output $portrait pos 0 0 res 1680x1050
output $portrait transform 270
# For dankpad
#output $primary pos 0 0 res 1600x900
# For thonkpad
#output $primary pos 0 0 res 1920x1080
# Set desktop background for all heads
output * bg $bg fill output * bg $bg fill
# #
@ -50,6 +69,7 @@ output * bg $bg fill
# Start your launcher # Start your launcher
bindsym $mod+d exec $menu bindsym $mod+d exec $menu
bindsym $mod+shift+d exec $windowmenu
# Drag floating windows by holding down $mod and left mouse button. # Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod. # Resize them with right mouse button + $mod.
@ -102,17 +122,44 @@ bindsym {
# Workspaces: # Workspaces:
# #
# Switch to workspace # Switch to workspace
bindsym $mod+1 workspace 1 # For multihead with switching script
bindsym $mod+2 workspace 2 bindsym $mod+1 exec switchws.py 1
bindsym $mod+3 workspace 3 bindsym $mod+2 exec switchws.py 2
bindsym $mod+4 workspace 4 bindsym $mod+3 exec switchws.py 3
bindsym $mod+5 workspace 5 bindsym $mod+4 exec switchws.py 4
bindsym $mod+6 workspace 6 bindsym $mod+5 exec switchws.py 5
bindsym $mod+7 workspace 7 bindsym $mod+6 exec switchws.py 6
bindsym $mod+8 workspace 8 bindsym $mod+7 exec switchws.py 7
bindsym $mod+9 workspace 9 bindsym $mod+8 exec switchws.py 8
bindsym $mod+0 workspace 10 bindsym $mod+9 exec switchws.py 9
bindsym $mod+t workspace tg bindsym $mod+0 exec switchws.py 10
# For single head configs
# bindsym $mod+1 workspace 1
# bindsym $mod+2 workspace 2
# bindsym $mod+3 workspace 3
# bindsym $mod+4 workspace 4
# bindsym $mod+5 workspace 5
# bindsym $mod+6 workspace 6
# bindsym $mod+7 workspace 7
# bindsym $mod+8 workspace 8
# bindsym $mod+9 workspace 9
# bindsym $mod+0 workspace 10
# Old manual switching for extra head
# bindsym $mod+Control+1 workspace P1
# bindsym $mod+Control+2 workspace P2
# bindsym $mod+Control+3 workspace P3
# bindsym $mod+Control+4 workspace P4
# bindsym $mod+Control+5 workspace P5
# bindsym $mod+Control+6 workspace P6
# bindsym $mod+Control+7 workspace P7
# bindsym $mod+Control+8 workspace P8
# bindsym $mod+Control+9 workspace P9
# bindsym $mod+Control+0 workspace P10
bindsym $mod+t workspace comm
# Move focused container to workspace # Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1 bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2 bindsym $mod+Shift+2 move container to workspace 2
@ -124,6 +171,45 @@ bindsym {
bindsym $mod+Shift+8 move container to workspace 8 bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9 bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10 bindsym $mod+Shift+0 move container to workspace 10
bindsym $mod+Shift+Control+1 move container to workspace P1
bindsym $mod+Shift+Control+2 move container to workspace P2
bindsym $mod+Shift+Control+3 move container to workspace P3
bindsym $mod+Shift+Control+4 move container to workspace P4
bindsym $mod+Shift+Control+5 move container to workspace P5
bindsym $mod+Shift+Control+6 move container to workspace P6
bindsym $mod+Shift+Control+7 move container to workspace P7
bindsym $mod+Shift+Control+8 move container to workspace P8
bindsym $mod+Shift+Control+9 move container to workspace P9
bindsym $mod+Shift+Control+0 move container to workspace P10
# Workspace-monitor assignments
workspace P1 output $portrait
workspace P2 output $portrait
workspace P3 output $portrait
workspace P4 output $portrait
workspace P5 output $portrait
workspace P6 output $portrait
workspace P7 output $portrait
workspace P8 output $portrait
workspace P9 output $portrait
workspace P10 output $portrait
workspace comm output $portrait
# For single head devices
#workspace comm output $primary
workspace 1 output $primary
workspace 2 output $primary
workspace 3 output $primary
workspace 4 output $primary
workspace 5 output $primary
workspace 6 output $primary
workspace 7 output $primary
workspace 8 output $primary
workspace 9 output $primary
workspace 10 output $primary
# Assign programs to workspaces
assign [app_id="evolution"] comm
assign [instance="telegram-desktop"] comm
# #
# Layout stuff: # Layout stuff:
# #
@ -206,6 +292,7 @@ bindsym $mod+r mode "resize"
focus_follows_mouse yes focus_follows_mouse yes
focus_wrapping false focus_wrapping false
popup_during_fullscreen leave_fullscreen popup_during_fullscreen leave_fullscreen
focus_on_window_activation focus
# #
### Look and feel ### Look and feel
@ -218,11 +305,11 @@ gaps outer 4
# Title Bar # Title Bar
# #
titlebar_padding 1 titlebar_padding 1
font "Noto Sans Mono 8" font "Cantarell 8"
# #
# Font # Font
# #
font pango:Noto Sans 12px font pango: Cantarell 12px
# #
# Borders # Borders
# #

@ -1,12 +1,12 @@
{ {
"layer": "top", // Waybar at top layer "layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right) "position": "top", // Waybar position (top|bottom|left|right)
"height": 20, // Waybar height (to be removed for auto height) "height": 16, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width // "width": 1280, // Waybar width
// Choose the order of the modules // Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode"], "modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["sway/window"], "modules-center": ["sway/window"],
"modules-right": ["pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "battery", "battery#bat2", "clock#date", "clock#time", "tray"], "modules-right": ["tray", "pulseaudio", "network", "cpu", "memory", "temperature", "clock#date", "clock#time"],
// Modules configuration // Modules configuration
// "sway/workspaces": { // "sway/workspaces": {
// "disable-scroll": true, // "disable-scroll": true,
@ -83,7 +83,8 @@
"tooltip": false "tooltip": false
}, },
"memory": { "memory": {
"format": "{}%" "format": "{}%",
"on-click": "exec kitty htop"
}, },
"temperature": { "temperature": {
// "thermal-zone": 2, // "thermal-zone": 2,
@ -91,7 +92,8 @@
"critical-threshold": 80, "critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}", // "format-critical": "{temperatureC}°C {icon}",
"format": "{icon} {temperatureC}°C", "format": "{icon} {temperatureC}°C",
"format-icons": ["", "", ""] "format-icons": ["", "", ""],
"on-click": "exec kitty watch -n 5 sensors"
}, },
"backlight": { "backlight": {
// "device": "acpi_video1", // "device": "acpi_video1",

@ -2,8 +2,8 @@
border: none; border: none;
border-radius: 0; border-radius: 0;
/* `otf-font-awesome` is required to be installed for icons */ /* `otf-font-awesome` is required to be installed for icons */
font-family: Roboto, Helvetica, Arial, sans-serif; font-family: Cantarell;/*Roboto, Helvetica, Arial, sans-serif; */
font-size: 13px; font-size: 14px;
min-height: 0; min-height: 0;
} }
@ -55,6 +55,7 @@ window#waybar.chromium {
#workspaces button.focused { #workspaces button.focused {
background-color: #64727D; background-color: #64727D;
/* border-bottom: 3px solid #ffffff; */ /* border-bottom: 3px solid #ffffff; */
padding: 0 2px;
} }
#workspaces button.urgent { #workspaces button.urgent {
@ -63,7 +64,7 @@ window#waybar.chromium {
#mode { #mode {
background-color: #64727D; background-color: #64727D;
border-bottom: 3px solid #ffffff; /* border-bottom: 3px solid #ffffff; */
} }
#clock, #clock,
@ -76,7 +77,6 @@ window#waybar.chromium {
#pulseaudio, #pulseaudio,
#custom-media, #custom-media,
#tray, #tray,
#mode,
#idle_inhibitor, #idle_inhibitor,
#mpd { #mpd {
padding: 0 10px; padding: 0 10px;
@ -85,10 +85,14 @@ window#waybar.chromium {
} }
#clock { #clock {
padding: 1px; padding: 0 0px;
background-color: transparent; background-color: transparent;
} }
#clock.time {
background-color: transparent;
min-width: 60px;
}
#battery { #battery {
padding: 1px; padding: 1px;
background-color: transparent; background-color: transparent;