update sway

This commit is contained in:
Marco Thomas
2022-07-03 00:36:53 +02:00
parent 41cfed0651
commit ff987f7e56
5 changed files with 72 additions and 34 deletions

View File

@@ -13,7 +13,6 @@ SFMono also provides icons.
### for sway ### for sway
+ `waybar` (cool bar) + `waybar` (cool bar)
+ `SwayNotificationCenter` - default conf + `SwayNotificationCenter` - default conf
+ `wlogout` (logout menu) - change lock to `~/.local/bin/lock.sh`
+ `bemenu` (dmenu replacement) + `bemenu` (dmenu replacement)
+ `slurp`, `grim`, `swappy` (screenshot) + `slurp`, `grim`, `swappy` (screenshot)

View File

@@ -34,9 +34,9 @@ set $custom #e1cab3
set $bar_bg #323232 set $bar_bg #323232
# clientclass border backgr. text indicator # clientclass border backgr. text indicator
client.focused $bar_bg $bar_bg #ffffff $bar_bg client.focused $green $green #ffffff $green
client.focused_inactive $bar_bg $bar_bg $baseA1 $violet client.focused_inactive $baseA2 $baseA2 $baseB0 $baseA2
client.unfocused $bar_bg $bar_bg $baseA1 $bar_bg client.unfocused $baseA2 $baseA2 $baseB0 $baseA2
client.urgent $yellow $yellow $baseB3 $orange client.urgent $yellow $yellow $baseB3 $orange
# Output configuration # Output configuration
@@ -47,21 +47,23 @@ output * bg ~/images/wallpaper/wallpaper.png fill
bindswitch --reload --locked lid:on output $laptop disable bindswitch --reload --locked lid:on output $laptop disable
bindswitch --reload --locked lid:off output $laptop enable bindswitch --reload --locked lid:off output $laptop enable
exec light -S 20
# Idle configuration # Idle configuration
# create blurred lock screen # create blurred lock screen
exec_always convert ~/images/wallpaper/wallpaper.png -blur 0x8 /tmp/lock.png exec_always convert ~/images/wallpaper/wallpaper.png -blur 0x8 /tmp/lock.png
# set lockc and save to script, so other programs can also use it # set lockc and save to script, so other programs can also use it
set $lock 'swaylock -f --image /tmp/lock.png --indicator-idle-visible' set $lock 'swaylock -f --image /tmp/lock.png --indicator-idle-visible -F'
exec_always echo $lock > ~/.local/bin/lock.sh exec_always echo $lock > ~/.local/bin/lock.sh
exec_always chmod +x ~/.local/bin/lock.sh exec_always chmod +x ~/.local/bin/lock.sh
# Lock after 20 minutes # Lock after 20 minutes
# Suspend after 22 minutes # Suspend after 22 minutes
exec swayidle -w \ exec swayidle -w \
timeout 1200 $lock \ timeout 1200 ~/.local/bin/lock.sh \
timeout 1320 'systemctl suspend' \ timeout 1320 'systemctl suspend' \
before-sleep $lock before-sleep ~/.local/bin/lock.sh
# Input configuration # Input configuration
input type:pointer { input type:pointer {
@@ -84,7 +86,7 @@ input type:keyboard {
bindsym $mod+Shift+Backspace kill bindsym $mod+Shift+Backspace kill
# Application launcher # Application launcher
set $bemenu bemenu -l 7 --tf "#859900" --hf "#859900" --nb "#002b36" --hb "#002b36" --tb "#002b36" --fb "#002b36" --fn "SFMono Nerd Font 13" -i set $bemenu bemenu -l 7 --tf "#859900" --hf "#859900" --nb "#282828" --hb "#383838" --tb "#282828" --fb "#282828" --fn "SFMono Nerd Font 13" -i -H 30
set $files fd -I "pdf$" $HOME | cut -f 4- -d "/" set $files fd -I "pdf$" $HOME | cut -f 4- -d "/"
bindsym $mod+d exec dmenu_path | $bemenu | xargs swaymsg exec -- bindsym $mod+d exec dmenu_path | $bemenu | xargs swaymsg exec --
bindsym $mod+p exec $files | $bemenu -l 20 -p 'pdfs' | xargs -d '\n' -r xdg-open bindsym $mod+p exec $files | $bemenu -l 20 -p 'pdfs' | xargs -d '\n' -r xdg-open
@@ -94,7 +96,7 @@ input type:keyboard {
bindsym $mod+Ctrl+Shift+s exec grim -g "$(slurp)" - | swappy -f - bindsym $mod+Ctrl+Shift+s exec grim -g "$(slurp)" - | swappy -f -
# Logout etc # Logout etc
bindsym $mod+Ctrl+Backspace exec wlogout bindsym $mod+Ctrl+Backspace exec ~/.local/bin/lock.sh
# Show notifications # Show notifications
bindsym $mod+v exec swaync-client -t -sw bindsym $mod+v exec swaync-client -t -sw
@@ -169,13 +171,13 @@ input type:keyboard {
# Layout stuff: # Layout stuff:
workspace_layout stacking workspace_layout stacking
title_align center title_align center
default_border none default_border pixel 3
default_floating_border none default_floating_border pixel 3
# hide title and border, if only one application open # hide title and border, if only one application open
hide_edge_borders --i3 smart hide_edge_borders --i3 smart
gaps inner 5 gaps inner 5
smart_gaps on smart_gaps off
# Make the current focus fullscreen # Make the current focus fullscreen
bindsym $mod+f fullscreen bindsym $mod+f fullscreen

View File

@@ -67,16 +67,16 @@ set -g status "on"
set -g status-left-style "none" set -g status-left-style "none"
set -g message-command-style "fg=colour7,bg=colour14" set -g message-command-style "fg=colour7,bg=colour14"
set -g status-right-style "none" set -g status-right-style "none"
set -g pane-active-border-style "fg=colour11" set -g pane-active-border-style "fg=#859900"
set -g status-style "none,bg=colour7" set -g status-style "none,bg=colour7"
set -g message-style "fg=colour7,bg=colour14" set -g message-style "fg=colour7,bg=colour14"
set -g pane-border-style "fg=colour14" set -g pane-border-style "fg=colour11"
set -g status-right-length "100" set -g status-right-length "100"
set -g status-left-length "100" set -g status-left-length "100"
setw -g window-status-activity-style "none" setw -g window-status-activity-style "none"
setw -g window-status-separator "" setw -g window-status-separator ""
setw -g window-status-style "none,fg=colour14,bg=colour7" setw -g window-status-style "none,fg=colour14,bg=colour7"
set -g status-left "#[fg=colour7,bg=colour11,bold] #S #[fg=colour11,bg=colour7,nobold,nounderscore,noitalics]" set -g status-left "#[fg=colour7,bg=colour11,bold] #S #[fg=colour11,bg=colour7,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=colour14,bg=colour7,nobold,nounderscore,noitalics]#[fg=colour7,bg=colour14] %Y-%m-%d  %H:%M #[fg=colour11,bg=colour14,nobold,nounderscore,noitalics]#[fg=colour7,bg=colour11] #h " set -g status-right "#[fg=colour14,bg=colour7,nobold,nounderscore,noitalics]#[fg=colour7,bg=colour14] %Y-%m-%d  %I:%M %p #[fg=colour11,bg=colour14,nobold,nounderscore,noitalics]#[fg=colour7,bg=colour11] #h "
setw -g window-status-format "#[fg=colour14,bg=colour7] #I #[fg=colour14,bg=colour7] #W " setw -g window-status-format "#[fg=colour14,bg=colour7] #I #[fg=colour14,bg=colour7] #W "
setw -g window-status-current-format "#[fg=colour7,bg=colour14,nobold,nounderscore,noitalics]#[fg=colour7,bg=colour14] #I #[fg=colour7,bg=colour14] #W #[fg=colour14,bg=colour7,nobold,nounderscore,noitalics]" setw -g window-status-current-format "#[fg=colour7,bg=colour14,nobold,nounderscore,noitalics]#[fg=colour7,bg=colour14] #I #[fg=colour7,bg=colour14] #W #[fg=colour14,bg=colour7,nobold,nounderscore,noitalics]"

View File

@@ -19,16 +19,19 @@
"height": 30, "height": 30,
"modules-left": [ "modules-left": [
"sway/workspaces" "sway/workspaces",
],
"modules-center": [
"sway/window" "sway/window"
], ],
"modules-center": [
],
"modules-right": [ "modules-right": [
"cpu",
"backlight",
"battery", "battery",
"pulseaudio", "pulseaudio",
"clock#date", "clock#date",
"clock#time", "clock#time",
"idle_inhibitor",
"tray" "tray"
], ],
@@ -37,6 +40,20 @@
// Modules // Modules
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": "鈴"
}
},
"backlight": {
// "device": "acpi_video1",
"format": "{icon} {percent}%",
"format-icons": ["", "", "", "", "", "", "", "", ""]
},
"battery": { "battery": {
"interval": 10, "interval": 10,
"states": { "states": {
@@ -44,7 +61,7 @@
"critical": 15 "critical": 15
}, },
// Connected to AC // Connected to AC
"format": "{icon} {capacity}%", // Icon: bolt "format": "{icon} {capacity}%", // Icon: bolt
// Not connected to AC // Not connected to AC
"format-discharging": "{icon} {capacity}%", "format-discharging": "{icon} {capacity}%",
"format-icons": [ "format-icons": [
@@ -59,7 +76,7 @@
"clock#time": { "clock#time": {
"interval": 5, "interval": 5,
"format": "{:%I:%M %p}", "format": "{:%I:%M %p}",
"tooltip": false "tooltip": false
}, },
@@ -107,7 +124,7 @@
"sway/window": { "sway/window": {
"format": "{}", "format": "{}",
"max-length": 120 "max-length": 80
}, },
"sway/workspaces": { "sway/workspaces": {
@@ -117,7 +134,7 @@
"format-icons": { "format-icons": {
"1": "", "1": "",
"2": "", "2": "",
"3": "‭ﭮ‬", "3": "",
"4": "", "4": "",
"5": "", "5": "",
"8": "", "8": "",
@@ -132,7 +149,7 @@
//"scroll-step": 1, //"scroll-step": 1,
"format": "{icon} {volume}%", "format": "{icon} {volume}%",
"format-bluetooth": "{icon} {volume}% ", "format-bluetooth": "{icon} {volume}% ",
"format-muted": " Muted", "format-muted": "婢 0%",
"format-icons": { "format-icons": {
"headphones": "", "headphones": "",
"handsfree": "", "handsfree": "",
@@ -140,7 +157,7 @@
"phone": "", "phone": "",
"portable": "", "portable": "",
"car": "", "car": "",
"default": ["", ""] "default": ["奄","奔", "墳", "墳", "墳", "墳", "墳"]
}, },
"on-click": "pavucontrol" "on-click": "pavucontrol"
}, },

View File

@@ -54,8 +54,10 @@
font-size: 13px; font-size: 13px;
} }
/* Each module */ /* Each module l*/
#idle_inhibitor,
#battery, #battery,
#backlight,
#clock, #clock,
#cpu, #cpu,
#custom-keyboard-layout, #custom-keyboard-layout,
@@ -65,6 +67,12 @@
#pulseaudio, #pulseaudio,
#temperature, #temperature,
#tray { #tray {
border-radius: 5px;
background-color: #282828;
margin-top: 3px;
margin-bottom: 3px;
margin-left: 5px;
padding-bottom: 2px;
padding-left: 10px; padding-left: 10px;
padding-right: 10px; padding-right: 10px;
} }
@@ -171,23 +179,35 @@
#window { #window {
/* font-weight: bold; */ /* font-weight: bold; */
} border-radius: 5px;
background-color: #282828;
#workspaces button { margin-top: 3px;
border-top: 2px solid transparent; margin-bottom: 3px;
/* To compensate for the top border and still have vertical centering */ margin-left: 5px;
padding-bottom: 2px; padding-bottom: 2px;
padding-left: 10px; padding-left: 10px;
padding-right: 10px; padding-right: 10px;
color: #888888; }
#workspaces button {
border-top: 2px solid transparent;
padding-bottom: 2px;
padding-left: 10px;
padding-right: 10px;
color: white;
border-radius: 5px;
margin-top: 3px;
margin-bottom: 3px;
} }
#workspaces button.focused { #workspaces button.focused {
color: white;
background-color: #859900; background-color: #859900;
color: #282828;
border-bottom: none;
} }
#workspaces button.urgent { #workspaces button.urgent {
border-color: #c9545d; background-color: #2c303c;
color: #c9545d;
} }