My hacky terminal wallpaper switcher for macos.
Requires FZF https://github.com/junegunn/fzf
Assumes wallpapers are in /Library/Desktop Pictures
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # mac version | |
| # swap panes round ctrl+b o (hold cntrl) | |
| setw -g mode-keys vi | |
| unbind-key j | |
| bind-key j select-pane -D | |
| unbind-key k | |
| bind-key k select-pane -U | |
| unbind-key h | |
| bind-key h select-pane -L | |
| unbind-key l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [7] pry(main)> Bookings::PlacementDate.new({ 'date(1)' => '2019', 'date(2)' => '9', 'date(3)' => '31' }) | |
| => #<Bookings::PlacementDate:0x00007f842b73e680 id: nil, date: Tue, 01 Oct 2019, created_at: nil, updated_at: nil, duration: 1, active: true, bookings_school_id: nil> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env bash | |
| function colour () { | |
| local inFile=$1 | |
| local inname=$(basename ${inFile} | cut -d '.' -f1) | |
| local extension=$(echo $inFile | rev | cut -d '.' -f1 | rev) | |
| local brightness=100 | |
| local sturation=100 | |
| if [ $# -eq 1 ] | |
| then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # mac version | |
| # swap panes round ctrl+b o (hold cntrl) | |
| setw -g mode-keys vi | |
| unbind-key j | |
| bind-key j select-pane -D | |
| unbind-key k | |
| bind-key k select-pane -U | |
| unbind-key h | |
| bind-key h select-pane -L | |
| unbind-key l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # swap panes round ctrl+b o (hold cntrl) | |
| setw -g mode-keys vi | |
| unbind-key j | |
| bind-key j select-pane -D | |
| unbind-key k | |
| bind-key k select-pane -U | |
| unbind-key h | |
| bind-key h select-pane -L | |
| unbind-key l | |
| bind-key l select-pane -R |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class EventHandler | |
| attr_accessor :some_error, | |
| :some_compelted_task, | |
| :something_else | |
| def initialize | |
| instance_variables.each do |symbol| | |
| instance_varialbe_set(symbol, proc {}) | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| target = '#<Workout id: 9, name: "FFF", created_at: "2017-07-08 22:49:20", updated_at: "2017-07-08 22:49:20", date: "2017-07-08 00:00:00", user_id: 1>' | |
| captures = target.scan /\s(\w+):(?:\s"|\s)(.*?)(?=(?:",\s|,\s|">$|>$))/ #=> [["id", "9"], ["name", "FFF"], ["created_at", "2017-07-08 22:49:20"], ["updated_at", "2017-07-08 22:49:20"], ["date", "2017-07-08 00:00:00"], ["user_id", "1"]] | |
| Hash[captures] #=> {"id"=>"9", "name"=>"FFF", "created_at"=>"2017-07-08 22:49:20", "updated_at"=>"2017-07-08 22:49:20", "date"=>"2017-07-08 00:00:00", "user_id"=>"1"} | |
| # Regex break down | |
| # a space followed by one or more words, that we capture | |
| # followed by a colon | |
| # followed by a space and quote or just a space, neither of which we capture | |
| # followed by zero or more of any character, which we capture | |
| # upto one of the following sequences, that we dont capture; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| caption always "%{=b dw}:%{-b dw}:%{=b dk}[ %{-b dw}%{-b dg}$USER%{-b dw}@%{-b dg}%H %{=b dk}] [ %= %?%{-b dg}%-Lw%?%{+b dk}(%{+b dw}%n:%t%{+b dk})%?(%u)%?%{-b dw}%?%{-b dg}%+Lw%? %{=b dk}]%{-b dw}:%{+b dw}:" | |
| hardstatus alwayslastline "%{+b dw}:%{-b dw}:%{+b dk}[%{-b dg} %0C:%s%a %{=b dk}]-[ %{-b dw}Load%{+b dk}:%{-b dg}%l %{+b dk}] [%{-b dg}%2`%{+b dk}] %=[ %{-b dg}%1`%{=b dk} ]%{-b dw}:%{+b dw}:%<" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " Name: hydrangea.vim --- Hydrangea theme for Vim | |
| " Author: Yuta Taniguchi <yuta.taniguchi.y.t@gmail.com> | |
| " URL: https://github.com/yuttie/hydrangea-vim | |
| " Version: 4.1.0 | |
| " License: MIT License | |
| hi clear | |
| if exists('syntax_on') | |
| syntax reset | |
| endif |
NewerOlder