diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 59f1563..d48d666 100755 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -97,8 +97,8 @@ layouts = { awful.layout.suit.floating, -- 1 awful.layout.suit.tile, -- 2 - awful.layout.suit.tile.left, -- 3 - awful.layout.suit.tile.bottom, -- 4 + awful.layout.suit.fair, -- 3 + awful.layout.suit.tile.left, -- 4 awful.layout.suit.tile.top, -- 5 } @@ -361,7 +361,15 @@ function(widget, args) if( args["{Title}"] ~= curr_track ) then curr_track = args["{Title}"] - run_once(scriptdir .. "mpdinfo") + os.execute(scriptdir .. "mpdinfo") + old_id = naughty.notify({ + title = "Now playing", + text = args["{Artist}"] .. " (" .. args["{Album}"] .. ")\n" .. args["{Title}"], + icon = "/tmp/mpdnotify_cover.png", + bg = "#060606", + timeout = 5, + replaces_id = old_id + }).id end return gray .. args["{Artist}"] .. coldef .. white .. " " .. args["{Title}"] .. coldef elseif (args["{state}"] == "Pause") then @@ -861,10 +869,7 @@ awful.rules.rules = { properties = { floating = true } }, { rule = { class = "Dwb" }, - properties = { tag = tags[1][1], - x = 0, y = 20, - width = 1364, - height = 748 } }, + properties = { tag = tags[1][1] } }, { rule = { class = "Gvim" }, properties = { tag = tags[1][2] } }, diff --git a/screenshot/blackburn.png b/screenshot/blackburn.png index d3e1702..98c6c0b 100644 Binary files a/screenshot/blackburn.png and b/screenshot/blackburn.png differ diff --git a/scripts/mpdinfo b/scripts/mpdinfo index b9eb862..8693378 100755 --- a/scripts/mpdinfo +++ b/scripts/mpdinfo @@ -3,16 +3,6 @@ # A simple notify script for now-playing songs on mpd. This script uses # notify-send and mpc to get the current song information. -# Requirements (* = optional) -# - mpd -# - mpc -# - notify-send (libnotify) -# * ImageMagick (convert) - -# Author : Wolfgang Mueller -# You can use, edit and redistribute this script in any way you like. -# (Just make sure not to hurt any kittens) - # Configuration------------------------------------------------------- # The music directory that contains the music and cover files @@ -21,22 +11,9 @@ MUSIC_DIR="$HOME/Musica" # The default cover to use (optional) DEFAULT_ART="" -# The following track metadata delimiters can be changed. -# You can find all possible delimiters in the 'mpc' manpage. -# It's also possible to use pango markup like and - -# How to format artist/album information -A_FORMAT="%artist%[ (%album%)] - %date%" - -# How to format title information -T_FORMAT="%title%" - # Regex expression used for image search IMG_REG="(front|cover|art|Folder|folder)\.(jpg|jpeg|png|gif)$" -# Title of the notification -NOTIFY_TITLE="Now Playing" - # Path of temporary resized cover TEMP_PATH="/tmp/mpdnotify_cover.png" @@ -46,9 +23,6 @@ COVER_RESIZE="100x100" # Thumbnail background (transparent by default) COVER_BACKGROUND="none" -# Logfile -LOGFILE="$HOME/.mpdnotify.log" - #-------------------------------------------------------------------- # determine file @@ -57,12 +31,6 @@ file="$(mpc current -f %file%)" # check if anything is playing at all [[ -z $file ]] && exit 1 -# Get title info -title="$(mpc current -f "$A_FORMAT")" - -# Get song info -song="$(mpc current -f "$T_FORMAT")" - # Art directory art="$MUSIC_DIR/${file%/*}" @@ -75,14 +43,10 @@ cover="${cover:=$DEFAULT_ART}" # check if art is available if [[ -n $cover ]]; then - -if [[ -n $COVER_RESIZE ]]; then -convert "$cover" -thumbnail $COVER_RESIZE -gravity center \ - -background "$COVER_BACKGROUND" -extent $COVER_RESIZE "$TEMP_PATH" >> "$LOGFILE" 2>&1 + if [[ -n $COVER_RESIZE ]]; then + convert "$cover" -thumbnail $COVER_RESIZE -gravity center -background "$COVER_BACKGROUND" -extent $COVER_RESIZE "$TEMP_PATH" cover="$TEMP_PATH" - fi - -notify-send -t 5000 --hint=int:transient:1 "$NOTIFY_TITLE" "$title\n$song" -i "$cover" >> "$LOGFILE" 2>&1 -else -notify-send -t 5000 --hint=int:transient:1 "$NOTIFY_TITLE" "$title\n$song" >> "$LOGFILE" 2>&1 + fi fi + +exit 0 diff --git a/themes/blackburn/theme.lua b/themes/blackburn/theme.lua index 1a6b4b6..189a729 100644 --- a/themes/blackburn/theme.lua +++ b/themes/blackburn/theme.lua @@ -9,29 +9,30 @@ theme = {} themes_dir = os.getenv("HOME") .. "/.config/awesome/themes/blackburn" +themes_bg_normal = "png:" .. themes_dir .. "/taskbar/bg_normal.png" +themes_bg_focus = "png:" .. themes_dir .. "/taskbar/bg_focus.png" + theme.wallpaper = themes_dir .. "/wall.png" theme.font = "Tamsyn 10" theme.taglist_font = "Termsyn 10" theme.fg_normal = "#AAAAAA" theme.fg_focus = "#D79D38" +theme.bg_normal = themes_bg_normal +theme.bg_focus = "#060606" theme.fg_urgent = "#CC9393" -theme.bg_normal = "#000000" -theme.bg_focus = "#000000" -theme.bg_urgent = "#2A1f1E" +theme.bg_urgent = "#2A1F1E" theme.border_width = "1" -theme.border_normal = "#101010" -theme.border_focus = "#606060" +theme.border_normal = "#0E0E0E" +theme.border_focus = "#404040" theme.border_marked = "#CC9393" theme.titlebar_bg_focus = "#FFFFFF" theme.titlebar_bg_normal = "#FFFFFF" theme.taglist_fg_focus = "#F6784F" -theme.tasklist_bg_focus = "#000000" +theme.taglist_bg_focus = themes_bg_focus theme.tasklist_fg_focus = "#F6784F" +theme.tasklist_bg_focus = themes_bg_normal theme.textbox_widget_margin_top = 1 -theme.notify_fg = theme.fg_normal -theme.notify_bg = theme.bg_normal -theme.notify_border = theme.border_focus theme.awful_widget_height = 14 theme.awful_widget_margin_top = 2 theme.mouse_finder_color = "#CC9393" @@ -54,6 +55,7 @@ theme.layout_max = themes_dir .. "/icons/max.png" theme.layout_fullscreen = themes_dir .. "/icons/fullscreen.png" theme.layout_magnifier = themes_dir .. "/icons/magnifier.png" theme.layout_floating = themes_dir .. "/icons/floating.png" + theme.tasklist_floating = "" theme.tasklist_maximized_horizontal = "" theme.tasklist_maximized_vertical = ""