Add mako config and change a lot of things

Add mako notifications
Add wf-recorder binds
Add screenshots binds
This commit is contained in:
Ivan Bushchik 2022-08-30 18:02:25 +03:00
parent 17b3919008
commit 06b7af1e02
No known key found for this signature in database
GPG key ID: 3E4E9C7D66E44BF7
6 changed files with 56 additions and 17 deletions

9
configs/mako Normal file
View file

@ -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

View file

@ -12,33 +12,50 @@ output * bg #002b36 solid_color
input * { input * {
xkb_layout us,ru xkb_layout us,ru
xkb_options grp:alt_shift_toggle xkb_options grp:win_space_toggle
} }
bar swaybar_command waybar bar swaybar_command waybar
xwayland enable xwayland enable
smart_borders on smart_borders on
default_border pixel 2 default_border pixel 1
hide_edge_borders smart
smart_gaps on
gaps inner 5 gaps inner 5
font "JetBrains Mono" 11 font "JetBrains Mono" 9
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'
output * scale 2 output * scale 2
include ~/.config/sway/themes/solarized-dark 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+Return exec $term
bindsym $mod+Shift+f exec $filemgr bindsym $mod+Shift+f exec $filemgr
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
bindsym $mod+d exec $menu bindsym $mod+d exec $menu
floating_modifier $mod normal floating_modifier $mod normal
bindsym $mod+Shift+c reload 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+$left focus left
bindsym $mod+$down focus down bindsym $mod+$down focus down
bindsym $mod+$up focus up bindsym $mod+$up focus up
@ -102,3 +119,6 @@ mode "resize" {
} }
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
# Floating
for_window [app_id="pavucontrol"] floating enable
for_window [app_id="pavucontrol"] resize set 600 300

View file

@ -9,6 +9,6 @@ exec_always {
} }
# Property Name Border BG Text # Property Name Border BG Text
client.focused #839496 #839496 #839496 client.focused #839496 #839496 #002b36
client.focused_inactive #839496 #002b36 #839496 client.focused_inactive #839496 #002b36 #002b36
client.unfocused #002b36 #003b36 #839496 client.unfocused #002b36 #003b36 #839496

View file

@ -3,7 +3,7 @@
"position": "bottom", "position": "bottom",
"modules-left": ["sway/workspaces", "sway/mode"], "modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["sway/window"], "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": { "sway/mode": {
"format": "<span style=\"italic\">{}</span>" "format": "<span style=\"italic\">{}</span>"
}, },
@ -23,6 +23,14 @@
"format-alt": "{:%d.%m.%Y}", "format-alt": "{:%d.%m.%Y}",
"interval": 1 "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": { "cpu": {
"format": "CPU: {usage}%", "format": "CPU: {usage}%",
"interval": 1 "interval": 1
@ -33,6 +41,7 @@
}, },
"temperature": { "temperature": {
"format": "{temperatureC}°C", "format": "{temperatureC}°C",
"interval": 1
}, },
"battery": { "battery": {
"format": "Bat: {capacity}%", "format": "Bat: {capacity}%",

View file

@ -1,6 +1,6 @@
* { * {
font-family: JetBrains Mono; font-family: JetBrains Mono;
font-size: 11px; font-size: 8pt;
border: none; border: none;
font-weight: 400; font-weight: 400;
} }
@ -11,7 +11,7 @@ window#waybar {
} }
#workspaces button { #workspaces button {
padding: 0 5px; padding-left: 5px;
background-color: transparent; background-color: transparent;
border: none; border: none;
border-radius: 0; border-radius: 0;

View file

@ -3,8 +3,8 @@
# script that (re)links all dotfiles during the installation or upgrade. # script that (re)links all dotfiles during the installation or upgrade.
# do not run manually # do not run manually
mkdir -p $HOME/.config/nvim $HOME/.config/alacritty >/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 >/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 ln -s $HOME/.dotfiles/configs/zshrc $HOME/.zshrc
echo ".zshrc linked: $HOME/.dotfiles/configs/zshrc -> $HOME/.zshrc" echo ".zshrc linked: $HOME/.dotfiles/configs/zshrc -> $HOME/.zshrc"
ln -s $HOME/.dotfiles/configs/.profile $HOME/.profile 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/sway $HOME/.config/
ln -s $HOME/.dotfiles/configs/waybar $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"