Skip to content

Commit

Permalink
Bind key to toggle through selectable themes in rtorrent config (Closes
Browse files Browse the repository at this point in the history
  • Loading branch information
chros authored and chros committed Jul 6, 2016
1 parent b5bf27c commit c471e15
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion ubuntu-14.04/home/chros73/.pyroscope/rtorrent-ps.rc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@

##### begin: Defining and including color themes #####

# COMMAND: Defining selectable color theme configs
method.insert = cfg.theme.0, string|const|private, (cat,"color_scheme256-happy_pastel.rc")
method.insert = cfg.theme.1, string|const|private, (cat,"color_scheme256-solarized_yellow.rc")
method.insert = cfg.theme.2, string|const|private, (cat,"color_scheme256-solarized_blue.rc")

# COMMAND: Setting default theme config
method.insert = pyro.theme.selected, string|private, (cat,(cfg.theme.0))

# IMPORT: Import default color theme from external config
pyro.import = "color_scheme256-happy_pastel.rc"
pyro.import = (pyro.theme.selected)

##### end: Defining and including color themes #####

Expand Down Expand Up @@ -207,6 +215,12 @@ branch=pyro.extended=,"schedule2 = bind_send_scrape,0,0,\"ui.bind_key=download_l
method.insert = d.toggle_delqueue, simple|private, "branch=\"equal={d.custom=unsafe_data,cat=2}\",d.remove_from_delqueue=,\"branch=d.custom=unsafe_data,d.add_to_delqueue=,d.unsafe_data.set=1\""
branch=pyro.extended=,"schedule2 = bind_toggle_delqueue,0,0,\"ui.bind_key=download_list,\},d.toggle_delqueue=\""

# UI/KEY: Bind '|' to TOGGLE selectable THEMES defined at the top of this config file (Note: if a new theme is added to / removed from the available selection then this logic has to be modified as well!)
method.insert = pyro.theme.store_set, simple|private, "pyro.import=$cat=$argument.0= ;pyro.theme.selected.set=$argument.0="
method.insert = pyro.theme.toggle1, simple|private, "branch=\"equal={pyro.theme.selected=,cfg.theme.1=}\",pyro.theme.store_set=$cfg.theme.2=,pyro.theme.store_set=$cfg.theme.0="
method.insert = pyro.theme.toggle0, simple|private, "branch=\"equal={pyro.theme.selected=,cfg.theme.0=}\",pyro.theme.store_set=$cfg.theme.1=,pyro.theme.toggle1="
branch=pyro.extended=,"schedule2 = bind_toggle_theme,0,0,\"ui.bind_key=download_list,|,pyro.theme.toggle0=\""

### end: Generic keybindings and attributes ###

##### end: UI related commands and enhancements #####
Expand Down

0 comments on commit c471e15

Please sign in to comment.