Permalink
Browse files

misc

  • Loading branch information...
neeasade committed Jun 13, 2018
1 parent 7d4d10e commit a2470a03ab6fa4b9d9c62acf9b13ecdf94105a73
@@ -99,15 +99,21 @@ playlist() {
info() {
name="$(mpc -f '%title% - %artist%' | head -n 1)"
[ "$name" = ' - ' ] && name="$(basename "$(mpc -f '%file%' | head -n 1)")"
if [ "$name" = ' - ' ]; then
name="$(basename "$(mpc -f '%file%' | head -n 1)")"
name="${name%.*}"
fi
playlist_info="$(echo playlist: $(cat ~/Music/playlist/current)$(playlist_length))"
length="$(wc -c <<< "$name")"
length="$(wc -L <<< "$name")"
percent="$(mpc | awk 'match($0,/([0-9]+)%/, groups) {print groups[1]}')"
progress="$("$HOME/.wm/panel/tools/mkb" $percent $length ◼ ◻ ◼)"
echo "$name"
"$HOME/.wm/panel/tools/mkb" $percent $length ◼ ◻ ◼
echo playlist: $(cat ~/Music/playlist/current)
echo playlist length: $(playlist_length)
cat<<EOF
$name
$progress
$playlist_info
EOF
}
op=${1:-toggle}
@@ -1,13 +1,17 @@
#!/bin/sh
# ($_url is any command)
_qb_version='1.0.4'
_proto_version=1
_ipc_socket="${XDG_RUNTIME_DIR}/qutebrowser/ipc-$(echo -n "$USER" | md5sum | cut -d' ' -f1)"
_url="$@"
printf '{"args": ["%s"], "target_arg": null, "version": "%s", "protocol_version": %d, "cwd": "%s"}\n' \
"${_url}" \
"${_qb_version}" \
"${_proto_version}" \
"${PWD}" | socat - UNIX-CONNECT:"${_ipc_socket}"
#!/bin/sh
# ($_url is any command)
_qb_version='1.0.4'
_proto_version=1
_ipc_socket="${XDG_RUNTIME_DIR}/qutebrowser/ipc-$(echo -n "$USER" | md5sum | cut -d' ' -f1)"
_url="$@"
bspc config ignore_ewmh_focus true
printf '{"args": ["%s"], "target_arg": null, "version": "%s", "protocol_version": %d, "cwd": "%s"}\n' \
"${_url}" \
"${_qb_version}" \
"${_proto_version}" \
"${PWD}" | socat - UNIX-CONNECT:"${_ipc_socket}"
bspc config ignore_ewmh_focus false
@@ -1,5 +1,13 @@
# -*- mode: sh -*-
sysinfo() {
clear
ufetch
music info
pcs() { for i in {0..7}; do echo -en "\e[${1}$((30+$i))m \u2588\u2588 \e[0m"; done; }
printf "\n%s\n%s\n\n" "$(pcs)" "$(pcs '1;')"
}
shot_location() {
mkdir -p $HOME/Screenshots
echo "$HOME/Screenshots/$(date +%y-%m-%d-%H:%M:%S).png"
@@ -15,8 +23,12 @@ fullshot() {
maim "$(shot_location)"
}
lastshot() {
echo "$HOME/Screenshots/$(ls $HOME/Screenshots | tail -n 1)"
}
upshot() {
uguush -o 0x0 -u "$(echo $HOME/Screenshots/$(ls $HOME/Screenshots | tail -n 1))"
uguush -o 0x0 -u "$(lastshot)"
}
# current monitor only - bspwm specific
@@ -168,5 +180,5 @@ dotadd() {
}
book() {
google-chrome-stable "$(cat ~/.book_url)"
google-chrome-stable "$(cat ~/.book_url)" &
}
@@ -86,6 +86,8 @@ done
# match escape to evil
bindkey fd vi-cmd-mode
bindkey -M visual fd vi-cmd-mode
bindkey -M viopp fd vi-cmd-mode
# match some standard readline binds in insert mode
bindkey '^P' up-history
@@ -25,7 +25,7 @@ bspc config focused_border_color "#{{b_focused_border_color}}"
bspc config presel_feedback_color "#{{b_presel_feedback_color}}"
bspc config focus_follows_pointer true
bspc config ignore_ewmh_focus true
bspc config ignore_ewmh_focus false
bspc config remove_unplugged_monitors true
bspc config remove_disabled_monitors true
@@ -32,7 +32,8 @@ if initial_start:
c.auto_save.session = True
# binds
config.bind('<Shift-i>', 'config-source')
# todo: make this insert mode + utf8 script
# config.bind('<Shift-I>', 'config-source')
# mustache templated from current theme
@@ -2,10 +2,10 @@
# scrolling mpd text
# limitation of this is it only works with monospace fonts.
max_length=20
max_length=30
title="$($HOME/.wm/panel/lemons/mpd)"
max_length=$(echo "$title" | cut -c 1-$max_length | wc -m)
max_length=$(echo "$title" | cut -c 1-$max_length | wc -L)
if [ "$title" = "Stopped" ]; then
icon music
echo Stopped
@@ -2,9 +2,9 @@
# MIT Copyright (c) 2018 Luiz de Milon (kori)
# get current memory usage
t=$(grep MemTotal /proc/meminfo | awk '{print $2}')
f=$(grep MemFree /proc/meminfo | awk '{print $2}')
b=$(grep ^Buffers /proc/meminfo | awk '{print $2}')
c=$(grep ^Cached /proc/meminfo | awk '{print $2}')
t=$(awk '/MemTotal/{print $2}' /proc/meminfo)
f=$(awk '/MemFree/{print $2}' /proc/meminfo)
b=$(awk '/^Buffers/{print $2}' /proc/meminfo)
c=$(awk '/^Cached/{print $2}' /proc/meminfo)
echo -n $(echo "($t - $f - $c - $b) / 1000" | bc)
echo $(echo "($t - $f - $c - $b) / 1000" | bc)
@@ -65,7 +65,6 @@ dzen_mpd() {
# Common folders and recent files, as well as some actions.
dzen_menu() {
set +e
notify-send asdf
align=l
icon_dzen() {
@@ -121,7 +121,7 @@ c_shadow_red="0.0"
c_shadow_blue="0.0"
c_shadow_green="0.0"
c_fading="false";
c_fading="false"
c_fade_in_step="0.1"
c_fade_out_step="0.1"
@@ -161,6 +161,8 @@ done
# it is possible to specify different information per monitor with variable barInfo<mon #> --> "options"
p_format="dropdown:desktop:github|title|mpd:volume:weather:clock" # Default options/items to include in info section of panel.
p_format="dropdown:desktop:github:title|org_task|dynamicmpd:volume:weather:clock" # Default options/items to include in info section of panel.
# Customize options on different computers by hostname.
# for example, here littleapple is my desktop (3 monitors) and home2 is my netbook.
if [ "$(hostname)" = "littleapple" ]; then
@@ -209,7 +209,7 @@ load_gtk() {
if ! margs gtkrc .gtkrc-2.0; then
target="$HOME/.themes/${THEME_NAME}_template"
mustache < $HOME/.wm/templates/oomox > $target
mustache < $HOME/.dotfiles/templates/oomox > $target
git_ensure oomox
cd "$gitdest"
@@ -265,6 +265,7 @@ load_dunst() {
}
load_mpd() {
mkdir "$HOME/.config/mpd/playlists"
margs mpd .config/mpd/mpd.conf
margs mpdcron .config/mpd/mpdcron.conf
}
@@ -27,7 +27,7 @@ p_bg_normal="#ffe3e3e3"
p_fg_active="#ff525252"
p_bg_active="#ffb9b9b9"
p_format_2="desktop:github:themeSwitch:title|org_task|dynamicmpd:volume:clock"
# p_format_2="desktop:github:themeSwitch:title|org_task|dynamicmpd:volume:clock"
p_title_show_mode=active # used by title.
p_height=25
@@ -37,8 +37,8 @@ p_window_class="noshadow"
p_line=2
p_padding=6
p_font_main="Go Mono for Powerline-12:style=Bold"
p_font_icon="FontAwesome-12" # Panel Icon font.
p_font_main="Go Mono for Powerline-10:style=Bold"
p_font_icon="FontAwesome-10" # Panel Icon font.
p_icon_enable=false
d_font="Go Mono for Powerline 10"
@@ -48,9 +48,9 @@ p_desktop_empty_label="$(uchar f1db)"
p_desktop_tiling_label=''
p_desktop_monocle_label="$(uchar f00b)"
st_font="Go Mono for Powerline-14:style=Regular"
st_font="Go Mono for Powerline-12:style=Regular"
p_title_only_show_active=true
maxWinNameLen=30
maxWinNameLen=40
p_title_theme="fg=\"#ff$(colort -t 30 525252)\""
p_desktop_theme="fg=\"#ff$(colort -t 30 525252)\""

0 comments on commit a2470a0

Please sign in to comment.