# Buuf theme for PekWM based on "Buuf - OS" theme for Windows Blinds by d-erza
# License: Creative Commons Noncommercial-Share Alike
# Author: weakhead
# DeviantART profile: http://weakhead.deviantart.com/
# Box-Look profile: http://box-look.org/usermanager/search.php?username=weakhead
# TIP: To hide borders when using maximize button, uncomment lines 85 and 86 and comment line 84, then reload/restart PekWM. Toggling will be disabled - to undo maximized state and bring back borders, do right-click on maximize button.

$FONT = "Tahoma-10#Left#XFT"
$FONT_TITLE = "Tahoma-10#Left#XFT"
$FONT_MENU = "Tahoma-9:Italic#Center#XFT"
# Liberation Sans # Sans

Require {
  Templates = "True"
}

Define = "BaseDecor" {
  Height = "24"

  # Increase first number to bring title text downwards
  Pad = "4 5 5 0"

  Focused = "Image title.png"
  Unfocused = "Image title.png"

  Tab {
    Focused = "Empty"
    FocusedSelected = "Empty"
    Unfocused = "Empty"
    UnfocusedSelected = "Empty"
  }
  Separator {
    Focused = "Empty"
    Unfocused = "Empty"
  }
  Font {
    Focused = "$FONT_TITLE"
  }
  FontColor {
    Focused = "#595047"
    FocusedSelected = "#595047"
    Unfocused = "#a6a6a6"
    UnfocusedSelected = "#a6a6a6"
  }
  Border {
    Focused {
      TopLeft = "Image top-left.png"
      Top = "Image top-border.png"
      TopRight = "Image top-right.png"
      Left =  "Image border-left.png"
      Right = "Image border-right.png"
      BottomLeft = "Image bottom-left.png"
      Bottom = "Image bottom-border.png"
      BottomRight = "Image bottom-right.png"
    }
    Unfocused {
      TopLeft = "Image top-left.png"
      Top = "Image top-border.png"
      TopRight = "Image top-right.png"
      Left =  "Image border-left.png"
      Right = "Image border-right.png"
      BottomLeft = "Image bottom-left.png"
      Bottom = "Image bottom-border.png"
      BottomRight = "Image bottom-right.png"
    }
  }
}

Define = "BaseButtons" {
  Buttons {
    Right = "Close" {
      Focused = "Image close.png"
      Unfocused = "Image close-inactive.png"
      Hoover = "Image close-hover.png"
      Pressed = "Image close-pressed.png"
      Button = "1" { Actions = "Close" }
      Button = "3" { Actions = "Kill" }
    }

    Right = "Maximize" {
      Focused = "Image max.png"
      Unfocused = "Image max-inactive.png"
      Hoover = "Image max-hover.png"
      Pressed = "Image max-pressed.png"
      Button = "1" { Actions = "Toggle Maximized 1 1" }
#      Button = "1" { Actions = "Unset DecorBorder; Set Maximized" }
#      Button = "3" { Actions = "Set DecorBorder; Unset Maximized" }
    }

    Right = "Iconify" {
      Focused = "Image min.png"
      Unfocused = "Image min-inactive.png"
      Hoover = "Image min-hover.png"
      Pressed = "Image min-pressed.png"
      Button = "1" { Actions = "Set Iconified" }
    }
      
  }
}

Define = "EmptyDecor" {
  Focused = "Empty"
  Unfocused = "Empty"

  Tab {
    Focused = "Empty"
    FocusedSelected = "Empty"
    Unfocused = "Empty"
    UnfocusedSelected = "Empty"
  }

  Separator {
    Focused = "Empty"
    Unfocused = "Empty"
  }

  Font {
    Focused = "Empty"
  }

  FontColor {
    Focused = "Empty"
    FocusedSelected = "Empty"
    Unfocused = "Empty"
    UnfocusedSelected = "Empty"
  }    

  Border {
    Focused {
      TopLeft = "Empty"
      Top = "Empty"
      TopRight = "Empty"
      Left =  "Empty"
      Right = "Empty"
      BottomLeft = "Empty"
      Bottom = "Empty"
      BottomRight = "Empty"
    }
    Unfocused {
      TopLeft = "Empty"
      Top = "Empty"
      TopRight = "Empty"
      Left =  "Empty"
      Right = "Empty"
      BottomLeft = "Empty"
      Bottom = "Empty"
      BottomRight = "Empty"
    }
  }
}

Define = "MenuDecor" {

  Height = "0"

  # Increase first number to bring title text downwards
  Pad = "2 1 0 0"

  Focused = "Image menu-title.png"
  Unfocused = "Image menu-title.png"

  Font {
    Focused = "$FONT_MENU"
  }

  FontColor {
    Focused = "#000000"
    FocusedSelected = "#000000"
    Unfocused = "#a6a6a6"
    UnfocusedSelected = "#a6a6a6"
  }

  Border {
    Focused {
      TopLeft = "Image menu-corner.png"
      Top = "Image top-border.png"
      TopRight = "Image menu-corner.png"
      Left =  "Image menu-border.png"
      Right = "Image menu-border.png"
      BottomLeft = "Image menu-corner.png"
      Bottom = "Image menu-bottom.png"
      BottomRight = "Image menu-corner.png"
    }
    Unfocused {
      TopLeft = "Image menu-corner.png"
      Top = "Image top-border.png"
      TopRight = "Image menu-corner.png"
      Left =  "Image menu-border.png"
      Right = "Image menu-border.png"
      BottomLeft = "Image menu-corner.png"
      Bottom = "Image menu-bottom.png"
      BottomRight = "Image menu-corner.png"
    }
  }
}

PDecor {
  Decor = "Default" {
    Title {
      @BaseDecor
      @BaseButtons
    }
  }

  Decor = "Menu" {
    Title {
      @MenuDecor
    }
  }

  Decor = "Titlebarless" {
    Title {
      @EmptyDecor
    }
  }

  Decor = "Statuswindow" {
    Title {
      @EmptyDecor
    }
  }
}

Harbour {
  Texture = "Solid #f9f9f9"
}

Menu {
  Pad = "3 4 0 0"
# "0 0 4 4" 

  Focused {
    Font = "$FONT_MENU"
    Background = "Solid #ddd9ce"
    Item = "Empty"
    Text = "#000000" 
    Separator = "Image menuline.png#Scaled"
    Arrow = "Image arrow.png#Scaled"
  }
  Unfocused {
    Font = "$FONT_MENU"
    Background = "Solid #ddd9ce"
    Item = "Empty"
    Text = "#000000"
    Separator = "Image menuline.png#Scaled"
    Arrow = "Image arrow.png#Scaled"
  }
  Selected {
    Font = "$FONT_MENU"
    Background = "Solid #ddd9ce"
    Item = "Image item_focus.png#Scaled"
    Text = "#000000"
    Arrow = "Image arrow_focus.png#Scaled"
  }
}

CmdDialog {
  Font = "$FONT"
  Texture = "Solid #ddd9ce"
  Text = "#000000"
  Pad = "3 0 1 10"
}

Status {
  Font = "$FONT"
  Texture = "Solid #595047"
  Text = "#8b8b89"
  Pad = "2 2 10 10"
}
