diff --git a/dunst/dunstrc b/dunst/dunstrc index 0d598b2..82cc2dc 100644 --- a/dunst/dunstrc +++ b/dunst/dunstrc @@ -4,8 +4,8 @@ width = (200, 300) height = 200 - origin = top-right - offset = 16x32 + origin = top-center + offset = 0x32 scale = 0 notification_limit = 0 @@ -26,8 +26,8 @@ padding = 4 horizontal_padding = 24 text_icon_padding = 0 - frame_width = 0 - frame_color = "#ebdbb2" + frame_width = 1 + frame_color = "#2e9ef4" gap_size = 0 separator_color = frame @@ -70,18 +70,18 @@ per_monitor_dpi = false [urgency_low] - background = "#ebdbb2" - foreground = "#121212" + background = "#2e9ef499" + foreground = "#ffffff" timeout = 2 [urgency_normal] - background = "#ebdbb2" - foreground = "#121212" + background = "#2e9ef499" + foreground = "#ffffff" timeout = 8 [urgency_critical] - background = "#ebdbb2" - foreground = "#121212" + background = "#2e9ef499" + foreground = "#ffffff" frame_color = "#FB4934" timeout = 0 diff --git a/scripts/brightdown b/scripts/brightdown index b094289..59b87e9 100755 --- a/scripts/brightdown +++ b/scripts/brightdown @@ -20,4 +20,4 @@ case 1 in $((brightness = 0)) ) bar="──────────" ;; esac -notify-send -u low --replace-id=9 "󰃞 Brightness" "$bar" +notify-send -u low --replace-id=9 "󰃞 $bar" diff --git a/scripts/brightup b/scripts/brightup index 0d78f86..b8a2003 100755 --- a/scripts/brightup +++ b/scripts/brightup @@ -20,4 +20,4 @@ case 1 in $((brightness = 0)) ) bar="──────────" ;; esac -notify-send -u low --replace-id=9 "󰃞 Brightness" "$bar" +notify-send -u low --replace-id=9 "󰃞 $bar" diff --git a/scripts/menu/menu b/scripts/menu/menu index b7e2f3d..d6852f9 100755 --- a/scripts/menu/menu +++ b/scripts/menu/menu @@ -7,8 +7,8 @@ PROMPT="$1" ; MODE="$2" MENU="tofi" # Default to fzf col_nb="#121212" # Normal background col_nf="#665c54" # Normal foreground -col_sb="#2e9ef4" # Selected background -col_sf="#121212" # Selected foreground +col_sb="#121212" # Selected background +col_sf="#2e9ef4" # Selected foreground font="JetbrainsMono" font_size="10" @@ -25,7 +25,7 @@ fi BPASS="-x" && DPASS="-P" # bemenu opts -BEMENU_OPTS=" \ +BEMENU_OPTS=$(printf " \ -c \ -i \ -l 10 \ @@ -33,7 +33,7 @@ BEMENU_OPTS=" \ -B 1 \ --cw 1 \ --tb $col_sb \ - --tf $col_sf \ + --tf $col_nf \ --fb $col_nb \ --ff $col_nf \ --cb $col_nb \ @@ -44,11 +44,11 @@ BEMENU_OPTS=" \ --hf $col_sf \ --ab $col_nb \ --af $col_nf \ - --bdr $col_sb \ + --bdr $col_sf \ --fn "$font" \ -p "$PROMPT" \ $BPASS \ -" +") # dmenu opts DMENU_OPTS=" \ @@ -65,7 +65,7 @@ DMENU_OPTS=" \ # tofi opts TOFI_OPTS=" \ - --prompt-text "$PROMPT" \ + --prompt-text "$PROMPT " \ " # fzf opts diff --git a/scripts/menu/menu-pass b/scripts/menu/menu-pass index 20e368e..c1d437b 100755 --- a/scripts/menu/menu-pass +++ b/scripts/menu/menu-pass @@ -1,6 +1,6 @@ #!/bin/sh # menu for 'pass' -PASSWORD_STORE_DIR="$HOME/.password-store" +PASSWORD_STORE_DIR="$HOME/.local/share/password-store" MENU="$HOME/.config/scripts/menu/menu" password="$(find "$PASSWORD_STORE_DIR" -type f -name '*.gpg' | sed "s@$PASSWORD_STORE_DIR/@@g ; s@.gpg@@g" | $MENU "Pass:")" diff --git a/scripts/micdown b/scripts/micdown index 458f2d9..3161ba5 100755 --- a/scripts/micdown +++ b/scripts/micdown @@ -2,4 +2,6 @@ # Reduces mic volume by 5% amixer set Capture 5%- +$HOME/.config/scripts/status/micstat + kill -45 "$(pidof dwmblocks)" diff --git a/scripts/micmute b/scripts/micmute index e810939..2dbbf4c 100755 --- a/scripts/micmute +++ b/scripts/micmute @@ -2,6 +2,6 @@ # Mute amixer -q set Capture toggle +$HOME/.config/scripts/status/micstat -# Restart statusbar module (dwm & dwmblocks) kill -45 "$(pidof dwmblocks)" diff --git a/scripts/micup b/scripts/micup index fc22300..1f4614e 100755 --- a/scripts/micup +++ b/scripts/micup @@ -2,4 +2,6 @@ # Increases mic volume by 5% amixer set Capture 5%+ +$HOME/.config/scripts/status/micstat + kill -45 "$(pidof dwmblocks)" 2>/dev/null diff --git a/scripts/mute b/scripts/mute index 66d1cf7..6aa06a9 100755 --- a/scripts/mute +++ b/scripts/mute @@ -2,6 +2,6 @@ # Mute amixer -q set Master toggle +$HOME/.config/scripts/status/volstat -# Restart statusbar module (dwm & dwmblocks) -kill -44 "$(pidof dwmblocks)" +kill -44 "$(pidof dwmblocks)" 2>/dev/null diff --git a/scripts/status/micstat b/scripts/status/micstat index dd0d37e..2a231b9 100755 --- a/scripts/status/micstat +++ b/scripts/status/micstat @@ -9,7 +9,7 @@ vol="${vol%\%*}" # Remove percentage sign # If device is off (muted), notify mute, print volume otherwise if amixer scontents | grep "Capture" | grep -q "\[off\]"; then echo " ──────────" - notify-send -u low --replace-id=11 " Microphone" "Mute" 2>/dev/null + notify-send -u low --replace-id=11 " Silenced" 2>/dev/null exit fi @@ -30,4 +30,4 @@ esac # Print and notify echo " $bar" -notify-send -u low --replace-id=11 " Microphone" "$bar" 2>/dev/null +notify-send -u low --replace-id=11 " $bar" 2>/dev/null diff --git a/scripts/status/sway b/scripts/status/sway index 6775d2e..a9c7828 100755 --- a/scripts/status/sway +++ b/scripts/status/sway @@ -97,16 +97,16 @@ while true ; do status="" separator=" " - volume="$(get_vol)" + #volume="$(get_vol)" ! [ -z "$volume" ] && status="$status$separator$volume" - microphone="$(get_mic)" + #microphone="$(get_mic)" ! [ -z "$microphone" ] && status="$status$separator$microphone" battery="$(get_bat)" ! [ -z "$battery" ] && status="$status$separator$battery" - layout="$(get_layout)" + #layout="$(get_layout)" ! [ -z "$layout" ] && status="$status$separator$layout" date_time="$(date "+%I:%M%p$separator%a %Y-%m-%d")" diff --git a/scripts/status/volstat b/scripts/status/volstat index aadbaaa..273db95 100755 --- a/scripts/status/volstat +++ b/scripts/status/volstat @@ -9,7 +9,7 @@ vol="${vol%\%*}" # Remove percentage sign # If device is off (muted), notify mute, print volume otherwise if amixer scontents | grep "Playback" | grep -q "\[off\]"; then echo "󰖁 ──────────" - notify-send -u low --replace-id=10 "󰖁 Volume" "Mute" 2>/dev/null + notify-send -u low --replace-id=10 "󰖁 Mute" 2>/dev/null exit fi @@ -29,5 +29,5 @@ case 1 in esac # Print and notify +notify-send -u low --replace-id=10 "󰕾 $bar" 2>/dev/null echo "󰕾 $bar" -notify-send -u low --replace-id=10 "󰕾 Volume" "$bar" 2>/dev/null diff --git a/scripts/voldown b/scripts/voldown index 336a36b..1c06a10 100755 --- a/scripts/voldown +++ b/scripts/voldown @@ -1,6 +1,8 @@ #!/bin/sh -# Reduces volume by 5%, +# Increases volume by 5%, # then restarts statusbar module amixer set Master 5%- unmute -kill -44 "$(pidof dwmblocks)" +$HOME/.config/scripts/status/volstat + +kill -44 "$(pidof dwmblocks)" 2>/dev/null diff --git a/scripts/volup b/scripts/volup index 66d8419..3c03aa3 100755 --- a/scripts/volup +++ b/scripts/volup @@ -3,4 +3,6 @@ # then restarts statusbar module amixer set Master 5%+ unmute +$HOME/.config/scripts/status/volstat + kill -44 "$(pidof dwmblocks)" 2>/dev/null diff --git a/shell/sway b/shell/sway new file mode 100644 index 0000000..20283ad --- /dev/null +++ b/shell/sway @@ -0,0 +1,2 @@ +# If running from tty1 start sway +[ "$(tty)" = "/dev/tty1" ] && exec sway diff --git a/sway/config b/sway/config index ca0684f..f8c72f9 100644 --- a/sway/config +++ b/sway/config @@ -1,23 +1,61 @@ # Preferences -output * bg ~/Pictures/backgrounds/4.jpg fill -input "type:touchpad" natural_scroll enabled -input "type:pointer" accel_profile flat +output * { + bg ~/Pictures/backgrounds/4.jpg fill +} + +input type:touchpad { + natural_scroll enabled + tap enabled +} + +input type:pointer { + accel_profile flat +} + +input type:keyboard { + xkb_layout us,latam + xkb_options grp:win_space_toggle + repeat_delay 300 + repeat_rate 45 +} + set $mod Mod4 set $left h set $down j set $up k set $right l - set $term foot set $menu ~/.config/scripts/menu/menu "Run:" run | xargs swaymsg exec -- +set $passmgr ydotool type $(pass $(~/.config/scripts/menu/menu-pass) | head -n 1) +set $passotp ydotool type $(pass otp $(~/.config/scripts/menu/menu-pass)) +set $volup ~/.config/scripts/volup +set $voldown ~/.config/scripts/voldown +set $mute ~/.config/scripts/mute +set $micup ~/.config/scripts/micup +set $micdown ~/.config/scripts/micdown +set $micmute ~/.config/scripts/micmute +set $brightup ~/.config/scripts/brightup +set $brightdown ~/.config/scripts/brightdown # Keybinds -bindsym $mod+Return exec $term -bindsym $mod+c kill -bindsym $mod+r exec $menu floating_modifier $mod normal -bindsym $mod+q reload +# - +bindsym $mod+Return exec $term +bindsym $mod+r exec $menu +bindsym $mod+Shift+p exec $passmgr +bindsym $mod+Shift+o exec $passotp +bindsym XF86AudioRaiseVolume exec $volup +bindsym XF86AudioLowerVolume exec $voldown +bindsym XF86AudioMute exec $mute +bindsym Shift+XF86AudioRaiseVolume exec $micup +bindsym Shift+XF86AudioLowerVolume exec $micdown +bindsym Shift+XF86AudioMute exec $micmute +bindsym XF86MonBrightnessUp exec $brightup +bindsym XF86MonBrightnessDown exec $brightdown +# - bindsym $mod+Shift+q exec swaymsg exit +bindsym $mod+q reload +bindsym $mod+c kill # - bindsym $mod+$left focus left bindsym $mod+$down focus down @@ -58,12 +96,13 @@ bindsym $mod+Shift+f floating toggle # Layout client.focused #00000000 #2e9ef4 #00000000 default_border pixel 1 -gaps inner 10 +gaps inner 5 bar { position bottom font pango:JetBrainsMono Bold 9 status_command ~/.config/scripts/status/sway + height 20 colors { background #00000000