update

Changed files
+99 -89
home
status
bin
st
wm
config.d
+51 -41
home/status/bin/st
···
DATE=`date "+%a %Y-%m-%d %I:%M:%S%p"`
add_info() {
-
local SCRIPT_NAME=$1
-
local INFO="`$(dirname "$0")/../lib/${SCRIPT_NAME}.sh`"
-
if [ "$INFO" != "" ]; then
-
INFOS+=("$INFO")
-
fi
+
local SCRIPT_NAME=$1
+
local INFO="`$(dirname "$0")/../lib/${SCRIPT_NAME}.sh`"
+
if [ "$INFO" != "" ]; then
+
INFOS+=("$INFO")
+
fi
}
-
if [ "$#" -eq 0 ]; then
-
INFOS+=("$DATE")
-
add_info "workspace"
-
add_info "mail"
-
add_info "idle"
-
add_info "disk"
-
add_info "cpu"
-
add_info "temperature"
-
add_info "load_average"
-
add_info "memory"
-
add_info "network"
-
add_info "backlight"
-
add_info "pulse"
-
add_info "player"
-
add_info "battery"
+
TIMEOUT=10000
+
+
if [ "$#" -eq 0 ] || ([ "$#" -eq 2 ] && ([[ "$1" = "-t" ]] || [[ "$1" = "--timeout" ]])) ; then
+
INFOS+=("$DATE")
+
add_info "workspace"
+
add_info "mail"
+
add_info "idle"
+
add_info "disk"
+
add_info "cpu"
+
add_info "temperature"
+
add_info "load_average"
+
add_info "memory"
+
add_info "network"
+
add_info "backlight"
+
add_info "pulse"
+
add_info "player"
+
add_info "battery"
else
-
for arg in "$@"
-
do
-
case "$arg" in
-
date) INFOS+=("$DATE") ;;
-
workspace) add_info "workspace" ;;
-
mail) add_info "mail" ;;
-
idle) add_info "idle" ;;
-
disk) add_info "disk" ;;
-
cpu) add_info "cpu" ;;
-
temperature) add_info "temperature" ;;
-
load_average) add_info "load_average" ;;
-
memory) add_info "memory" ;;
-
network) add_info "network" ;;
-
backlight) add_info "backlight" ;;
-
pulse) add_info "pulse" ;;
-
player) add_info "player" ;;
-
battery) add_info "battery" ;;
-
*) echo "Warning: Unknown argument '$arg'";;
-
esac
-
done
+
while (( "$#" )); do
+
case "$1" in
+
-t|--timeout)
+
TIMEOUT=$2
+
shift 2
+
;;
+
*)
+
case "$1" in
+
date) INFOS+=("$DATE") ;;
+
workspace) add_info "workspace" ;;
+
mail) add_info "mail" ;;
+
idle) add_info "idle" ;;
+
disk) add_info "disk" ;;
+
cpu) add_info "cpu" ;;
+
temperature) add_info "temperature" ;;
+
load_average) add_info "load_average" ;;
+
memory) add_info "memory" ;;
+
network) add_info "network" ;;
+
backlight) add_info "backlight" ;;
+
pulse) add_info "pulse" ;;
+
player) add_info "player" ;;
+
battery) add_info "battery" ;;
+
*) echo "Warning: Unknown argument '$1'";;
+
esac
+
shift
+
;;
+
esac
+
done
fi
IFS=$'\n'; echo "${INFOS[*]}"
···
REPLACE="-r"
fi
-
dunstify -t 10000 -u low "Status" -p $REPLACE $ID "`IFS=$'\n'; echo "${INFOS[*]}"`" > $ID_FILE
+
dunstify -t $TIMEOUT -u low "Status" -p $REPLACE $ID "`IFS=$'\n'; echo "${INFOS[*]}"`" > $ID_FILE
+48 -48
home/wm/config.d/bindings
···
-
set $volume_inc exec pactl set-sink-volume @DEFAULT_SINK@ +10% ; exec st pulse
-
set $volume_dec exec pactl set-sink-volume @DEFAULT_SINK@ -10% ; exec st pulse
-
set $volume_inc_1 exec pactl set-sink-volume @DEFAULT_SINK@ +1 ; exec st pulse
-
set $volume_dec_1 exec pactl set-sink-volume @DEFAULT_SINK@ -1% ; exec st pulse
-
set $volume_inc_5 exec pactl set-sink-volume @DEFAULT_SINK@ +5% ; exec st pulse
-
set $volume_dec_5 exec pactl set-sink-volume @DEFAULT_SINK@ -5% ; exec st pulse
-
set $volume_mute exec pactl set-sink-mute @DEFAULT_SINK@ toggle ; exec st pulse
-
set $volume_mic_mute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle ; exec st pulse
+
set $volume_inc exec pactl set-sink-volume @DEFAULT_SINK@ +10% ; exec st pulse -t 500
+
set $volume_dec exec pactl set-sink-volume @DEFAULT_SINK@ -10% ; exec st pulse -t 500
+
set $volume_inc_1 exec pactl set-sink-volume @DEFAULT_SINK@ +1 ; exec st pulse -t 500
+
set $volume_dec_1 exec pactl set-sink-volume @DEFAULT_SINK@ -1% ; exec st pulse -t 500
+
set $volume_inc_5 exec pactl set-sink-volume @DEFAULT_SINK@ +5% ; exec st pulse -t 500
+
set $volume_dec_5 exec pactl set-sink-volume @DEFAULT_SINK@ -5% ; exec st pulse -t 500
+
set $volume_mute exec pactl set-sink-mute @DEFAULT_SINK@ toggle ; exec st pulse -t 500
+
set $volume_mic_mute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle ; exec st pulse -t 500
set $play_pause exec playerctl play-pause && st player
set $play_prev exec playerctl previous
set $play_next exec playerctl next
set $play_stop exec playerctl stop && st player
-
set $backlight_inc exec brightnessctl set 10%+ ; exec st backlight
-
set $backlight_dec exec brightnessctl set 10%- ; exec st backlight
-
set $backlight_inc_1 exec brightnessctl set 1%+ ; exec st backlight
-
set $backlight_dec_1 exec brightnessctl set 1%- ; exec st backlight
-
set $backlight_inc_5 exec brightnessctl set 5%+ ; exec st backlight
-
set $backlight_dec_5 exec brightnessctl set 5%- ; exec st backlight
+
set $backlight_inc exec brightnessctl set 10%+ ; exec st backlight -t 500
+
set $backlight_dec exec brightnessctl set 10%- ; exec st backlight -t 500
+
set $backlight_inc_1 exec brightnessctl set 1%+ ; exec st backlight -t 500
+
set $backlight_dec_1 exec brightnessctl set 1%- ; exec st backlight -t 500
+
set $backlight_inc_5 exec brightnessctl set 5%+ ; exec st backlight -t 500
+
set $backlight_dec_5 exec brightnessctl set 5%- ; exec st backlight -t 500
bindsym @locked@ XF86AudioRaiseVolume $volume_inc
bindsym @locked@ XF86AudioLowerVolume $volume_dec
···
set $ws20 "20"
# switch to workspace
-
bindsym $mod+1 workspace number $ws1
-
bindsym $mod+2 workspace number $ws2
-
bindsym $mod+3 workspace number $ws3
-
bindsym $mod+4 workspace number $ws4
-
bindsym $mod+5 workspace number $ws5
-
bindsym $mod+6 workspace number $ws6
-
bindsym $mod+7 workspace number $ws7
-
bindsym $mod+8 workspace number $ws8
-
bindsym $mod+9 workspace number $ws9
-
bindsym $mod+0 workspace number $ws10
-
bindsym $mod+Control+1 workspace number $ws11
-
bindsym $mod+Control+2 workspace number $ws12
-
bindsym $mod+Control+3 workspace number $ws13
-
bindsym $mod+Control+4 workspace number $ws14
-
bindsym $mod+Control+5 workspace number $ws15
-
bindsym $mod+Control+6 workspace number $ws16
-
bindsym $mod+Control+7 workspace number $ws17
-
bindsym $mod+Control+8 workspace number $ws18
-
bindsym $mod+Control+9 workspace number $ws19
-
bindsym $mod+Control+0 workspace number $ws20
+
bindsym $mod+1 workspace number $ws1 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+2 workspace number $ws2 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+3 workspace number $ws3 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+4 workspace number $ws4 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+5 workspace number $ws5 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+6 workspace number $ws6 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+7 workspace number $ws7 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+8 workspace number $ws8 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+9 workspace number $ws9 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+0 workspace number $ws10 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+Control+1 workspace number $ws11 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+Control+2 workspace number $ws12 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+Control+3 workspace number $ws13 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+Control+4 workspace number $ws14 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+Control+5 workspace number $ws15 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+Control+6 workspace number $ws16 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+Control+7 workspace number $ws17 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+Control+8 workspace number $ws18 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+Control+9 workspace number $ws19 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
+
bindsym $mod+Control+0 workspace number $ws20 ; exec makoctl dismiss -n `cat ~/.cache/st_id`
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
···
bindsym $mod+Shift+Escape exec st
# grave=`
-
bindsym $mod+grave workspace back_and_forth ; exec makoctl dismiss -n `cat ~/.cache/st_id` && st workspace
+
bindsym $mod+grave workspace back_and_forth ; exec makoctl dismiss -n `cat ~/.cache/st_id` && st workspace -t 500
bindsym $mod+Shift+grave move container to workspace back_and_forth
-
bindsym $mod+period workspace next_on_output ; exec st workspace
-
bindsym $mod+comma workspace prev_on_output ; exec st workspace
+
bindsym $mod+period workspace next_on_output ; exec st workspace -t 500
+
bindsym $mod+comma workspace prev_on_output ; exec st workspace -t 500
bindsym $mod+Shift+period move container to workspace next_on_output
bindsym $mod+Shift+comma move container to workspace prev_on_output
···
bindsym $mod+$alt+Control+up move workspace to output up
bindsym $mod+$alt+Control+right move workspace to output right
-
bindsym $mod+bracketleft focus output left ; exec makoctl dismiss -n `cat ~/.cache/st_id` && st workspace
-
bindsym $mod+bracketright focus output right ; exec makoctl dismiss -n `cat ~/.cache/st_id` && st workspace
-
bindsym $mod+Shift+bracketleft move container to output left ; exec makoctl dismiss -n `cat ~/.cache/st_id` && st workspace
-
bindsym $mod+Shift+bracketright move container to output right ; exec makoctl dismiss -n `cat ~/.cache/st_id` && st workspace
-
bindsym $mod+Control+bracketleft move workspace to output left ; exec makoctl dismiss -n `cat ~/.cache/st_id` && st workspace
-
bindsym $mod+Control+bracketright move workspace to output right ; exec makoctl dismiss -n `cat ~/.cache/st_id` && st workspace
+
bindsym $mod+bracketleft focus output left ; exec makoctl dismiss -n `cat ~/.cache/st_id` && st workspace -t 500
+
bindsym $mod+bracketright focus output right ; exec makoctl dismiss -n `cat ~/.cache/st_id` && st workspace -t 500
+
bindsym $mod+Shift+bracketleft move container to output left ; exec makoctl dismiss -n `cat ~/.cache/st_id` && st workspace -t 500
+
bindsym $mod+Shift+bracketright move container to output right ; exec makoctl dismiss -n `cat ~/.cache/st_id` && st workspace -t 500
+
bindsym $mod+Control+bracketleft move workspace to output left ; exec makoctl dismiss -n `cat ~/.cache/st_id` && st workspace -t 500
+
bindsym $mod+Control+bracketright move workspace to output right ; exec makoctl dismiss -n `cat ~/.cache/st_id` && st workspace -t 500
-
bindsym $mod+m exec $SCRIPT_DIR/ws_switch.sh "$SCRIPT_DIR/get_free_ws_num.sh" ; exec st workspace
-
bindsym $mod+Shift+m exec $SCRIPT_DIR/ws_mv.sh "$SCRIPT_DIR/get_free_ws_num.sh" ; exec st workspace
-
bindsym $mod+Control+m exec $SCRIPT_DIR/ws_switch_mv.sh "$SCRIPT_DIR/get_free_ws_num.sh" ; exec st workspace
+
bindsym $mod+m exec $SCRIPT_DIR/ws_switch.sh "$SCRIPT_DIR/get_free_ws_num.sh" ; exec st workspace -t 500
+
bindsym $mod+Shift+m exec $SCRIPT_DIR/ws_mv.sh "$SCRIPT_DIR/get_free_ws_num.sh" ; exec st workspace -t 500
+
bindsym $mod+Control+m exec $SCRIPT_DIR/ws_switch_mv.sh "$SCRIPT_DIR/get_free_ws_num.sh" ; exec st workspace -t 500
bindsym $mod+backslash exec $SCRIPT_DIR/ws_switch.sh "$SCRIPT_DIR/select_ws.sh"
bindsym $mod+Shift+backslash exec $SCRIPT_DIR/ws_mv.sh "$SCRIPT_DIR/select_ws.sh"
···
bindsym @locked@ $mod+Control+equal $volume_inc_5
bindsym @locked@ $mod+Control+minus $volume_dec_5
-
bindsym $mod+y exec $SCRIPT_DIR/cycle_sink.sh && st pulse
-
bindsym $mod+Shift+y exec $SCRIPT_DIR/cycle_sink.sh back && st pulse
+
bindsym $mod+y exec $SCRIPT_DIR/cycle_sink.sh && st pulse -t 500
+
bindsym $mod+Shift+y exec $SCRIPT_DIR/cycle_sink.sh back && st pulse -t 500
bindsym $mod+n $volume_mute
bindsym $mod+Shift+n $volume_mic_mute