diff --git a/.symlinks b/.symlinks index f9c12b2e..fe4871f2 100644 --- a/.symlinks +++ b/.symlinks @@ -44,3 +44,4 @@ bin .Xresources.office .yaourtrc .zshrc +.themes/op/xfce-notify-4.0 diff --git a/.themes/op/xfce-notify-4.0/gtk.css b/.themes/op/xfce-notify-4.0/gtk.css new file mode 100644 index 00000000..cf3fd389 --- /dev/null +++ b/.themes/op/xfce-notify-4.0/gtk.css @@ -0,0 +1,49 @@ +#XfceNotifyWindow { + font-family: "Ubuntu Mono"; +} + +#XfceNotifyWindow { + background-color: shade(#686868, 0.3); + color: #fcfcfc; + border: 1px solid shade(#686868, 0.6); + border-radius: 6px; +} + +#XfceNotifyWindow button { + background-image: none; + background-color: shade(#686868, 0.3); + color: #fcfcfc; + border-color: shade(#fcfcfc, 0.35); + border-radius: 3px; +} + +#XfceNotifyWindow button:hover { + background-color: shade(#686868, 0.4); + border-color: shade(#fcfcfc, 0.45); +} + +#XfceNotifyWindow label#summary { + font-weight: bold; +} + +#XfceNotifyWindow progressbar { + min-height: 6px; + border-radius: 3px; +} + +#XfceNotifyWindow progressbar progress { + background-image: none; + background-color: #fcfcfc; + border: none; + box-shadow: none; +} + +#XfceNotifyWindow progressbar trough { + background-image: linear-gradient(to bottom, + shade(#686868, 0.65), + shade(#686868, 1.25) + ); + border: 1px solid shade(#686868, 0.2); + border-radius: 3px; + padding: 1px 0; +} diff --git a/.themes/op/xfce-notify-4.0/gtkrc b/.themes/op/xfce-notify-4.0/gtkrc new file mode 100644 index 00000000..b5172fa6 --- /dev/null +++ b/.themes/op/xfce-notify-4.0/gtkrc @@ -0,0 +1,62 @@ +style "notify-window" +{ + XfceNotifyWindow::summary-bold = 1 + XfceNotifyWindow::border-color = "#ffffff" + XfceNotifyWindow::border-color-hover = "#ffffff" + XfceNotifyWindow::border-radius = 10.0 + XfceNotifyWindow::border-width = 0.1 + XfceNotifyWindow::border-width-hover = 0.1 + bg[NORMAL] = "#111" +} + +style "notify-button" +{ + bg[NORMAL] = "#202020" + bg[PRELIGHT] = "#303030" + bg[ACTIVE] = "#222222" + fg[NORMAL] = "#ffffff" + fg[PRELIGHT] = "#ffffff" + engine "murrine" { + border_shades = { 2.9, 2.6 } + shadow_shades = {2.4,2.4} + roundness = 4 + } +} + +style "notify-text" +{ + fg[NORMAL] = "#ffffff" + fg[PRELIGHT] = "#ffffff" + GtkWidget::link-color = "#a7a7a7" +} + +style "notify-summary" +{ + font_name = "Bold" +} + +style "notify-progressbar" +{ + GtkProgressBar::min-horizontal-bar-height = 4 + xthickness = 0 + ythickness = 0 + + fg[PRELIGHT] = "#000000" + bg[NORMAL] = "#fefefe" + bg[SELECTED] = "#fefefe" + bg[ACTIVE] = "#696969" + + engine "murrine" { + gradient_shades = { 1.0, 1.0, 1.0, 1.0 } + contrast = 0.5 + border_shades = { 0.9, 0.9 } + progressbarstyle = 0 + } +} + +class "XfceNotifyWindow" style "notify-window" +widget "XfceNotifyWindow.*.summary" style "notify-summary" +widget_class "XfceNotifyWindow.*" style "notify-button" +widget_class "XfceNotifyWindow.*." style "notify-text" +widget_class "XfceNotifyWindow.*." style "notify-progressbar" +widget_class "XfceNotifyWindow.*." style "notify-progressbar" diff --git a/bin/chrome-profile b/bin/chrome-profile index a94293ee..3c170267 100755 --- a/bin/chrome-profile +++ b/bin/chrome-profile @@ -9,4 +9,4 @@ fi dir=~/.config/chrome-${profile}/ mkdir -p $dir -exec chromium --user-data-dir=$dir +exec firefox --profile $dir diff --git a/bin/dotfileit b/bin/dotfileit index df0bff62..f3bcd915 100755 --- a/bin/dotfileit +++ b/bin/dotfileit @@ -30,7 +30,7 @@ set -euo pipefail fi if [[ "$action" == "mv" ]]; then - install -DT "$target" "$dotfile" + rsync -av "$target" "$dotfile" ask_rm=true fi @@ -39,7 +39,7 @@ set -euo pipefail fi else echo ":: copying to dotfiles: $relative" - install -DT "$target" "$dotfile" + rsync -av "$target" "$dotfile" ask_rm=true fi diff --git a/bin/infobar b/bin/infobar index ceb341d5..e7be794c 100755 --- a/bin/infobar +++ b/bin/infobar @@ -2,8 +2,14 @@ colorscheme=1 +notify_id="" :notify() { - notify-send.sh -r 1000 -t 1000 " " -- "$*" + arg="" + if [[ "$notify_id" ]]; then + arg="-r $notify_id" + fi + + notify_id=$(notify-desktop $arg -t 1000 "INFORMATION" -- "$*") } :body-append() { @@ -23,25 +29,13 @@ colorscheme=1 #printf '%-8s %s\n' "$section" "$content" local token=(${section}) - local section=$( - :span "${token[0]}" "$(printf '%-8s' "$section")" - ) + local section=$(printf '%-8s' "$section") append="$section $content" body="${body}$append" } -:span() { - local token="$1" - local content="$2" - - local bg=$(:color "${token}" 0 $colorscheme) - local fg=$(:color "${token}" 1 $colorscheme) - - :span-bg-fg "$bg" "$fg" "$content" -} - :span-bg-fg() { local bg=$1 local fg=$2 @@ -111,9 +105,7 @@ colorscheme=1 :get-section-wifi() { local wifi=$(wifi) - if [[ "$wifi" ]]; then - :span "$wifi" "$wifi" - fi + echo "$wifi" } :get-section-vpn() { @@ -132,26 +124,6 @@ colorscheme=1 fi } -:color() { - local text="$1" - local query="$(md5sum <<<"$text" | awk '{print $1}')" - local color="${2:-0}" - local scheme="${3:-0}" - - # based upon http://jimlund.org/blog/pics/colortest_iTerm.png - local lookback=$((($color * 2) % (6 * 6))) - local seed=$((0x${query:1:2} + $scheme)) - local base=$((16 + ($seed % (230 - 16)))) - local block=$((($base - 16) / 6)) - local index=$((($base - 16) % 6)) - local next=$((((\ - $block >= $lookback) ? (\ - $block - $lookback) : (\ - 6 * 6 - $lookback + $block)) * \ - 6 + 16 + $index + 2)) - - color-to-hex "$next" -} _bg="" :body-save() {