From 06b7af1e02c6e289db7b088b4251ed5e21c058f4 Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Tue, 30 Aug 2022 18:02:25 +0300 Subject: [PATCH] Add mako config and change a lot of things Add mako notifications Add wf-recorder binds Add screenshots binds --- configs/mako | 9 +++++++ configs/sway/config | 38 +++++++++++++++++++++++------- configs/sway/themes/solarized-dark | 4 ++-- configs/waybar/config | 11 ++++++++- configs/waybar/style.css | 4 ++-- tools/relink.sh | 7 +++--- 6 files changed, 56 insertions(+), 17 deletions(-) create mode 100644 configs/mako diff --git a/configs/mako b/configs/mako new file mode 100644 index 0000000..2f02c5a --- /dev/null +++ b/configs/mako @@ -0,0 +1,9 @@ +anchor=top-right +default-timeout=10000 +width=300 +font=JetBrains Mono 8 +background-color=#002b36FF +text-color=#839496FF +border-color=#073642FF +height=500 +border-radius=10 diff --git a/configs/sway/config b/configs/sway/config index 69c58fc..839381d 100644 --- a/configs/sway/config +++ b/configs/sway/config @@ -12,33 +12,50 @@ output * bg #002b36 solid_color input * { xkb_layout us,ru - xkb_options grp:alt_shift_toggle + xkb_options grp:win_space_toggle } bar swaybar_command waybar xwayland enable smart_borders on -default_border pixel 2 +default_border pixel 1 +hide_edge_borders smart +smart_gaps on gaps inner 5 -font "JetBrains Mono" 11 - -exec swayidle -w \ - timeout 300 'swaylock -f -c 000000' \ - timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ - before-sleep 'swaylock -f -c 000000' +font "JetBrains Mono" 9 output * scale 2 include ~/.config/sway/themes/solarized-dark + +# Start components + +exec mako +exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000' + +# Screenshots + +set $screenshot_file \"$HOME/Pictures/screenshot-$(date '+%Y-%m-%d_%H-%M-%S').png\" +bindsym $mod+o exec grim -s1 $screenshot_file +bindsym $mod+p exec (slurp | grim -g- -s1 $screenshot_file) + +# Recordings + +set $rec_file \"$HOME/Videos/recording-$(date '+%Y-%m-%d_%H-%M-%S').mp4\" +bindsym $mod+Shift+o exec wf-recorder --file $rec_file +bindsym $mod+Shift+p exec (wf-recorder -g "$(slurp)" --file $rec_file) +bindsym $mod+Shift+BackSpace exec killall -s SIGINT wf-recorder + +# Symbols bind bindsym $mod+Return exec $term bindsym $mod+Shift+f exec $filemgr bindsym $mod+Shift+q kill bindsym $mod+d exec $menu floating_modifier $mod normal bindsym $mod+Shift+c reload -bindsym $mod+Shift+e exec swaynag -f 'JetBrains Mono 11' -e bottom -t warning -m "What would you like to do?" -B 'Exit sway' 'swaymsg exit' -B 'Power off' 'systemctl shutdown' -B 'Reboot' 'systemctl reboot' +bindsym $mod+Shift+e exec swaynag -f 'JetBrains Mono 9' -e bottom -t warning -m "What would you like to do?" -B 'Exit sway' 'swaymsg exit' -B 'Power off' 'systemctl poweroff' -B 'Reboot' 'systemctl reboot' bindsym $mod+$left focus left bindsym $mod+$down focus down bindsym $mod+$up focus up @@ -102,3 +119,6 @@ mode "resize" { } bindsym $mod+r mode "resize" +# Floating +for_window [app_id="pavucontrol"] floating enable +for_window [app_id="pavucontrol"] resize set 600 300 diff --git a/configs/sway/themes/solarized-dark b/configs/sway/themes/solarized-dark index fca2277..3dc799e 100644 --- a/configs/sway/themes/solarized-dark +++ b/configs/sway/themes/solarized-dark @@ -9,6 +9,6 @@ exec_always { } # Property Name Border BG Text -client.focused #839496 #839496 #839496 -client.focused_inactive #839496 #002b36 #839496 +client.focused #839496 #839496 #002b36 +client.focused_inactive #839496 #002b36 #002b36 client.unfocused #002b36 #003b36 #839496 diff --git a/configs/waybar/config b/configs/waybar/config index d094a71..1a5abf8 100644 --- a/configs/waybar/config +++ b/configs/waybar/config @@ -3,7 +3,7 @@ "position": "bottom", "modules-left": ["sway/workspaces", "sway/mode"], "modules-center": ["sway/window"], - "modules-right": ["idle_inhibitor", "network", "cpu", "memory", "temperature", "battery", "sway/language", "clock", "tray"], + "modules-right": ["idle_inhibitor", "network", "pulseaudio", "cpu", "memory", "temperature", "battery", "sway/language", "clock", "tray"], "sway/mode": { "format": "{}" }, @@ -23,6 +23,14 @@ "format-alt": "{:%d.%m.%Y}", "interval": 1 }, + "pulseaudio": { + "scroll-step": 1, + "format": "Vol: {volume}%", + "format-bluetooth": "Vol: {volume}% ", + "format-bluetooth-muted": "Vol: {icon}", + "format-muted": "Vol: {volume}%", + "on-click": "pavucontrol" + }, "cpu": { "format": "CPU: {usage}%", "interval": 1 @@ -33,6 +41,7 @@ }, "temperature": { "format": "{temperatureC}°C", + "interval": 1 }, "battery": { "format": "Bat: {capacity}%", diff --git a/configs/waybar/style.css b/configs/waybar/style.css index f306453..bd64154 100644 --- a/configs/waybar/style.css +++ b/configs/waybar/style.css @@ -1,6 +1,6 @@ * { font-family: JetBrains Mono; - font-size: 11px; + font-size: 8pt; border: none; font-weight: 400; } @@ -11,7 +11,7 @@ window#waybar { } #workspaces button { - padding: 0 5px; + padding-left: 5px; background-color: transparent; border: none; border-radius: 0; diff --git a/tools/relink.sh b/tools/relink.sh index 2b9b4c6..6ac1d08 100755 --- a/tools/relink.sh +++ b/tools/relink.sh @@ -3,8 +3,8 @@ # script that (re)links all dotfiles during the installation or upgrade. # do not run manually -mkdir -p $HOME/.config/nvim $HOME/.config/alacritty >/dev/null 2>&1 -rm -rf $HOME/.zshrc $HOME/.config/nvim/init.vim $HOME/.config/alacritty/alacritty.yml $HOME/.config/sway $HOME/.config/waybar >/dev/null 2>&1 +mkdir -p $HOME/.config/nvim $HOME/.config/alacritty $HOME/.config/mako >/dev/null 2>&1 +rm -rf $HOME/.zshrc $HOME/.config/nvim/init.vim $HOME/.config/alacritty/alacritty.yml $HOME/.config/sway $HOME/.config/waybar $HOME/.config/mako/config >/dev/null 2>&1 ln -s $HOME/.dotfiles/configs/zshrc $HOME/.zshrc echo ".zshrc linked: $HOME/.dotfiles/configs/zshrc -> $HOME/.zshrc" ln -s $HOME/.dotfiles/configs/.profile $HOME/.profile @@ -16,4 +16,5 @@ echo "alacritty config linked: $HOME/.dotfiles/configs/alacritty.yml -> $HOME/.c ln -s $HOME/.dotfiles/configs/sway $HOME/.config/ ln -s $HOME/.dotfiles/configs/waybar $HOME/.config/ -echo "sway and waybar dotfiles installed" +ln -s $HOME/.dotfiles/configs/mako $HOME/.config/mako/config +echo "sway (and all other swaywm, wayland stuff things) dotfiles installed"