As configured in my dotfiles.
start new:
tmux
start new with session name:
" When started as "evim", evim.vim will already have done these settings. | |
if v:progname =~? "evim" | |
finish | |
endif | |
" Bail out if something that ran earlier, e.g. a system wide vimrc, does not | |
" want Vim to use these default values. | |
if exists('skip_defaults_vim') | |
finish | |
endif |
#!/bin/sh | |
# A script to fade volume when toggling MPD via mpc | |
mpc=`which mpc` | |
SINKAPP="mpd" | |
SECS=2.0 | |
sinks=$(pactl list sink-inputs) |
function! GetColorFromHighlightGroup(group, color, env) | |
return synIDattr(synIDtrans(hlID(a:group)), a:color, a:env) | |
endfunction | |
function! GetBackgroundColors(group) | |
return | |
\ ' ctermbg=' . GetColorFromHighlightGroup(a:group, 'bg', 'cterm') . | |
\ ' guibg=' . GetColorFromHighlightGroup(a:group, 'bg', 'gui') | |
endfunction |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/bin/sh | |
prog_name=${0##*/} | |
version=1.0 | |
version_text="Boilerplate for new scripts v$version" | |
options="h o: q v V" | |
help_text="Usage: $prog_name [-o <text>] [-hqvV] [<file>]... | |
Boilerplate for new scripts |
It's not immediately obvious how to pull down the code for a PR and test it locally. But it's pretty easy. (This assumes you have a remote for the main repo named upstream
.)
Getting the PR code
Make note of the PR number. For example, Rod's latest is PR #37: Psiphon-Labs/psiphon-tunnel-core#37
Fetch the PR's pseudo-branch (or bookmark or rev pointer whatever the word is), and give it a local branch name. Here we'll name it pr37
:
$ git fetch upstream pull/37/head:pr37
#!/usr/bin/env python3 | |
import sys | |
import requests | |
import datetime as dt | |
import pathlib | |
import csv | |
import requests_cache | |
expire_after = dt.timedelta(days=3) | |
session = requests_cache.CachedSession(cache_name='cache', backend='sqlite', expire_after=expire_after) |
import sys | |
import csv | |
import pprint | |
import datetime as dt | |
import json | |
import pathlib | |
pp = pprint.PrettyPrinter(indent=4) | |
CBP_PATH = pathlib.Path(__file__).parent.resolve() |
Installing Nautilus directly from Nixpkgs in Non-NixOS systems have no support for mounting sftps and other features that needs gvfs.
The solution for this is to install gnome3.gvfs
in your packages list and then setup the env variable like this:
home.packages = with pkgs; [
gnome3.gvfs
gnome3.nautilus
];