Compare commits
9 Commits
89657f9dab
...
620392f08e
Author | SHA1 | Date |
---|---|---|
Nico | 620392f08e | |
Nico | 0916c0fb21 | |
Nico | 46b9afaf90 | |
Nico | f07375057d | |
Nico | 599b8acf3c | |
Nico | e34affac28 | |
Nico | d541669ed3 | |
Nico | bee2f07685 | |
Nico | 53b885f474 |
|
@ -1,77 +1,77 @@
|
|||
session.screen0.menu.alpha: 255
|
||||
session.screen0.window.focus.alpha: 255
|
||||
session.screen0.window.unfocus.alpha: 255
|
||||
session.screen0.toolbar.widthPercent: 100
|
||||
session.screen0.toolbar.maxOver: false
|
||||
session.screen0.toolbar.tools: prevworkspace, workspacename, nextworkspace, iconbar, systemtray, clock
|
||||
session.screen0.toolbar.height: 0
|
||||
session.screen0.toolbar.layer: Dock
|
||||
session.screen0.toolbar.onhead: 1
|
||||
session.screen0.toolbar.placement: BottomCenter
|
||||
session.screen0.toolbar.alpha: 255
|
||||
session.screen0.toolbar.autoHide: true
|
||||
session.screen0.toolbar.visible: true
|
||||
session.screen0.clientMenu.usePixmap: true
|
||||
session.screen0.tab.placement: TopLeft
|
||||
session.screen0.tab.width: 64
|
||||
session.screen0.slit.acceptKdeDockapps: true
|
||||
session.screen0.slit.layer: Dock
|
||||
session.screen0.slit.onhead: 0
|
||||
session.screen0.slit.maxOver: false
|
||||
session.screen0.slit.placement: RightBottom
|
||||
session.screen0.slit.alpha: 255
|
||||
session.screen0.slit.autoHide: false
|
||||
session.screen0.titlebar.left: Stick
|
||||
session.screen0.titlebar.right: Minimize Maximize Close
|
||||
session.screen0.tabs.usePixmap: true
|
||||
session.screen0.tabs.maxOver: false
|
||||
session.screen0.tabs.intitlebar: true
|
||||
session.screen0.titlebar.left: Stick
|
||||
session.screen0.titlebar.right: Minimize Maximize Close
|
||||
session.screen0.iconbar.mode: {static groups} (workspace)
|
||||
session.screen0.iconbar.iconWidth: 128
|
||||
session.screen0.iconbar.iconTextPadding: 10
|
||||
session.screen0.iconbar.usePixmap: false
|
||||
session.screen0.iconbar.iconTextPadding: 10
|
||||
session.screen0.iconbar.alignment: Relative
|
||||
session.screen0.clientMenu.usePixmap: true
|
||||
session.screen0.toolbar.maxOver: false
|
||||
session.screen0.toolbar.height: 0
|
||||
session.screen0.toolbar.alpha: 255
|
||||
session.screen0.toolbar.tools: prevworkspace, workspacename, nextworkspace, iconbar, systemtray, clock
|
||||
session.screen0.toolbar.layer: Dock
|
||||
session.screen0.toolbar.placement: BottomCenter
|
||||
session.screen0.toolbar.widthPercent: 100
|
||||
session.screen0.toolbar.onhead: 1
|
||||
session.screen0.toolbar.autoHide: true
|
||||
session.screen0.toolbar.visible: true
|
||||
session.screen0.menu.alpha: 255
|
||||
session.screen0.slit.onhead: 0
|
||||
session.screen0.slit.acceptKdeDockapps: true
|
||||
session.screen0.slit.maxOver: false
|
||||
session.screen0.slit.autoHide: false
|
||||
session.screen0.slit.placement: RightBottom
|
||||
session.screen0.slit.alpha: 255
|
||||
session.screen0.slit.layer: Dock
|
||||
session.screen0.allowRemoteActions: false
|
||||
session.screen0.strftimeFormat: %Y-%m-%d
|
||||
session.screen0.noFocusWhileTypingDelay: 0
|
||||
session.screen0.rowPlacementDirection: LeftToRight
|
||||
session.screen0.demandsAttentionTimeout: 500
|
||||
session.screen0.edgeSnapThreshold: 10
|
||||
session.screen0.tabFocusModel: ClickToTabFocus
|
||||
session.screen0.workspaces: 4
|
||||
session.screen0.focusSameHead: false
|
||||
session.screen0.maxIgnoreIncrement: true
|
||||
session.screen0.opaqueMove: true
|
||||
session.screen0.windowPlacement: RowMinOverlapPlacement
|
||||
session.screen0.showwindowposition: false
|
||||
session.screen0.maxDisableResize: false
|
||||
session.screen0.defaultDeco: NORMAL
|
||||
session.screen0.menuDelay: 200
|
||||
session.screen0.workspaceNames: Workspace 1,Workspace 2,Workspace 3,Workspace 4,
|
||||
session.screen0.tooltipDelay: 500
|
||||
session.screen0.workspacewarping: true
|
||||
session.screen0.clickRaises: true
|
||||
session.screen0.fullMaximization: false
|
||||
session.screen0.windowMenu: /home/nico/.fluxbox/windowmenu
|
||||
session.screen0.colPlacementDirection: TopToBottom
|
||||
session.screen0.autoRaise: true
|
||||
session.screen0.focusNewWindows: true
|
||||
session.screen0.maxDisableMove: false
|
||||
session.screen0.windowMenu: /home/nico/.fluxbox/windowmenu
|
||||
session.screen0.focusSameHead: false
|
||||
session.screen0.noFocusWhileTypingDelay: 0
|
||||
session.screen0.allowRemoteActions: false
|
||||
session.screen0.defaultDeco: NORMAL
|
||||
session.screen0.workspacewarping: true
|
||||
session.screen0.focusModel: ClickFocus
|
||||
session.ignoreBorder: false
|
||||
session.menuSearch: itemstart
|
||||
session.tabPadding: 0
|
||||
session.tabsAttachArea: Window
|
||||
session.configVersion: 13
|
||||
session.colorsPerChannel: 4
|
||||
session.forcePseudoTransparency: false
|
||||
session.cacheMax: 200
|
||||
session.styleOverlay: /home/nico/.fluxbox/overlay
|
||||
session.screen0.tabFocusModel: ClickToTabFocus
|
||||
session.screen0.workspaceNames: Workspace 1,Workspace 2,Workspace 3,Workspace 4,
|
||||
session.screen0.windowPlacement: RowMinOverlapPlacement
|
||||
session.screen0.colPlacementDirection: TopToBottom
|
||||
session.screen0.fullMaximization: false
|
||||
session.screen0.maxIgnoreIncrement: true
|
||||
session.screen0.autoRaise: true
|
||||
session.screen0.demandsAttentionTimeout: 500
|
||||
session.screen0.strftimeFormat: %Y-%m-%d
|
||||
session.screen0.rowPlacementDirection: LeftToRight
|
||||
session.screen0.workspaces: 4
|
||||
session.screen0.showwindowposition: false
|
||||
session.screen0.tooltipDelay: 500
|
||||
session.screen0.clickRaises: true
|
||||
session.screen0.menuDelay: 200
|
||||
session.screen0.edgeSnapThreshold: 10
|
||||
session.screen0.maxDisableMove: false
|
||||
session.styleFile: /home/nico/.fluxbox/styles/Dark
|
||||
session.cacheLife: 5
|
||||
session.menuFile: ~/.fluxbox/menu
|
||||
session.keyFile: ~/.fluxbox/keys
|
||||
session.doubleClickInterval: 250
|
||||
session.tabPadding: 0
|
||||
session.forcePseudoTransparency: false
|
||||
session.autoRaiseDelay: 250
|
||||
session.cacheLife: 5
|
||||
session.cacheMax: 200
|
||||
session.menuFile: ~/.fluxbox/menu
|
||||
session.tabsAttachArea: Window
|
||||
session.appsFile: /home/nico/.fluxbox/apps
|
||||
session.keyFile: ~/.fluxbox/keys
|
||||
session.styleOverlay: /home/nico/.fluxbox/overlay
|
||||
session.configVersion: 13
|
||||
session.ignoreBorder: false
|
||||
session.colorsPerChannel: 4
|
||||
session.menuSearch: itemstart
|
||||
session.slitlistFile: /home/nico/.fluxbox/slitlist
|
||||
|
|
|
@ -12,7 +12,7 @@ OnToolbar Mouse4 :PrevWindow {static groups} (iconhidden=no)
|
|||
OnToolbar Mouse5 :NextWindow {static groups} (iconhidden=no)
|
||||
|
||||
# alt + left/right click to move/resize a window
|
||||
OnWindow Control Mouse1 :MacroCmd {Raise} {Focus} {StartMoving}
|
||||
# OnWindow Control Mouse1 :MacroCmd {Raise} {Focus} {StartMoving}
|
||||
# OnWindowBorder Move1 :StartMoving
|
||||
|
||||
OnWindow Control Mouse3 :MacroCmd {Raise} {Focus} {StartResizing NearestCorner}
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
|
||||
# Change your keymap:
|
||||
xmodmap "/home/nico/.Xmodmap"
|
||||
setxkbmap gb &
|
||||
setxkbmap -option compose:lalt &
|
||||
setxkbmap gb colemak -option compose:ralt &
|
||||
|
||||
# Applications you want to run with fluxbox.
|
||||
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ''&'' AT THE END.
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Alt-/": "lua:comment.comment",
|
||||
"Ctrl-J": "lua:initlua.zettelInsert",
|
||||
"CtrlUnderscore": "lua:comment.comment",
|
||||
"MouseRight": "lua:initlua.gotofile"
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
color-link comment "grey"
|
||||
color-link constant "red"
|
||||
color-link identifier "cyan"
|
||||
color-link statement "yellow"
|
||||
color-link symbol "yellow"
|
||||
color-link preproc "magenta"
|
||||
color-link type "green"
|
||||
color-link special "magenta"
|
||||
color-link ignore "default"
|
||||
color-link error ",brightred"
|
||||
color-link todo ",brightyellow"
|
||||
color-link indent-char "black"
|
||||
color-link line-number "yellow"
|
||||
color-link current-line-number "red"
|
||||
color-link diff-added "green"
|
||||
color-link diff-modified "yellow"
|
||||
color-link diff-deleted "red"
|
||||
color-link gutter-error ",red"
|
||||
color-link gutter-warning "red"
|
||||
#Cursor line causes readability issues. Disabled for now.
|
||||
#color-link cursor-line "white,black"
|
||||
color-link color-column "white"
|
||||
#No extended types. (bool in C)
|
||||
color-link type.extended "default"
|
||||
#No bracket highlighting.
|
||||
color-link symbol.brackets "default"
|
||||
#Color shebangs the comment color
|
||||
color-link preproc.shebang "comment"
|
||||
color-link statusline "black,grey"
|
|
@ -0,0 +1,65 @@
|
|||
local micro = import("micro")
|
||||
local config = import("micro/config")
|
||||
local buf = import("micro/buffer")
|
||||
local util = import("micro/util")
|
||||
local path = import("path")
|
||||
local time = import("time")
|
||||
|
||||
function gotofile(bp)
|
||||
local selection = bp.Cursor.CurSelection -- cursor position
|
||||
local line = bp.buf.Line(bp.buf, selection[1]["Y"]) -- get the current line
|
||||
local path_start, path_end
|
||||
-- TODO add other delimiters
|
||||
|
||||
-- search forward from cursor position for a delimiter
|
||||
-- store it to find the end of the path
|
||||
for v = selection[1]["X"], #line do
|
||||
local r = util.RuneAt(line, v)
|
||||
if r == ')' or r == "}" or r == "]" or r == " " then
|
||||
path_end = v
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
-- do the same, looking backwards, for the start of the path
|
||||
for v = selection[1]["X"],0, -1 do
|
||||
local r = util.RuneAt(line,v)
|
||||
if r == '(' or r == "{" or r == "[" or r == " " then
|
||||
path_start = v+2
|
||||
break
|
||||
end
|
||||
end
|
||||
-- slice up the path and go to that file
|
||||
if path_start ~= nil and path_end ~= nil then
|
||||
-- get the path from the buffer
|
||||
p = string.sub(line, path_start, path_end)
|
||||
-- get the path relative to current file if it's relative
|
||||
if not path.IsAbs(p) then
|
||||
p = path.Join(path.Dir(bp.buf.Path), p)
|
||||
end
|
||||
-- open in a split
|
||||
-- TODO placement that's better than just splitting?
|
||||
bp.HSplitCmd(bp, {p})
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function zettelInsert(bp)
|
||||
local t = time.Now() -- current unix time
|
||||
local ut = t.Unix(t)
|
||||
local cursor = bp.Cursor.Loc
|
||||
local cursorLoc = buf.Loc(cursor["X"], cursor["Y"])
|
||||
local newFilePath = ut .. ".md"
|
||||
local link = "[[" .. newFilePath .. "]]"
|
||||
bp.Buf:Replace(cursorLoc, cursorLoc, link ) -- insert link at cursor position
|
||||
local newBuffer = buf.NewBuffer("# " .. ut .. " - ", path.Join(path.Dir(bp.buf.Path), newFilePath))
|
||||
bp.HSplitBuf(bp, newBuffer)
|
||||
|
||||
|
||||
end
|
||||
|
||||
function init()
|
||||
config.MakeCommand("gotofile", gotofile, config.NoComplete)
|
||||
config.MakeCommand("zi", zettelInsert, config.NoComplete)
|
||||
config.TryBindKey("MouseRight", "lua:initlua.gotofile", true)
|
||||
end
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"colorscheme": "nico",
|
||||
"softwrap": true
|
||||
}
|
|
@ -2,4 +2,5 @@ configuration {
|
|||
modi: "run,window";
|
||||
theme: "sidebar-mod";
|
||||
font: "FantasqueSansMono 16";
|
||||
terminal: "termite";
|
||||
}
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env python
|
||||
"""
|
||||
Generates an index of the connections between items in the zettel.
|
||||
"""
|
||||
import os
|
||||
import re
|
||||
|
||||
base = "/home/nico/vimwiki/zettel/"
|
||||
|
||||
edges = [] # an 'edge' is a tuple of a point and a destination.
|
||||
|
||||
link_regex = re.compile(r'\[\[(.*?)\]\]')
|
||||
|
||||
# search is a function that is called recursively to build the list of reachable files
|
||||
def search(f):
|
||||
if os.path.exists(f) and f.split(".")[1] == "md":
|
||||
fp = open(f,"r")
|
||||
r = fp.read()
|
||||
links = link_regex.findall(r)
|
||||
for l in links: # all files mentioned as links in this one
|
||||
edge = (f, l) # tuple of (src, dest)
|
||||
if not (edge in edges):
|
||||
edges.append(edge)
|
||||
search(os.path.join(base, l))
|
||||
|
||||
search(os.path.join(base,"index.md"))
|
||||
|
||||
with open(os.path.join(base,"index"),"w+") as i:
|
||||
for e in edges:
|
||||
i.write(f"{os.path.basename(e[0])} {e[1]}\n")
|
||||
|
||||
|
|
@ -1,6 +1,12 @@
|
|||
#!/bin/sh
|
||||
case "${1%%:*}" in
|
||||
http|https)
|
||||
case $1 in
|
||||
*youtube.com*)
|
||||
mpv --ytdl-format='bestvideo[height<=1080]+bestaudio' $1
|
||||
;;
|
||||
*mp3)
|
||||
mpv "$1"
|
||||
;;
|
||||
http://*|https://*)
|
||||
if [ $(cat /etc/hostname) = 'alarm' ]
|
||||
then
|
||||
exec firefox "$1"
|
||||
|
@ -8,16 +14,23 @@ case "${1%%:*}" in
|
|||
exec qutebrowser "$1"
|
||||
fi
|
||||
;;
|
||||
gemini)
|
||||
gemini://*)
|
||||
exec termite -e "amfora $1"
|
||||
;;
|
||||
mailto)
|
||||
mailto://*)
|
||||
exec thunderbird "$1"
|
||||
;;
|
||||
*.pdf)
|
||||
exec evince "$1"
|
||||
;;
|
||||
*)
|
||||
*.txt)
|
||||
exec gedit "$1"
|
||||
;;
|
||||
*/)
|
||||
exec Thunar "$1"
|
||||
;;
|
||||
*)
|
||||
notify-send "no handler for $1, using system xdg"
|
||||
exec /usr/bin/xdg-open "$@"
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#audible_bell = false
|
||||
#clickable_url = true
|
||||
#dynamic_title = true
|
||||
font=Fantasquesansmono 14
|
||||
font=FantasqueSansMono 14
|
||||
#fullscreen = true
|
||||
#geometry = 640x480
|
||||
#icon_name = terminal
|
||||
|
@ -46,17 +46,15 @@ scrollback_lines = 10000
|
|||
#border_width = 0.5
|
||||
#roundness = 2.0
|
||||
|
||||
# vim: ft=dosini cms=#%s
|
||||
|
||||
[colors]
|
||||
# Base16 Tomorrow Night
|
||||
# Author: Chris Kempson (http://chriskempson.com)
|
||||
|
||||
foreground = #c5c8c6
|
||||
foreground_bold = #e0e0e0
|
||||
cursor = #e0e0e0
|
||||
foreground_bold = #c5c8c6
|
||||
cursor = #c5c8c6
|
||||
cursor_foreground = #1d1f21
|
||||
background = rgb(29, 31, 33)
|
||||
background = #1d1f21
|
||||
|
||||
# 16 color space
|
||||
|
||||
|
|
13
zsh/.zshrc
13
zsh/.zshrc
|
@ -4,16 +4,15 @@ source ~/.device.zsh
|
|||
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||
|
||||
#aliases
|
||||
alias v=nvim
|
||||
alias vw="nvim ~/vimwiki/index.md +'lcd ~/vimwiki'"
|
||||
alias sw="nvim ~/vimwiki/schoolwork/index.md +'lcd ~/vimwiki/schoolwork'"
|
||||
alias ws="nvim ~/website/wiki/content/index.gmi +'lcd ~/website/wiki/content/'"
|
||||
alias v=micro
|
||||
alias vw="cd ~/vimwiki && micro index.md"
|
||||
alias yt="mpv --ytdl-format='bestvideo[height<=1080]+bestaudio'"
|
||||
alias psion="export WINEPREFIX=$PSION_PREFIX"
|
||||
export EDITOR=nvim
|
||||
export VISUAL=nvim
|
||||
export EDITOR=micro
|
||||
export VISUAL=micro
|
||||
export VITASDK=~/.local/vitasdk
|
||||
export LEDGER_FILE=~/Documents/hledger/personal.journal
|
||||
export PATH=$HOME/.luarocks/bin:$HOME/bin:/usr/local/bin:$HOME/.cargo/bin:$HOME/.local/bin:$VITASDK/bin:$HOME/tools/rockbox/bin:$PATH:$HOME/projects/go/bin:$HOME/games/launchers/:$HOME/x-tools/arm-kobo-linux-gnueabihf/bin
|
||||
export PATH=$HOME/.luarocks/bin:$HOME/bin:$HOME/.cargo/bin:$HOME/.local/bin:$VITASDK/bin:$HOME/tools/rockbox/bin:$PATH:$HOME/projects/go/bin:$HOME/games/launchers/:$HOME/x-tools/arm-kobo-linux-gnueabihf/bin:$HOME/games/launchers
|
||||
export GOPATH=$HOME/projects/go
|
||||
export PSION_PREFIX=$HOME/software/psion-prefix
|
||||
|
||||
|
|
Reference in New Issue