diff --git a/arch-user/config/mako/config.tmpl b/arch-user/config/mako/config.tmpl index 10b6950..87524ab 100644 --- a/arch-user/config/mako/config.tmpl +++ b/arch-user/config/mako/config.tmpl @@ -6,3 +6,4 @@ border-radius=4 border-color=#$THEME_COLOR_FG_ACCENT$THEME_OPACITY_MID_HEX padding=5,10 width=400 +progress-color=#$THEME_COLOR_FG_ACCENT$THEME_OPACITY_MID_HEX diff --git a/arch-user/config/sway/brightness-set-and-notify.sh b/arch-user/config/sway/brightness-set-and-notify.sh new file mode 100755 index 0000000..0f2c5cb --- /dev/null +++ b/arch-user/config/sway/brightness-set-and-notify.sh @@ -0,0 +1,6 @@ +#!/bin/sh +brig="$(brightnessctl set "$1" -m | sed -e 's/.*,\([0-9]*\)%.*/\1/')" +notif_id_file=/dev/shm/workspace-$USER-notify-brig +read -r notif_id < "$notif_id_file" +notify-send -t 2000 -h "int:value:$brig" -a "brightness" "$brig%" \ + --replace-id="${notif_id:-99999999}" --print-id > "$notif_id_file" diff --git a/arch-user/config/sway/config.tmpl b/arch-user/config/sway/config.tmpl index fe76ac7..a74b246 100644 --- a/arch-user/config/sway/config.tmpl +++ b/arch-user/config/sway/config.tmpl @@ -9,16 +9,44 @@ set $down i set $right o set $bwd apostrophe +################ styles #################### +default_border pixel 1 +smart_borders on +title_align center +font pango:$THEME_FONT_REGULAR $THEME_SIZE_FONT_SMALL_PT +output * bg #$THEME_COLOR_BG solid_color +client.focused #$THEME_COLOR_BG_ACCENT_LIGHT #$THEME_COLOR_BG_ACCENT_LIGHT #$THEME_COLOR_FG #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_BG_ACCENT_LIGHT +client.focused_tab_title #$THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX #$THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX #$THEME_COLOR_FG_DARK #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_BG_ACCENT_LIGHT +client.focused_inactive #$THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX #$THEME_COLOR_BG_ACCENT_DARK #$THEME_COLOR_FG_DARK #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX +client.unfocused #$THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX #$THEME_COLOR_BG_ACCENT_DARK #$THEME_COLOR_FG_DARK #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX +bar { + position top + font pango:$THEME_FONT_REGULAR $THEME_SIZE_FONT_BASE_PT + status_command i3blocks + strip_workspace_numbers yes + separator_symbol | + workspace_min_width 28 + colors { + statusline #$THEME_COLOR_FG + background #$THEME_COLOR_BG + separator #$THEME_COLOR_FG_DARK + focused_workspace #$THEME_COLOR_BG_ACCENT_LIGHT #$THEME_COLOR_BG_ACCENT_LIGHT #$THEME_COLOR_FG + inactive_workspace #$THEME_COLOR_BG_ACCENT_DARK #$THEME_COLOR_BG_ACCENT_DARK #$THEME_COLOR_FG + urgent_workspace #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_FG + binding_mode #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_FG + } +} +########################################### + ################ inputs #################### input "type:keyboard" { xkb_layout us(yz),us(basic),ru(yz) + repeat_rate 50 } bindsym --to-code Shift+ISO_Level3_Shift input "type:keyboard" xkb_switch_layout next input "type:touchpad" { - dwt enabled tap enabled natural_scroll enabled - middle_emulation enabled } ############################################ @@ -45,7 +73,7 @@ bindsym --to-code $mod+f fullscreen bindsym --to-code $mod+p layout toggle split bindsym --to-code $mod+l splitv bindsym --to-code $mod+u splith -# mid row - workspaces (see section), focus/move directions +# mid row - focus and movement bindsym --to-code $mod+$fwd focus child bindsym --to-code $mod+$left focus left bindsym --to-code $mod+$down focus down @@ -57,66 +85,42 @@ bindsym --to-code $altmod+$up move up bindsym --to-code $altmod+$down move down bindsym --to-code $altmod+$right move right mode "resize" { - bindsym --to-code $left resize shrink width 2ppt or 40px - bindsym --to-code $up resize shrink height 2ppt or 40px - bindsym --to-code $down resize grow height 2ppt or 40px - bindsym --to-code $right resize grow width 2ppt or 40px - bindsym --to-code Escape mode "default" + bindsym --to-code $mod+$left resize shrink width 2ppt or 40px + bindsym --to-code $mod+$up resize shrink height 2ppt or 40px + bindsym --to-code $mod+$down resize grow height 2ppt or 40px + bindsym --to-code $mod+$right resize grow width 2ppt or 40px + bindsym --to-code $altmod+$left move left 40px + bindsym --to-code $altmod+$up move up 40px + bindsym --to-code $altmod+$down move down 40px + bindsym --to-code $altmod+$right move right 40px + bindsym --to-code $mod+h mode "default" } -# bottom row - copy paste (see section keys), floating, two focus utils +# bottom row - modeless, extra focus and movement floating_modifier $mod normal -bindsym --to-code $altmod+d move scratchpad -bindsym --to-code $mod+d scratchpad show +bindsym --to-code $altmod+x move scratchpad +bindsym --to-code $mod+x scratchpad show bindsym --to-code $altmod+z floating toggle bindsym --to-code $mod+z focus mode_toggle -bindsym --to-code $mod+k mode "resize" -bindsym --to-code $mod+h focus prev sibling +bindsym --to-code $mod+h mode "resize" +bindsym --to-code $mod+k focus prev sibling bindsym --to-code $mod+slash focus next sibling ############################################ -################## keys #################### -bindsym --to-code $mod+x exec wtype -P XF86Cut -bindsym --to-code $mod+c exec wtype -P XF86Copy +################## actions #################### +# copy paste +bindsym --to-code $mod+c exec wtype -P XF86Cut +bindsym --to-code $mod+d exec wtype -P XF86Copy bindsym --to-code $mod+v exec wtype -P XF86Paste -############################################ - -################ styles #################### -default_border pixel 1 -smart_borders on -title_align center -font pango:$THEME_FONT_REGULAR $THEME_SIZE_FONT_SMALL_PT -output * bg #$THEME_COLOR_BG solid_color -client.focused #$THEME_COLOR_BG_ACCENT_LIGHT #$THEME_COLOR_BG_ACCENT_LIGHT #$THEME_COLOR_FG #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_BG_ACCENT_LIGHT -client.focused_tab_title #$THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX $THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX #$THEME_COLOR_FG_DARK #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_BG_ACCENT_LIGHT -client.focused_inactive #$THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX #$THEME_COLOR_BG_ACCENT_DARK #$THEME_COLOR_FG_DARK #$THEME_COLOR_FG_ACCENT $THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX -client.unfocused #$THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX #$THEME_COLOR_BG_ACCENT_DARK #$THEME_COLOR_FG_DARK #$THEME_COLOR_FG_ACCENT $THEME_COLOR_BG_ACCENT_LIGHT$THEME_OPACITY_MID_HEX -############################################ - -################## bar ##################### -bar { - position top - font pango:$THEME_FONT_REGULAR $THEME_SIZE_FONT_BASE_PT - status_command i3blocks - strip_workspace_numbers yes - separator_symbol | - workspace_min_width 28 - colors { - statusline #$THEME_COLOR_FG - background #$THEME_COLOR_BG - separator #$THEME_COLOR_FG_DARK - focused_workspace #$THEME_COLOR_BG_ACCENT_LIGHT #$THEME_COLOR_BG_ACCENT_LIGHT #$THEME_COLOR_FG - inactive_workspace #$THEME_COLOR_BG_ACCENT_DARK #$THEME_COLOR_BG_ACCENT_DARK #$THEME_COLOR_FG - urgent_workspace #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_FG - binding_mode #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_FG_ACCENT #$THEME_COLOR_FG - } -} -########################################### - -################ scripts ################## +# media +bindsym --to-code XF86MonBrightnessDown exec ~/.config/sway/brightness-set-and-notify.sh 5%- +bindsym --to-code XF86MonBrightnessUp exec ~/.config/sway/brightness-set-and-notify.sh 5%+ +# basic scripts bindsym --to-code $mod+Escape kill bindsym --to-code $mod+Return exec footclient bindsym --to-code $mod+Space exec run.sh -########################################### +############################################## +################# daemons #################### exec foot -s exec mako +############################################## diff --git a/arch-user/install.sh b/arch-user/install.sh index c502380..f4639b2 100644 --- a/arch-user/install.sh +++ b/arch-user/install.sh @@ -34,6 +34,7 @@ cp -rf config/bash/bashrc ~/.bashrc # templated cp_subst config/sway/config.tmpl ~/.config/sway/config +cp -rf config/sway/*.sh ~/.config/sway cp_subst config/foot/foot.ini.tmpl ~/.config/foot/foot.ini cp_subst config/mako/config.tmpl ~/.config/mako/config cp_subst config/qutebrowser/config.py.tmpl ~/.config/qutebrowser/config.py diff --git a/arch-user/scripts/run.sh b/arch-user/scripts/run.sh index 4ab7e06..eff71e1 100755 --- a/arch-user/scripts/run.sh +++ b/arch-user/scripts/run.sh @@ -75,7 +75,7 @@ exec_web() { if [ "$WEB_HAS_PROFILES" ]; then shift fi - qutebrowser "$@" + qutebrowser "$*" } exec_man() { shift