Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- encoding: utf-8 -*-
- #
- # Author:: Christoph Kappel <unexist@subforge.org>
- # Version:: $Id: data/subtle.rb,v 3182 2012/02/04 16:39:33 unexist $
- # License:: GNU GPLv2
- #
- # = Subtle default configuration
- #
- # This file will be installed as default and can also be used as a starter for
- # an own custom configuration file. The system wide config usually resides in
- # +/etc/xdg/subtle+ and the user config in +HOME/.config/subtle+, both locations
- # are dependent on the locations specified by +XDG_CONFIG_DIRS+ and
- # +XDG_CONFIG_HOME+.
- #
- #
- # == Options
- #
- # Following options change behaviour and sizes of the window manager:
- #
- # Window move/resize steps in pixel per keypress
- set :increase_step, 5
- # Window screen border snapping
- set :border_snap, 10
- # Default starting gravity for windows. Comment out to use gravity of
- # currently active client
- #set :default_gravity, :center
- # Make dialog windows urgent and draw focus
- set :urgent_dialogs, false
- # Honor resize size hints globally
- set :honor_size_hints, false
- # Enable gravity tiling for all gravities
- set :gravity_tiling, false
- # Enable click-to-focus focus model
- set :click_to_focus, false
- # Skip pointer movement on e.g. gravity change
- set :skip_pointer_warp, false
- # Skip pointer movement to urgent windows
- set :skip_urgent_warp, false
- # Set the WM_NAME of subtle (Java quirk)
- # set :wmname, "LG3D"
- screen 1 do
- top [ :clock, :wifi, :volume, :center, :views, ]
- #bottom [ :center, :tray, ]
- end
- # Style for all style elements
- style :all do
- padding 2, 2, 2, 2
- margin 0, 0, 0, 0
- icon "#C2C2A8"
- font "xft:clean:pixelsize=9"
- end
- style :subtle do
- padding 0, 0, 0, 0
- margin 0, 0, 0, 0
- panel_top "#0d1319"
- panel_bottom "#0d1319"
- end
- style :clients do
- padding 0, 0, 0, 0
- margin 4, 4, 4, 4
- active "#BDC79E", 4
- inactive "#7F7F7a", 4
- width 75
- end
- style :title do
- padding 1, 4, 2, 4
- margin 0, 0, 0, 0
- foreground "#7A9388"
- background "#0d1319"
- font "xft:clean:pixelsize=9"
- end
- style :sublets do
- padding 1, 4, 2, 4
- margin 0, 0, 0, 0
- foreground "#C2C2A8"
- background "#0d1319"
- icon "#CD7860"
- font "xft:clean:pixelsize=9"
- end
- style :separator do
- padding 1, 2, 2, 2
- margin 0, 0, 0, 0
- foreground "#BDC79E"
- background "#0d1319"
- separator "|"
- font "xft:clean:pixelsize=9"
- end
- style :views do
- padding 1, 5, 2, 5
- margin 0, 0, 0, 0
- foreground "#C2C2A8"
- background "#0d1319"
- icon "#7A9388"
- font "xft:clean:pixelsize=9"
- style :urgent do
- padding 1, 5, 2, 5
- margin 0, 0, 0, 0
- foreground "#C2C2A8"
- background "#0d1319"
- icon "#C2C2A8"
- font "xft:clean:pixelsize=9"
- end
- style :occupied do
- padding 1, 5, 2, 5
- margin 0, 0, 0, 0
- foreground "#C2C2A8"
- background "#0d1319"
- icon "#C2C2A8"
- font "xft:clean:pixelsize=9"
- end
- style :focus do
- padding 1, 5, 2, 5
- margin 0, 0, 0, 0
- foreground "#7A9388"
- background "#0d1319"
- border_bottom "#D6D6D6", 2
- icon "#7A9388"
- font "xft:clean:pixelsize=9"
- end
- end
- #
- # == Views
- #view "" do
- # match "code"
- #icon "/home/literallyryan/images/mail.xbm"
- #end
- #
- # == Gravities
- #
- # Gravities are predefined sizes a window can be set to. There are several ways
- # to set a certain gravity, most convenient is to define a gravity via a tag or
- # change them during runtime via grab. Subtler and subtlext can also modify
- # gravities.
- #
- # A gravity consists of four values which are a percentage value of the screen
- # size. The first two values are x and y starting at the center of the screen
- # and he last two values are the width and height.
- #
- # Top left
- gravity :top_left, [ 0, 0, 50, 50 ]
- gravity :top_left66, [ 0, 0, 50, 66 ]
- gravity :top_left33, [ 0, 0, 50, 34 ]
- # Top
- gravity :top, [ 0, 0, 100, 50 ]
- gravity :top66, [ 0, 0, 100, 66 ]
- gravity :top33, [ 0, 0, 100, 34 ]
- # Top right
- gravity :top_right, [ 50, 0, 50, 50 ]
- gravity :top_right66, [ 50, 0, 50, 66 ]
- gravity :top_right33, [ 50, 0, 50, 33 ]
- # Left
- gravity :left, [ 0, 0, 50, 100 ]
- gravity :left66, [ 0, 0, 66, 100 ]
- gravity :left33, [ 0, 0, 33, 100 ]
- # Center
- gravity :center, [ 0, 0, 100, 100 ]
- gravity :center66, [ 17, 17, 66, 66 ]
- gravity :center33, [ 33, 33, 33, 33 ]
- # Right
- gravity :right, [ 50, 0, 50, 100 ]
- gravity :right66, [ 34, 0, 66, 100 ]
- gravity :right33, [ 67, 0, 33, 100 ]
- # Bottom left
- gravity :bottom_left, [ 0, 50, 50, 50 ]
- gravity :bottom_left66, [ 0, 34, 50, 66 ]
- gravity :bottom_left33, [ 0, 67, 50, 33 ]
- # Bottom
- gravity :bottom, [ 0, 50, 100, 50 ]
- gravity :bottom66, [ 0, 34, 100, 66 ]
- gravity :bottom33, [ 0, 67, 100, 33 ]
- # Bottom right
- gravity :bottom_right, [ 50, 50, 50, 50 ]
- gravity :bottom_right66, [ 50, 34, 50, 66 ]
- gravity :bottom_right33, [ 50, 67, 50, 33 ]
- # Gimp
- gravity :gimp_image, [ 10, 0, 80, 100 ]
- gravity :gimp_toolbox, [ 0, 0, 10, 100 ]
- gravity :gimp_dock, [ 90, 0, 10, 100 ]
- # Switch current view
- grab "W-1", :ViewSwitch1
- grab "W-2", :ViewSwitch2
- grab "W-3", :ViewSwitch3
- grab "W-4", :ViewSwitch4
- # Move mouse to screen1, screen2, ...
- grab "W-A-1", :ScreenJump1
- grab "W-A-2", :ScreenJump2
- grab "W-A-3", :ScreenJump3
- grab "W-A-4", :ScreenJump4
- # Force reload of config and sublets
- grab "W-C-r", :SubtleReload
- # Force restart of subtle
- grab "W-A-r", :SubtleRestart
- # Quit subtle
- grab "W-C-q", :SubtleQuit
- # Move current window
- grab "W-B1", :WindowMove
- # Resize current window
- grab "W-B3", :WindowResize
- # Toggle floating mode of window
- grab "W-7", :WindowFloat
- # Toggle fullscreen mode of window
- grab "W-space", :WindowFull
- # Toggle sticky mode of window (will be visible on all views)
- grab "W-s", :WindowStick
- # Toggle zaphod mode of window (will span across all screens)
- grab "W-equal", :WindowZaphod
- # Raise window
- grab "W-r", :WindowRaise
- # Lower window
- grab "W-l", :WindowLower
- # Select next windows
- grab "W-Left", :WindowLeft
- grab "W-Down", :WindowDown
- grab "W-Up", :WindowUp
- grab "W-Right", :WindowRight
- # Kill current window
- grab "W-S-k", :WindowKill
- # Cycle between given gravities
- #grab "W-l-7", [ :top_left, :top_left66, :top_left33 ]
- #grab "W-KP_8", [ :top, :top66, :top33 ]
- #grab "W-KP_9", [ :top_right, :top_right66, :top_right33 ]
- #grab "W-KP_4", [ :left, :left66, :left33 ]
- #grab "W-KP_5", [ :center, :center66, :center33 ]
- #grab "W-KP_6", [ :right, :right66, :right33 ]
- #grab "W-KP_1", [ :bottom_left, :bottom_left66, :bottom_left33 ]
- #grab "W-KP_2", [ :bottom, :bottom66, :bottom33 ]
- #grab "W-KP_3", [ :bottom_right, :bottom_right66, :bottom_right33 ]
- # In case no numpad is available e.g. on notebooks
- #grab "W-q", [ :top_left, :top_left66, :top_left33 ]
- #grab "W-w", [ :top, :top66, :top33 ]
- #grab "W-e", [ :top_right, :top_right66, :top_right33 ]
- #grab "W-a", [ :left, :left66, :left33 ]
- #grab "W-s", [ :center, :center66, :center33 ]
- #grab "W-d", [ :right, :right66, :right33 ]
- #
- # QUERTZ
- #grab "W-y", [ :bottom_left, :bottom_left66, :bottom_left33 ]
- #
- # QWERTY
- grab "W-z", [ :bottom_left, :bottom_left66, :bottom_left33 ]
- grab "W-x", [ :bottom, :bottom66, :bottom33 ]
- grab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
- # Exec programs
- grab "W-Return", "urxvt"
- grab "W-f", "firefox"
- grab "W-g", "gedit"
- grab "S-i", "urxvt exec weechat-curses"
- # Run Ruby lambdas
- grab "S-F2" do |c|
- puts c.name
- end
- grab "S-F3" do
- puts Subtlext::VERSION
- end
- # Simple tags
- tag "terms", "urxvt"
- tag "www", "firefox|iceweasel" do
- gravity :center
- end
- tag "media", "evince"
- tag "editor", "gedit|geany"do
- gravity :center
- end
- # Placement
- tag "editor" do
- match "gedit|geany"
- resize true
- end
- tag "clean" do
- geometry [ 10, 10, 100, 100 ]
- stick true
- end
- tag "resize" do
- match "sakura|gvim"
- resize true
- end
- tag "gravity" do
- gravity :center
- end
- # Modes
- tag "stick" do
- match "mplayer"
- float true
- stick true
- end
- tag "float" do
- match "display"
- float true
- end
- # Gimp
- tag "gimp_image" do
- match :role => "gimp-image-window"
- gravity :gimp_image
- end
- tag "gimp_toolbox" do
- match :role => "gimp-toolbox$"
- gravity :gimp_toolbox
- end
- tag "gimp_dock" do
- match :role => "gimp-dock"
- gravity :gimp_dock
- end
- tag "gimp_scum" do
- match role: "gimp-.*|screenshot"
- end
- #
- # == Views
- #
- # Views are the virtual desktops in subtle, they show all windows that share a
- # tag with them. Windows that have no tag will be visible on the default view
- # which is the view with the default tag or the first defined view when this
- # tag isn't set.
- #
- # Like tags views can be defined in two ways:
- #
- # === Simple
- #
- # The simple way is exactly the same as for tags:
- #
- # Example:
- #
- # view "terms", "terms"
- #
- # === Extended
- #
- # The extended way for views is also similar to the tags, but with fewer
- # properties.
- #
- # Example:
- #
- # view "terms" do
- # match "terms"
- # icon "/usr/share/icons/icon.xbm"
- # end
- #
- # === Properties
- #
- # [*match*] This property adds a matching pattern to a view. Matching
- # works either via plaintext or regex (see man regex(7)) and
- # applies to names of tags.
- #
- # Example: match "terms"
- #
- # [*dynamic*] This property hides unoccupied views, views that display no
- # windows.
- #
- # Example: dynamic true
- #
- # [*icon*] This property adds an icon in front of the view name. The
- # icon can either be path to an icon or an instance of
- # Subtlext::Icon.
- #
- # Example: icon "/usr/share/icons/icon.xbm"
- # icon Subtlext::Icon.new("/usr/share/icons/icon.xbm")
- #
- # [*icon_only*] This property hides the view name from the view buttons, just
- # the icon will be visible.
- #
- # Example: icon_only true
- #
- #
- # === Link
- #
- # http://subforge.org/projects/subtle/wiki/Tagging
- #
- view "terms", "terms|urxvt"
- #do
- # icon "/home/literallyryan/images/cpu.xbm"
- #end
- view "www", "www|firefox|iceweasel"
- view "media", "evince|pdf|media"
- view "code", "editor|geany|gedit"
- #
- # == Sublets
- #
- # Sublets are Ruby scripts that provide data for the panel and can be managed
- # with the sur script that comes with subtle.
- #
- # === Example
- #
- # sur install clock
- # sur uninstall clock
- # sur list
- #
- # === Configuration
- #
- # All sublets have a set of configuration values that can be changed directly
- # from the config of subtle.
- #
- # There are three default properties, that can be be changed for every sublet:
- #
- # [*interval*] Update interval of the sublet
- # [*foreground*] Default foreground color
- # [*background*] Default background color
- #
- # sur can also give a brief overview about properties:
- #
- # === Example
- #
- # sur config clock
- #
- # The syntax of the sublet configuration is similar to other configuration
- # options in subtle:
- #
- # === Example
- #
- # sublet :clock do
- # interval 30
- # foreground "#eeeeee"
- # background "#000000"
- # format_string "%H:%M:%S"
- # end
- #
- # === Link
- #
- # http://subforge.org/projects/subtle/wiki/Sublets
- sublet :clock do
- interval 30
- #format_string "%H:%M | %a %d %b"
- format_string "%a %d %b"
- end
- sublet :tint2 do
- interval 1
- end
- # == Hooks
- #
- # And finally hooks are a way to bind Ruby scripts to a certain event.
- #
- # Following hooks exist so far:
- #
- # [*:client_create*] Called whenever a window is created
- # [*:client_configure*] Called whenever a window is configured
- # [*:client_focus*] Called whenever a window gets focus
- # [*:client_kill*] Called whenever a window is killed
- #
- # [*:tag_create*] Called whenever a tag is created
- # [*:tag_kill*] Called whenever a tag is killed
- #
- # [*:view_create*] Called whenever a view is created
- # [*:view_configure*] Called whenever a view is configured
- # [*:view_jump*] Called whenever the view is switched
- # [*:view_kill*] Called whenever a view is killed
- #
- # [*:tile*] Called on whenever tiling would be needed
- # [*:reload*] Called on reload
- # [*:start*] Called on start
- # [*:exit*] Called on exit
- #
- # === Example
- #
- # This hook will print the name of the window that gets the focus:
- #
- # on :client_focus do |c|
- # puts c.name
- # end
- #
- # === Link
- #
- # http://subforge.org/projects/subtle/wiki/Hooks
- #
- # vim:ts=2:bs=2:sw=2:et:fdm=marker
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement