theming, status scripts

This commit is contained in:
tavo-wasd 2024-02-04 21:08:50 -06:00
parent 9f7aa08519
commit 861ee63c92
16 changed files with 90 additions and 41 deletions

View file

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

View file

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

View file

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

View file

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

View file

@ -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:")"

View file

@ -2,4 +2,6 @@
# Reduces mic volume by 5%
amixer set Capture 5%-
$HOME/.config/scripts/status/micstat
kill -45 "$(pidof dwmblocks)"

View file

@ -2,6 +2,6 @@
# Mute
amixer -q set Capture toggle
$HOME/.config/scripts/status/micstat
# Restart statusbar module (dwm & dwmblocks)
kill -45 "$(pidof dwmblocks)"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

2
shell/sway Normal file
View file

@ -0,0 +1,2 @@
# If running from tty1 start sway
[ "$(tty)" = "/dev/tty1" ] && exec sway

View file

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