mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-11-06 03:12:24 +00:00
Cleanup nix configuration
This commit is contained in:
parent
1f2cb125b5
commit
460d6b6db5
48 changed files with 632 additions and 979 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"optOut": false,
|
"optOut": false,
|
||||||
"lastUpdateCheck": 1597140285958,
|
"lastUpdateCheck": 1597606728076,
|
||||||
"update": {
|
"update": {
|
||||||
"latest": "6.14.7",
|
"latest": "6.14.7",
|
||||||
"current": "6.14.6",
|
"current": "6.14.6",
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
/nix/store/nb0lqjygfrf2v2qaifc79xw87zb2xk37-home-manager-files/.config/htop/htoprc
|
/nix/store/b892y8ysy3s7swvcfz493lz3cbc2mbi1-home-manager-files/.config/htop/htoprc
|
|
@ -109,7 +109,7 @@ import XMonad.Layout.WindowArranger
|
||||||
-- Values -------------------- {{{
|
-- Values -------------------- {{{
|
||||||
|
|
||||||
myModMask = mod4Mask
|
myModMask = mod4Mask
|
||||||
myLauncher = Rofi.asCommand (def { Rofi.theme = Rofi.bigTheme }) ["-show run"]
|
myLauncher = Rofi.asCommand def ["-show run"]
|
||||||
--myTerminal = "termite --name törminell"
|
--myTerminal = "termite --name törminell"
|
||||||
myTerminal = "alacritty"
|
myTerminal = "alacritty"
|
||||||
myBrowser = "qutebrowser"
|
myBrowser = "qutebrowser"
|
||||||
|
@ -302,14 +302,14 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program
|
||||||
programLaunchBindings :: [(String, X ())]
|
programLaunchBindings :: [(String, X ())]
|
||||||
programLaunchBindings =
|
programLaunchBindings =
|
||||||
[ ("M-p", spawn myLauncher)
|
[ ("M-p", spawn myLauncher)
|
||||||
, ("M-S-p", Rofi.showCombi (def { Rofi.theme = Rofi.bigTheme }) [ "drun", "window", "ssh" ])
|
, ("M-S-p", Rofi.showCombi def [ "drun", "window", "ssh" ])
|
||||||
, ("M-S-e", Rofi.showNormal (def { Rofi.theme = Rofi.bigTheme, Rofi.fuzzy = False }) "emoji")
|
, ("M-S-e", Rofi.showNormal (def { Rofi.fuzzy = False }) "emoji")
|
||||||
--, ("M-s", spawn $ scriptFile "rofi-search.sh")
|
--, ("M-s", spawn $ scriptFile "rofi-search.sh")
|
||||||
, ("M-S-o", spawn $ scriptFile "rofi-open.sh")
|
, ("M-S-o", spawn $ scriptFile "rofi-open.sh")
|
||||||
, ("M-n", scratchpadSubmap)
|
, ("M-n", scratchpadSubmap)
|
||||||
, ("M-e", Rofi.promptRunCommand def specialCommands)
|
, ("M-e", Rofi.promptRunCommand def specialCommands)
|
||||||
, ("M-o", Rofi.promptRunCommand def withSelectionCommands)
|
, ("M-o", Rofi.promptRunCommand def withSelectionCommands)
|
||||||
, ("M-S-C-g", spawn "killall -INT -g giph") -- stop gif recording
|
, ("M-S-C-g", spawn "killall -INT -g giph" >> spawn "scr -s") -- stop gif and video recording
|
||||||
|
|
||||||
--, ("M-b", launchWithBackgroundInstance (className =? "qutebrowser") "bwrap --bind / / --dev-bind /dev /dev --tmpfs /tmp --tmpfs /run qutebrowser")
|
--, ("M-b", launchWithBackgroundInstance (className =? "qutebrowser") "bwrap --bind / / --dev-bind /dev /dev --tmpfs /tmp --tmpfs /run qutebrowser")
|
||||||
--, ("M-b", safeSpawnProg "qutebrowser")
|
--, ("M-b", safeSpawnProg "qutebrowser")
|
||||||
|
@ -433,6 +433,7 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program
|
||||||
[ ("screenshot", spawn $ scriptFile "screenshot.sh")
|
[ ("screenshot", spawn $ scriptFile "screenshot.sh")
|
||||||
, ("screenshot to file", spawn $ scriptFile "screenshot.sh --tofile")
|
, ("screenshot to file", spawn $ scriptFile "screenshot.sh --tofile")
|
||||||
, ("screenshot full to file", spawn $ scriptFile "screenshot.sh --tofile --fullscreen")
|
, ("screenshot full to file", spawn $ scriptFile "screenshot.sh --tofile --fullscreen")
|
||||||
|
, ("screenvideo to file", spawn (scriptFile "screenvid.sh") >> notify "video" "stop video-recording with M-S-C-g")
|
||||||
, ("screengif to file", spawn (scriptFile "screengif.sh") >> notify "gif" "stop gif-recording with M-S-C-g")
|
, ("screengif to file", spawn (scriptFile "screengif.sh") >> notify "gif" "stop gif-recording with M-S-C-g")
|
||||||
, ("toggleOptimal", sendMessage ToggleGaps >> toggleWindowSpacingEnabled)
|
, ("toggleOptimal", sendMessage ToggleGaps >> toggleWindowSpacingEnabled)
|
||||||
, ("toggleSpacing", toggleWindowSpacingEnabled)
|
, ("toggleSpacing", toggleWindowSpacingEnabled)
|
||||||
|
|
|
@ -6,8 +6,6 @@ module Rofi
|
||||||
, promptRunCommand
|
, promptRunCommand
|
||||||
, showNormal
|
, showNormal
|
||||||
, showCombi
|
, showCombi
|
||||||
, smallTheme
|
|
||||||
, bigTheme
|
|
||||||
, RofiConfig(..)
|
, RofiConfig(..)
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
|
@ -22,23 +20,14 @@ rofiCmd :: String
|
||||||
rofiCmd = "rofi"
|
rofiCmd = "rofi"
|
||||||
|
|
||||||
data RofiConfig
|
data RofiConfig
|
||||||
= RofiConfig { theme :: String, caseInsensitive :: Bool, fuzzy :: Bool } deriving (Show, Eq)
|
= RofiConfig { caseInsensitive :: Bool, fuzzy :: Bool } deriving (Show, Eq)
|
||||||
|
|
||||||
instance Default RofiConfig where
|
instance Default RofiConfig where
|
||||||
def = RofiConfig { theme = smallTheme, caseInsensitive = True, fuzzy = True }
|
def = RofiConfig { caseInsensitive = True, fuzzy = True }
|
||||||
|
|
||||||
smallTheme :: String
|
|
||||||
smallTheme = "/home/leon/nixpkgs/config/rofi/launcher_grid_style.rasi"
|
|
||||||
|
|
||||||
bigTheme :: String
|
|
||||||
bigTheme = "/home/leon/nixpkgs/config/rofi/launcher_grid_full_style.rasi"
|
|
||||||
|
|
||||||
toArgList :: RofiConfig -> [String]
|
toArgList :: RofiConfig -> [String]
|
||||||
toArgList RofiConfig {..} = concat
|
toArgList RofiConfig {..} = concat
|
||||||
[ ["-theme", theme]
|
[addIf caseInsensitive ["-i"], addIf fuzzy ["-matching", "fuzzy"]]
|
||||||
, addIf caseInsensitive ["-i"]
|
|
||||||
, addIf fuzzy ["-matching", "fuzzy"]
|
|
||||||
]
|
|
||||||
where addIf check list = if check then list else []
|
where addIf check list = if check then list else []
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
{ pkgs, myConf, ... }:
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
package = (
|
|
||||||
pkgs.writeScriptBin "alacritty" ''
|
|
||||||
#!/bin/sh
|
|
||||||
exec nixGLIntel ${pkgs.alacritty}/bin/alacritty "$@"
|
|
||||||
''
|
|
||||||
);
|
|
||||||
settings = {
|
|
||||||
window = {
|
|
||||||
padding.x = 20;
|
|
||||||
padding.y = 20;
|
|
||||||
dynamic_padding = true;
|
|
||||||
dynamic_title = true;
|
|
||||||
};
|
|
||||||
cursor = {
|
|
||||||
style = "Block";
|
|
||||||
unfocused_hollow = true;
|
|
||||||
};
|
|
||||||
shell = "/home/leon/.nix-profile/bin/zsh";
|
|
||||||
#shell = "/usr/bin/fish";
|
|
||||||
mouse = {
|
|
||||||
double_click.threshold = 300;
|
|
||||||
triple_click.threshold = 300;
|
|
||||||
hide_when_typing = true;
|
|
||||||
url.launcher.program = "xdg-open";
|
|
||||||
};
|
|
||||||
|
|
||||||
key_bindings = [
|
|
||||||
{
|
|
||||||
key = "N";
|
|
||||||
mods = "Control|Shift";
|
|
||||||
action = "SpawnNewInstance";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
background_opacity = 1;
|
|
||||||
font = {
|
|
||||||
size = 12;
|
|
||||||
#normal.family = "Iosevka";
|
|
||||||
normal.family = "Terminus (TTF)";
|
|
||||||
offset.x = 0;
|
|
||||||
offset.y = -2;
|
|
||||||
};
|
|
||||||
colors = myConf.colors;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,482 +0,0 @@
|
||||||
# -*- mode: shell-script -*-
|
|
||||||
# vim: set ft=zsh :
|
|
||||||
#########################################################################
|
|
||||||
# Copyright (C) 2014-2015 Wojciech Siewierski #
|
|
||||||
# #
|
|
||||||
# This program is free software: you can redistribute it and/or modify #
|
|
||||||
# it under the terms of the GNU General Public License as published by #
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or #
|
|
||||||
# (at your option) any later version. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, #
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
|
||||||
# GNU General Public License for more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License #
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
zstyle -s ":deer:" height DEER_HEIGHT || DEER_HEIGHT=22
|
|
||||||
|
|
||||||
|
|
||||||
typeset -Ag DEER_KEYS
|
|
||||||
function ()
|
|
||||||
{
|
|
||||||
while [ -n "$2" ]; do
|
|
||||||
DEER_KEYS[$1]=${DEER_KEYS[$1]:-$2}
|
|
||||||
shift 2
|
|
||||||
done
|
|
||||||
} down j \
|
|
||||||
page_down J \
|
|
||||||
up k \
|
|
||||||
page_up K \
|
|
||||||
enter l \
|
|
||||||
leave h \
|
|
||||||
next_parent ']' \
|
|
||||||
prev_parent '[' \
|
|
||||||
search / \
|
|
||||||
filter f \
|
|
||||||
toggle_hidden H \
|
|
||||||
quit q \
|
|
||||||
append_path a \
|
|
||||||
append_abs_path A \
|
|
||||||
insert_path i \
|
|
||||||
insert_abs_path I \
|
|
||||||
multi_insert_dwim s \
|
|
||||||
multi_insert_abs S \
|
|
||||||
chdir c \
|
|
||||||
chdir_selected C \
|
|
||||||
rifle r \
|
|
||||||
edit e \
|
|
||||||
|
|
||||||
|
|
||||||
# Select the Nth next file. Pass a negative argument for the previous file.
|
|
||||||
deer-move()
|
|
||||||
{
|
|
||||||
local FILES MOVEMENT INDEX
|
|
||||||
MOVEMENT=$1
|
|
||||||
|
|
||||||
FILES=($DEER_DIRNAME/${~DEER_FILTER[$DEER_DIRNAME]:-'*'}(N$DEER_GLOBFLAGS-/:t)
|
|
||||||
$DEER_DIRNAME/${~DEER_FILTER[$DEER_DIRNAME]:-'*'}(N$DEER_GLOBFLAGS-^/:t))
|
|
||||||
|
|
||||||
INDEX=${(k)FILES[(re)$DEER_BASENAME[$DEER_DIRNAME]]}
|
|
||||||
|
|
||||||
if (( INDEX+MOVEMENT <= 0 )); then
|
|
||||||
DEER_BASENAME[$DEER_DIRNAME]=$FILES[1]
|
|
||||||
elif (( INDEX+MOVEMENT > $#FILES )); then
|
|
||||||
DEER_BASENAME[$DEER_DIRNAME]=$FILES[$#FILES]
|
|
||||||
else
|
|
||||||
DEER_BASENAME[$DEER_DIRNAME]=$FILES[$INDEX+$MOVEMENT]
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Select the first visible directory (or file if there are no
|
|
||||||
# directories) in the current directory. Useful when changing the file
|
|
||||||
# filter.
|
|
||||||
deer-refocus()
|
|
||||||
{
|
|
||||||
local TMP
|
|
||||||
TMP=($DEER_DIRNAME/${~DEER_FILTER[$DEER_DIRNAME]:-'*'}(N$DEER_GLOBFLAGS-/:t)
|
|
||||||
$DEER_DIRNAME/${~DEER_FILTER[$DEER_DIRNAME]:-'*'}(N$DEER_GLOBFLAGS-^/:t))
|
|
||||||
DEER_BASENAME[$DEER_DIRNAME]=$TMP[1]
|
|
||||||
|
|
||||||
[ -n "$DEER_BASENAME[$DEER_DIRNAME]" ] # Return if there were any files at all.
|
|
||||||
}
|
|
||||||
|
|
||||||
# Enter the selected directory
|
|
||||||
deer-enter()
|
|
||||||
{
|
|
||||||
# Abort if there is no file focused at all or if it is not a
|
|
||||||
# directory.
|
|
||||||
[ -n "$DEER_BASENAME[$DEER_DIRNAME]" -a \
|
|
||||||
-d "$DEER_DIRNAME/$DEER_BASENAME[$DEER_DIRNAME]" ] || return
|
|
||||||
|
|
||||||
DEER_DIRNAME=${DEER_DIRNAME%/}/$DEER_BASENAME[$DEER_DIRNAME]
|
|
||||||
|
|
||||||
if [ -z $DEER_BASENAME[$DEER_DIRNAME] ]; then
|
|
||||||
deer-refocus
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Move to the parent directory
|
|
||||||
deer-leave()
|
|
||||||
{
|
|
||||||
[ $DEER_DIRNAME = / ] && return
|
|
||||||
DEER_BASENAME[$DEER_DIRNAME:h]=$DEER_DIRNAME:t
|
|
||||||
DEER_DIRNAME=$DEER_DIRNAME:h
|
|
||||||
}
|
|
||||||
|
|
||||||
# Display a given prompt, read a string and save it into $BUFFER.
|
|
||||||
deer-prompt()
|
|
||||||
{
|
|
||||||
BUFFER=""
|
|
||||||
PREDISPLAY="$1/ "
|
|
||||||
POSTDISPLAY=""
|
|
||||||
|
|
||||||
local region_highlight
|
|
||||||
region_highlight=("P0 $#1 fg=green")
|
|
||||||
zle recursive-edit
|
|
||||||
}
|
|
||||||
|
|
||||||
# Read a pattern and select the first matching file.
|
|
||||||
deer-search()
|
|
||||||
{
|
|
||||||
deer-prompt "search"
|
|
||||||
|
|
||||||
local TMP
|
|
||||||
TMP=($DEER_DIRNAME/${~BUFFER}${DEER_FILTER[$DEER_DIRNAME]:-'*'}(N$DEER_GLOBFLAGS-:t))
|
|
||||||
[ -n "$TMP[1]" ] && DEER_BASENAME[$DEER_DIRNAME]=$TMP[1]
|
|
||||||
}
|
|
||||||
|
|
||||||
# Read a pattern and use it as a new filter.
|
|
||||||
deer-filter()
|
|
||||||
{
|
|
||||||
deer-prompt "filter"
|
|
||||||
|
|
||||||
if [ -n "$BUFFER" ] && [[ ! $BUFFER == *\** ]]; then
|
|
||||||
BUFFER=*$BUFFER*
|
|
||||||
fi
|
|
||||||
|
|
||||||
deer-apply-filter $BUFFER || deer-apply-filter
|
|
||||||
}
|
|
||||||
|
|
||||||
deer-apply-filter()
|
|
||||||
{
|
|
||||||
DEER_FILTER[$DEER_DIRNAME]=$1
|
|
||||||
deer-refocus
|
|
||||||
}
|
|
||||||
|
|
||||||
# Draw an arrow pointing to the selected file.
|
|
||||||
deer-mark-file-list()
|
|
||||||
{
|
|
||||||
local MARKED=$1
|
|
||||||
shift
|
|
||||||
|
|
||||||
print -l -- "$@" \
|
|
||||||
| grep -Fx -B5 -A$DEER_HEIGHT -- "$MARKED" \
|
|
||||||
| perl -pe 'BEGIN{$name = shift}
|
|
||||||
if ($name."\n" eq $_) {
|
|
||||||
$_="-> $_"
|
|
||||||
} else {
|
|
||||||
$_=" $_"
|
|
||||||
}' -- "$MARKED"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Draw the file lists in the form of Miller columns.
|
|
||||||
deer-refresh()
|
|
||||||
{
|
|
||||||
local FILES PREVIEW PARENTFILES OUTPUT REL_DIRNAME
|
|
||||||
local SEPARATOR="------"
|
|
||||||
|
|
||||||
PREDISPLAY=$OLD_LBUFFER
|
|
||||||
REL_DIRNAME=${${DEER_DIRNAME%/}#$DEER_STARTDIR}/
|
|
||||||
[ -n "$DEER_STARTDIR" ] && REL_DIRNAME=${REL_DIRNAME#/}
|
|
||||||
LBUFFER=$REL_DIRNAME$DEER_BASENAME[$DEER_DIRNAME]
|
|
||||||
RBUFFER=""
|
|
||||||
local TMP_FILTER
|
|
||||||
TMP_FILTER=${DEER_FILTER[$DEER_DIRNAME]}
|
|
||||||
POSTDISPLAY=${TMP_FILTER:+ filt:$TMP_FILTER}
|
|
||||||
region_highlight=("P0 $#PREDISPLAY fg=black,bold"
|
|
||||||
"0 $#REL_DIRNAME fg=blue,bold"
|
|
||||||
"$#BUFFER $[$#BUFFER+$#POSTDISPLAY] fg=yellow,bold")
|
|
||||||
|
|
||||||
|
|
||||||
FILES=($DEER_DIRNAME/${~DEER_FILTER[$DEER_DIRNAME]:-'*'}(N$DEER_GLOBFLAGS-/:t)
|
|
||||||
$SEPARATOR
|
|
||||||
$DEER_DIRNAME/${~DEER_FILTER[$DEER_DIRNAME]:-'*'}(N$DEER_GLOBFLAGS-^/:t))
|
|
||||||
PARENTFILES=($DEER_DIRNAME:h/${~DEER_FILTER[$DEER_DIRNAME:h]:-'*'}(N$DEER_GLOBFLAGS-/:t))
|
|
||||||
|
|
||||||
local IFS=$'\n'
|
|
||||||
FILES=($(deer-mark-file-list "$DEER_BASENAME[$DEER_DIRNAME]" $FILES))
|
|
||||||
PARENTFILES=($(deer-mark-file-list "$DEER_DIRNAME:t" $PARENTFILES))
|
|
||||||
unset IFS
|
|
||||||
|
|
||||||
FILES=(${(F)FILES[1,$DEER_HEIGHT]})
|
|
||||||
PARENTFILES=(${(F)PARENTFILES[1,$DEER_HEIGHT]})
|
|
||||||
|
|
||||||
|
|
||||||
if [ -f $DEER_DIRNAME/$DEER_BASENAME[$DEER_DIRNAME] ]; then
|
|
||||||
if file $DEER_DIRNAME/$DEER_BASENAME[$DEER_DIRNAME] | grep -Fq text; then
|
|
||||||
PREVIEW="--- Preview: ---"$'\n'$(head -n$DEER_HEIGHT $DEER_DIRNAME/$DEER_BASENAME[$DEER_DIRNAME])
|
|
||||||
|
|
||||||
# Replace '/' with '∕' (division slash, U+2215) to allow using it as a
|
|
||||||
# paste(1)/column(1) separator.
|
|
||||||
PREVIEW=${PREVIEW//\//∕}
|
|
||||||
else
|
|
||||||
PREVIEW="--- Binary file, preview unavailable ---"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# I'm really sorry about what you see below.
|
|
||||||
# It basically means: PREVIEW=(directories separator files)
|
|
||||||
PREVIEW=($DEER_DIRNAME/$DEER_BASENAME[$DEER_DIRNAME]/${~DEER_FILTER[$DEER_DIRNAME/$DEER_BASENAME[$DEER_DIRNAME]]:-'*'}(N$DEER_GLOBFLAGS-/:t)
|
|
||||||
$SEPARATOR
|
|
||||||
$DEER_DIRNAME/$DEER_BASENAME[$DEER_DIRNAME]/${~DEER_FILTER[$DEER_DIRNAME/$DEER_BASENAME[$DEER_DIRNAME]]:-'*'}(N$DEER_GLOBFLAGS-^/:t))
|
|
||||||
PREVIEW=${(F)PREVIEW[1,$DEER_HEIGHT]}
|
|
||||||
fi
|
|
||||||
|
|
||||||
OUTPUT="$(paste -d/ <(<<< $PARENTFILES \
|
|
||||||
| awk '{print substr($0,1,16)}') \
|
|
||||||
<(<<< $FILES) \
|
|
||||||
<(<<< $PREVIEW) \
|
|
||||||
| sed 's,/, / ,g' \
|
|
||||||
| column -t -s/ 2> /dev/null \
|
|
||||||
| awk -v width=$COLUMNS '{print substr($0,1,width-1)}')"
|
|
||||||
zle -M -- $OUTPUT
|
|
||||||
zle -R
|
|
||||||
}
|
|
||||||
|
|
||||||
# Run `deer-add' with the same arguments, restore the shell state and
|
|
||||||
# then exit.
|
|
||||||
deer-restore()
|
|
||||||
{
|
|
||||||
deer-add "$@"
|
|
||||||
PREDISPLAY=""
|
|
||||||
POSTDISPLAY=""
|
|
||||||
region_highlight=()
|
|
||||||
LBUFFER=$OLD_LBUFFER
|
|
||||||
RBUFFER=$OLD_RBUFFER
|
|
||||||
zle reset-prompt
|
|
||||||
zle -M ""
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add the given string before or after the cursor.
|
|
||||||
deer-add()
|
|
||||||
{
|
|
||||||
case $1 in
|
|
||||||
--append)
|
|
||||||
OLD_LBUFFER+=$2
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
--insert)
|
|
||||||
OLD_RBUFFER=$2$OLD_RBUFFER
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get the quoted relative path from the absolute unquoted path.
|
|
||||||
deer-get-relative()
|
|
||||||
{
|
|
||||||
local TMP
|
|
||||||
TMP=${1:-${DEER_DIRNAME%/}/$DEER_BASENAME[$DEER_DIRNAME]}
|
|
||||||
TMP="`python -c '
|
|
||||||
import sys, os
|
|
||||||
print(os.path.relpath(sys.argv[1], sys.argv[2]))
|
|
||||||
' $TMP ${DEER_STARTDIR:-$PWD}`"
|
|
||||||
print -R $TMP:q
|
|
||||||
}
|
|
||||||
|
|
||||||
# Tries to guess a directory to start in from the current argument.
|
|
||||||
deer-set-initial-directory()
|
|
||||||
{
|
|
||||||
autoload -U split-shell-arguments modify-current-argument
|
|
||||||
local REPLY REPLY2 reply
|
|
||||||
local DIRECTORY
|
|
||||||
|
|
||||||
((--CURSOR))
|
|
||||||
split-shell-arguments
|
|
||||||
((++CURSOR))
|
|
||||||
|
|
||||||
# Find the longest existing directory path in the current argument.
|
|
||||||
DEER_STARTDIR=${(Q)${${reply[$REPLY]%%[[:space:]]#}:a}%/}
|
|
||||||
while [ -n "$DEER_STARTDIR" -a \
|
|
||||||
! -d "$DEER_STARTDIR" ]; do
|
|
||||||
DEER_STARTDIR=${DEER_STARTDIR%/*}
|
|
||||||
done
|
|
||||||
|
|
||||||
DEER_DIRNAME=${DEER_STARTDIR:-$PWD}
|
|
||||||
}
|
|
||||||
|
|
||||||
# The main entry function.
|
|
||||||
deer-launch()
|
|
||||||
{
|
|
||||||
emulate -L zsh
|
|
||||||
setopt extended_glob
|
|
||||||
local DEER_DIRNAME DEER_STARTDIR DEER_GLOBFLAGS
|
|
||||||
local -A DEER_FILTER DEER_BASENAME
|
|
||||||
local REPLY OLD_LBUFFER OLD_RBUFFER
|
|
||||||
|
|
||||||
local GREP_OPTIONS
|
|
||||||
GREP_OPTIONS=""
|
|
||||||
|
|
||||||
OLD_LBUFFER=$LBUFFER
|
|
||||||
OLD_RBUFFER=$RBUFFER
|
|
||||||
|
|
||||||
deer-set-initial-directory
|
|
||||||
|
|
||||||
DEER_GLOBFLAGS=""
|
|
||||||
|
|
||||||
if [ -n "$NUMERIC" ]; then
|
|
||||||
for i in {1..$NUMERIC}; do
|
|
||||||
deer-leave
|
|
||||||
done
|
|
||||||
else
|
|
||||||
# Don't change cwd but initialize the variables.
|
|
||||||
deer-leave
|
|
||||||
deer-enter
|
|
||||||
fi
|
|
||||||
|
|
||||||
deer-refresh
|
|
||||||
while read -k; do
|
|
||||||
case $REPLY in
|
|
||||||
# Movement
|
|
||||||
$DEER_KEYS[up])
|
|
||||||
deer-move -1
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
$DEER_KEYS[page_up])
|
|
||||||
deer-move -5
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
$DEER_KEYS[down])
|
|
||||||
deer-move 1
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
$DEER_KEYS[page_down])
|
|
||||||
deer-move 5
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
$DEER_KEYS[enter])
|
|
||||||
deer-enter
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
$DEER_KEYS[leave])
|
|
||||||
deer-leave
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
$DEER_KEYS[next_parent])
|
|
||||||
deer-leave
|
|
||||||
deer-move 1
|
|
||||||
deer-enter
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
$DEER_KEYS[prev_parent])
|
|
||||||
deer-leave
|
|
||||||
deer-move -1
|
|
||||||
deer-enter
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
# Search
|
|
||||||
$DEER_KEYS[search])
|
|
||||||
deer-search
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
# Filter
|
|
||||||
$DEER_KEYS[filter])
|
|
||||||
deer-filter
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
$DEER_KEYS[toggle_hidden])
|
|
||||||
if [ -z $DEER_GLOBFLAGS ]; then
|
|
||||||
DEER_GLOBFLAGS="D" # show hidden files
|
|
||||||
else
|
|
||||||
DEER_GLOBFLAGS=""
|
|
||||||
fi
|
|
||||||
# make sure the focus is on a visible file
|
|
||||||
DEER_BASENAME[$DEER_DIRNAME]=
|
|
||||||
deer-leave
|
|
||||||
deer-enter
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
# Quit
|
|
||||||
$DEER_KEYS[quit])
|
|
||||||
deer-restore
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
# Insert the path and quit.
|
|
||||||
$DEER_KEYS[append_path])
|
|
||||||
deer-restore --append "`deer-get-relative` "
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
$DEER_KEYS[append_abs_path])
|
|
||||||
deer-restore --append "${${DEER_DIRNAME%/}:q}/${DEER_BASENAME[$DEER_DIRNAME]:q} "
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
$DEER_KEYS[insert_path])
|
|
||||||
deer-restore --insert " `deer-get-relative`"
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
$DEER_KEYS[insert_abs_path])
|
|
||||||
deer-restore --insert " ${${DEER_DIRNAME%/}:q}/${DEER_BASENAME[$DEER_DIRNAME]:q}"
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
# Insert the path and don't quit yet.
|
|
||||||
$DEER_KEYS[multi_insert_dwim])
|
|
||||||
if [ "$OLD_LBUFFER[-1]" = "/" ]; then
|
|
||||||
OLD_LBUFFER+="{"
|
|
||||||
fi
|
|
||||||
# replacement used to insert ',' instead of '{' as a separator in {foo,bar,...} lists
|
|
||||||
deer-add --append "`deer-get-relative`"${${OLD_LBUFFER[-1]/\{/,}:- }
|
|
||||||
deer-move 1
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
# Insert the absolute path and don't quit yet.
|
|
||||||
$DEER_KEYS[multi_insert_abs])
|
|
||||||
deer-add --append " ${${DEER_DIRNAME%/}:q}/${DEER_BASENAME[$DEER_DIRNAME]:q}"
|
|
||||||
deer-move 1
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
# Quit and change the shell's current directory to the selected one.
|
|
||||||
$DEER_KEYS[chdir])
|
|
||||||
deer-leave
|
|
||||||
;&
|
|
||||||
$DEER_KEYS[chdir_selected])
|
|
||||||
if [[ -d $DEER_DIRNAME/$DEER_BASENAME[$DEER_DIRNAME] && \
|
|
||||||
-x $DEER_DIRNAME/$DEER_BASENAME[$DEER_DIRNAME] ]]; then
|
|
||||||
cd -- $DEER_DIRNAME/$DEER_BASENAME[$DEER_DIRNAME]
|
|
||||||
deer-restore
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
$DEER_KEYS[edit])
|
|
||||||
if [[ -f $DEER_DIRNAME/$DEER_BASENAME[$DEER_DIRNAME] ]]; then
|
|
||||||
"${EDITOR:-vim}" $DEER_DIRNAME/$DEER_BASENAME[$DEER_DIRNAME]
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
# See rifle(1) manpage (included with ranger(1)).
|
|
||||||
$DEER_KEYS[rifle])
|
|
||||||
if [[ -f $DEER_DIRNAME/$DEER_BASENAME[$DEER_DIRNAME] ]]; then
|
|
||||||
rifle $DEER_DIRNAME/$DEER_BASENAME[$DEER_DIRNAME]
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
# Arrow keys
|
|
||||||
$'\e')
|
|
||||||
read -k
|
|
||||||
case $REPLY in
|
|
||||||
'[')
|
|
||||||
read -k
|
|
||||||
case $REPLY in
|
|
||||||
'A')
|
|
||||||
deer-move -1
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
'B')
|
|
||||||
deer-move 1
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
'C')
|
|
||||||
deer-enter
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
'D')
|
|
||||||
deer-leave
|
|
||||||
deer-refresh
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
if zle; then
|
|
||||||
deer-launch
|
|
||||||
else
|
|
||||||
deer()
|
|
||||||
{
|
|
||||||
deer-launch "$@"
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
~
|
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
keybindings = { zoom_in = "plus"; zoom_out = "minus"; };
|
|
||||||
}
|
|
|
@ -1,118 +0,0 @@
|
||||||
{ myConf, pkgs ? import <nixpkgs> }:
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
theme.name = "phocus";
|
|
||||||
#iconTheme.package = pkgs.papirus-icon-theme;
|
|
||||||
#iconTheme.name = "papirus";
|
|
||||||
#iconTheme.package = pkgs.numix-icon-theme;
|
|
||||||
#iconTheme.name = "Numix";
|
|
||||||
#iconTheme.package = pkgs.arc-icon-theme;
|
|
||||||
iconTheme.name = "Numix";
|
|
||||||
#font.name = "Terminus (TTF) 12";
|
|
||||||
font.name = "xos4 Terminus 12";
|
|
||||||
|
|
||||||
gtk2.extraConfig = ''gtk-theme-name = "Adwaita-dark"'';
|
|
||||||
|
|
||||||
gtk3.extraConfig = {
|
|
||||||
gtk-menu-images = 1;
|
|
||||||
gtk-xft-hinting = 1;
|
|
||||||
gtk-xft-rgba = "rgb";
|
|
||||||
gtk-application-prefer-dark-theme = 1;
|
|
||||||
gtk-decoration-layout = ":";
|
|
||||||
gtk-toolbar-style = "GTK_TOOLBAR_ICONS";
|
|
||||||
gtk-toolbar-icon-size = "GTK_ICON_SIZE_LARGE_TOOLBAR";
|
|
||||||
gtk-enable-even-sounds = 0;
|
|
||||||
gtk-enable-input-feedback-sounds = 0;
|
|
||||||
gtk-button-images = 1;
|
|
||||||
ctk-cursor-theme-name = "capitaine-cursors-light";
|
|
||||||
gtk-cursor-theme-size = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
gtk3.extraCss = ''
|
|
||||||
.termite {
|
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
vte-terminal {
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
#@define-color theme_fg_color #eff0f1;
|
|
||||||
#@define-color theme_bg_color #31363b;
|
|
||||||
#@define-color theme_text_color #eff0f1;
|
|
||||||
#@define-color theme_base_color #232629;
|
|
||||||
#@define-color theme_view_hover_decoration_color #3daee9;
|
|
||||||
#@define-color theme_hovering_selected_bg_color #3daee9;
|
|
||||||
#@define-color theme_selected_bg_color #3daee9;
|
|
||||||
#@define-color theme_selected_fg_color #eff0f1;
|
|
||||||
#@define-color theme_view_active_decoration_color #3daee9;
|
|
||||||
#@define-color theme_button_background_normal #31363b;
|
|
||||||
#@define-color theme_button_decoration_hover #3daee9;
|
|
||||||
#@define-color theme_button_decoration_focus #3daee9;
|
|
||||||
#@define-color theme_button_foreground_normal #eff0f1;
|
|
||||||
#@define-color theme_button_foreground_active #eff0f1;
|
|
||||||
#@define-color borders #606468;
|
|
||||||
#@define-color warning_color #f67400;
|
|
||||||
#@define-color success_color #27ae60;
|
|
||||||
#@define-color error_color #da4453;
|
|
||||||
#@define-color theme_unfocused_fg_color #eff0f1;
|
|
||||||
#@define-color theme_unfocused_text_color #eff0f1;
|
|
||||||
#@define-color theme_unfocused_bg_color #31363b;
|
|
||||||
#@define-color theme_unfocused_base_color #232629;
|
|
||||||
#@define-color theme_unfocused_selected_bg_color_alt #224e65;
|
|
||||||
#@define-color theme_unfocused_selected_bg_color #224e65;
|
|
||||||
#@define-color theme_unfocused_selected_fg_color #eff0f1;
|
|
||||||
#@define-color theme_button_background_backdrop #31363b;
|
|
||||||
#@define-color theme_button_decoration_hover_backdrop #3daee9;
|
|
||||||
#@define-color theme_button_decoration_focus_backdrop #3daee9;
|
|
||||||
#@define-color theme_button_foreground_backdrop #eff0f1;
|
|
||||||
#@define-color theme_button_foreground_active_backdrop #eff0f1;
|
|
||||||
#@define-color unfocused_borders #606468;
|
|
||||||
#@define-color warning_color_backdrop #f67400;
|
|
||||||
#@define-color success_color_backdrop #27ae60;
|
|
||||||
#@define-color error_color_backdrop #da4453;
|
|
||||||
#@define-color insensitive_fg_color #6e7175;
|
|
||||||
#@define-color insensitive_base_fg_color #65686a;
|
|
||||||
#@define-color insensitive_bg_color #2e3338;
|
|
||||||
#@define-color insensitive_base_color #212427;
|
|
||||||
#@define-color insensitive_selected_bg_color #2e3338;
|
|
||||||
#@define-color insensitive_selected_fg_color #6e7175;
|
|
||||||
#@define-color theme_button_background_insensitive #2e3338;
|
|
||||||
#@define-color theme_button_decoration_hover_insensitive #325b72;
|
|
||||||
#@define-color theme_button_decoration_focus_insensitive #325b72;
|
|
||||||
#@define-color theme_button_foreground_insensitive #6e7175;
|
|
||||||
#@define-color theme_button_foreground_active_insensitive #6e7175;
|
|
||||||
#@define-color insensitive_borders #3e4347;
|
|
||||||
#@define-color warning_color_insensitive #683e19;
|
|
||||||
#@define-color success_color_insensitive #225139;
|
|
||||||
#@define-color error_color_insensitive #5e2e35;
|
|
||||||
#@define-color insensitive_unfocused_fg_color #6e7175;
|
|
||||||
#@define-color theme_unfocused_view_text_color #65686a;
|
|
||||||
#@define-color insensitive_unfocused_bg_color #2e3338;
|
|
||||||
#@define-color theme_unfocused_view_bg_color #212427;
|
|
||||||
#@define-color insensitive_unfocused_selected_bg_color #2e3338;
|
|
||||||
#@define-color insensitive_unfocused_selected_fg_color #6e7175;
|
|
||||||
#@define-color theme_button_background_backdrop_insensitive #2e3338;
|
|
||||||
#@define-color theme_button_decoration_hover_backdrop_insensitive #325b72;
|
|
||||||
#@define-color theme_button_decoration_focus_backdrop_insensitive #325b72;
|
|
||||||
#@define-color theme_button_foreground_backdrop_insensitive #6e7175;
|
|
||||||
#@define-color theme_button_foreground_active_backdrop_insensitive #6e7175;
|
|
||||||
#@define-color unfocused_insensitive_borders #3e4347;
|
|
||||||
#@define-color warning_color_insensitive_backdrop #683e19;
|
|
||||||
#@define-color success_color_insensitive_backdrop #225139;
|
|
||||||
#@define-color error_color_insensitive_backdrop #5e2e35;
|
|
||||||
#@define-color link_color #2980b9;
|
|
||||||
#@define-color link_visited_color #7f8c8d;
|
|
||||||
#@define-color tooltip_text #eff0f1;
|
|
||||||
#@define-color tooltip_background #31363b;
|
|
||||||
#@define-color tooltip_border #606468;
|
|
||||||
#@define-color content_view_bg #232629;
|
|
||||||
#@define-color theme_titlebar_background rgb(49,54,59);
|
|
||||||
#@define-color theme_titlebar_foreground rgb(239,240,241);
|
|
||||||
#@define-color theme_titlebar_background_light #31363b;
|
|
||||||
#@define-color theme_titlebar_foreground_backdrop rgb(127,140,141);
|
|
||||||
#@define-color theme_titlebar_background_backdrop rgb(49,54,59);
|
|
||||||
#@define-color theme_titlebar_foreground_insensitive rgb(127,140,141);
|
|
||||||
#@define-color theme_titlebar_foreground_insensitive_backdrop rgb(127,140,141);
|
|
||||||
#'';
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
/*@import "./colorschemes/gruvbox.rasi"*/
|
|
||||||
@import "./colorschemes/teal.rasi"
|
|
|
@ -1,8 +0,0 @@
|
||||||
* {
|
|
||||||
accent: #6BA0DE;
|
|
||||||
background: #383C4A;
|
|
||||||
background-light: #404552;
|
|
||||||
foreground: #E4E4E4;
|
|
||||||
on: #44ad4d;
|
|
||||||
off: #e34039;
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
* {
|
|
||||||
accent: #83a598;
|
|
||||||
/*background: #282828;*/
|
|
||||||
background: #282828dd;
|
|
||||||
background-light: #303030dd;
|
|
||||||
foreground: #ebdbb2;
|
|
||||||
on: #44ad4d;
|
|
||||||
off: #fb4934;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
* {
|
|
||||||
accent: #009688;
|
|
||||||
background: #212121bb;
|
|
||||||
background-light: #272727;
|
|
||||||
foreground: #bdbdbd;
|
|
||||||
on: #66bb6a;
|
|
||||||
off: #ef5350;
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{ myConf, pkgs ? import <nixpkgs> }:
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.rofi.override { plugins = [ pkgs.rofi-emoji ]; };
|
|
||||||
theme = "/home/leon/nixpkgs/config/rofi/default_theme.rasi";
|
|
||||||
#theme = ./default_theme.rasi;
|
|
||||||
terminal = "${pkgs.alacritty}/bin/alacritty";
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
@import "./launcher_grid_style.rasi"
|
|
|
@ -1,95 +0,0 @@
|
||||||
/*
|
|
||||||
*
|
|
||||||
* Author : Aditya Shakya (adi1090x)
|
|
||||||
* Mail : adi1090x@gmail.com
|
|
||||||
* Github : @adi1090x
|
|
||||||
* Reddit : @adi1090x
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
configuration {
|
|
||||||
drun-display-format: "{icon} {name}";
|
|
||||||
display-drun: "Applications";
|
|
||||||
show-icons: true;
|
|
||||||
icon-theme: "Papirus";
|
|
||||||
location: 0;
|
|
||||||
columns: 3;
|
|
||||||
fake-transparency: true;
|
|
||||||
/*fake-transparency: false;*/
|
|
||||||
hide-scrollbar: true;
|
|
||||||
bw: 0;
|
|
||||||
fullscreen: true;
|
|
||||||
show-icons: true;
|
|
||||||
terminal: "kitty --single-instance";
|
|
||||||
sidebar-mode: false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@import "./colors.rasi"
|
|
||||||
|
|
||||||
* {
|
|
||||||
text-font: "Iosevka 14";
|
|
||||||
|
|
||||||
inputbar-margin: 3px 3px;
|
|
||||||
prompt-padding: 15px 20px;
|
|
||||||
entry-padding: 15px 15px 15px 0px;
|
|
||||||
list-element-padding: 10px;
|
|
||||||
list-element-margin: @inputbar-margin;
|
|
||||||
list-element-border: 0px 0px 0px 5px;
|
|
||||||
|
|
||||||
apps-textbox-prompt-colon-padding: 15px -5px 0px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#window {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 120px 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
background-color: @background;
|
|
||||||
text-color: @foreground;
|
|
||||||
font: @text-font;
|
|
||||||
}
|
|
||||||
|
|
||||||
inputbar,
|
|
||||||
prompt,
|
|
||||||
textbox-prompt-colon,
|
|
||||||
entry {
|
|
||||||
background-color: @background-light;
|
|
||||||
}
|
|
||||||
|
|
||||||
#inputbar {
|
|
||||||
children: [ prompt, textbox-prompt-colon, entry ];
|
|
||||||
margin: @inputbar-margin;
|
|
||||||
}
|
|
||||||
|
|
||||||
#prompt {
|
|
||||||
padding: @prompt-padding;
|
|
||||||
background-color: @accent;
|
|
||||||
text-color: @background;
|
|
||||||
}
|
|
||||||
|
|
||||||
#textbox-prompt-colon {
|
|
||||||
expand: false;
|
|
||||||
str: " :: ";
|
|
||||||
padding: @apps-textbox-prompt-colon-padding;
|
|
||||||
}
|
|
||||||
|
|
||||||
#entry {
|
|
||||||
text-color: @accent;
|
|
||||||
padding: @entry-padding;
|
|
||||||
}
|
|
||||||
|
|
||||||
#element {
|
|
||||||
padding: @list-element-padding;
|
|
||||||
margin: @list-element-margin;
|
|
||||||
border: @list-element-border;
|
|
||||||
background-color: @background-light;
|
|
||||||
border-color: @background-light;
|
|
||||||
}
|
|
||||||
|
|
||||||
#element.selected {
|
|
||||||
background-color: @background-focus;
|
|
||||||
text-color: @accent;
|
|
||||||
border-color: @accent;
|
|
||||||
}
|
|
|
@ -1,96 +0,0 @@
|
||||||
/*
|
|
||||||
*
|
|
||||||
* Author : Aditya Shakya (adi1090x)
|
|
||||||
* Mail : adi1090x@gmail.com
|
|
||||||
* Github : @adi1090x
|
|
||||||
* Reddit : @adi1090x
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
configuration {
|
|
||||||
drun-display-format: "{icon} {name}";
|
|
||||||
display-drun: "Applications";
|
|
||||||
show-icons: true;
|
|
||||||
icon-theme: "Papirus";
|
|
||||||
location: 0;
|
|
||||||
yoffset: 0;
|
|
||||||
xoffset: 0;
|
|
||||||
columns: 2;
|
|
||||||
fake-transparency: false;
|
|
||||||
hide-scrollbar: true;
|
|
||||||
bw: 0;
|
|
||||||
fullscreen: false;
|
|
||||||
show-icons: true;
|
|
||||||
terminal: "termite";
|
|
||||||
sidebar-mode: false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@import "./colors.rasi"
|
|
||||||
|
|
||||||
* {
|
|
||||||
text-font: "Iosevka 12";
|
|
||||||
|
|
||||||
inputbar-margin: 3px 3px;
|
|
||||||
prompt-padding: 10px 10px;
|
|
||||||
entry-padding: 10px 0px 10px 0px;
|
|
||||||
list-element-padding: 10px;
|
|
||||||
list-element-margin: @inputbar-margin;
|
|
||||||
list-element-border: 0px 0px 0px 4px;
|
|
||||||
|
|
||||||
apps-textbox-prompt-colon-padding: 10px -5px 0px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#window {
|
|
||||||
width: 50%;
|
|
||||||
height: 60%;
|
|
||||||
padding: 40px 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
background-color: @background;
|
|
||||||
text-color: @foreground;
|
|
||||||
font: @text-font;
|
|
||||||
}
|
|
||||||
|
|
||||||
inputbar,
|
|
||||||
prompt,
|
|
||||||
textbox-prompt-colon,
|
|
||||||
entry {
|
|
||||||
background-color: @background-light;
|
|
||||||
}
|
|
||||||
|
|
||||||
#inputbar {
|
|
||||||
children: [ prompt, textbox-prompt-colon, entry ];
|
|
||||||
margin: @inputbar-margin;
|
|
||||||
}
|
|
||||||
|
|
||||||
#prompt {
|
|
||||||
padding: @prompt-padding;
|
|
||||||
background-color: @accent;
|
|
||||||
text-color: @background;
|
|
||||||
}
|
|
||||||
|
|
||||||
#textbox-prompt-colon {
|
|
||||||
expand: false;
|
|
||||||
str: " :: ";
|
|
||||||
padding: @apps-textbox-prompt-colon-padding;
|
|
||||||
}
|
|
||||||
|
|
||||||
#entry {
|
|
||||||
text-color: @accent;
|
|
||||||
padding: @entry-padding;
|
|
||||||
}
|
|
||||||
|
|
||||||
#element {
|
|
||||||
padding: @list-element-padding;
|
|
||||||
margin: @list-element-margin;
|
|
||||||
border: @list-element-border;
|
|
||||||
background-color: @background-light;
|
|
||||||
border-color: @background-light;
|
|
||||||
}
|
|
||||||
|
|
||||||
#element.selected {
|
|
||||||
background-color: @background-focus;
|
|
||||||
text-color: @accent;
|
|
||||||
border-color: @accent;
|
|
||||||
}
|
|
|
@ -7,34 +7,30 @@
|
||||||
# nix-env -u home-manager
|
# nix-env -u home-manager
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
|
||||||
elkowar_local = import ./local/default.nix {};
|
|
||||||
myConf = import ./myConfig.nix;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
overlays = [ (import ./overlay) ];
|
||||||
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
packageOverrides = pkgs: {
|
||||||
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
|
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
};
|
};
|
||||||
cool-retro-term = (
|
|
||||||
pkgs.writeScriptBin "cool-retro-term" ''
|
|
||||||
#!/bin/sh
|
|
||||||
exec nixGLIntel ${pkgs.cool-retro-term}/bin/cool-retro-term "$@"
|
|
||||||
''
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
profiles = {
|
};
|
||||||
|
|
||||||
|
|
||||||
|
elkowar = {
|
||||||
base = {
|
base = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFish = true;
|
enableFish = true;
|
||||||
enableZsh = true;
|
enableZsh = true;
|
||||||
};
|
};
|
||||||
desktop.enable = true;
|
desktop.enable = true;
|
||||||
|
desktop.colors = import ./modules/desktop/colors/gruvbox.nix;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
imports = [ ./profiles/base.nix ./profiles/desktop.nix ];
|
imports = [ ./modules ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
|
||||||
{
|
|
||||||
bashtop = pkgs.callPackage ./packages/bashtop.nix {};
|
|
||||||
liquidctl = pkgs.callPackage ./packages/liquidctl.nix {};
|
|
||||||
}
|
|
|
@ -1,17 +1,18 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.profiles.base;
|
cfg = config.elkowar.base;
|
||||||
elkowar_local = import ../local/default.nix { };
|
elkowar_local = import ../local/default.nix { };
|
||||||
myConf = import ../myConfig.nix;
|
myConf = import ../myConfig.nix;
|
||||||
|
sources = import ../nix/sources.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.profiles.base = {
|
options.elkowar.base = {
|
||||||
enable = lib.mkEnableOption "Basic profile enabled";
|
enable = lib.mkEnableOption "Basic profile enabled";
|
||||||
enableFish = lib.mkEnableOption "Fish shell";
|
enableFish = lib.mkEnableOption "Fish shell";
|
||||||
enableZsh = lib.mkEnableOption "Zsh shell";
|
enableZsh = lib.mkEnableOption "Zsh shell";
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [ ../config/tmux.nix ../config/generalConfig.nix ../config/zsh.nix ../config/fish.nix ];
|
imports = [ ./term ./generalConfig.nix ];
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
elkowar.programs.tmux.enable = true;
|
elkowar.programs.tmux.enable = true;
|
||||||
|
@ -30,6 +31,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
sources.manix
|
||||||
direnv
|
direnv
|
||||||
rnix-lsp
|
rnix-lsp
|
||||||
nix-prefetch-git
|
nix-prefetch-git
|
||||||
|
@ -46,13 +48,13 @@ in
|
||||||
fd
|
fd
|
||||||
jq
|
jq
|
||||||
|
|
||||||
#(import (fetchTarball https://github.com/lf-/nix-doc/archive/main.tar.gz) {})
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
htop.enable = true;
|
htop.enable = true;
|
||||||
|
|
||||||
|
|
||||||
fzf = {
|
fzf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = cfg.enableFish;
|
enableFishIntegration = cfg.enableFish;
|
1
files/nix-stuff/nixpkgs/modules/default.nix
Normal file
1
files/nix-stuff/nixpkgs/modules/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{...}: { imports = [ ./desktop ./term ./base.nix ./desktop.nix ./generalConfig.nix]; }
|
|
@ -1,33 +1,43 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.profiles.desktop;
|
cfg = config.elkowar.desktop;
|
||||||
elkowar_local = import ../local/default.nix {};
|
|
||||||
myConf = import ../myConfig.nix;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.profiles.desktop = {
|
options.elkowar.desktop = {
|
||||||
enable = lib.mkEnableOption "Desktop configuration enabled";
|
enable = lib.mkEnableOption "Desktop configuration enabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
imports = [ ./desktop ];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
gtk = import ../config/gtk.nix { inherit pkgs; inherit myConf; };
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
elkowar_local.bashtop
|
(pkgs.callPackage ../packages/bashtop.nix { })
|
||||||
elkowar_local.liquidctl
|
(pkgs.callPackage ../packages/liquidctl.nix { })
|
||||||
|
(pkgs.callPackage ../packages/scr.nix { })
|
||||||
|
(pkgs.callPackage ../packages/boox.nix { })
|
||||||
|
|
||||||
cool-retro-term
|
cool-retro-term
|
||||||
simplescreenrecorder
|
|
||||||
gromit-mpx
|
gromit-mpx
|
||||||
|
dragon-drop
|
||||||
|
#simplescreenrecorder
|
||||||
#hyper-haskell
|
#hyper-haskell
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
|
||||||
alacritty = import ../config/alacritty.nix { inherit pkgs; inherit myConf; }; # <- https://github.com/guibou/nixGL
|
|
||||||
feh = import ../config/feh.nix;
|
|
||||||
rofi = import ../config/rofi { inherit pkgs; inherit myConf; };
|
|
||||||
|
|
||||||
|
elkowar.desktop = {
|
||||||
|
gtk.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
elkowar.programs = {
|
||||||
|
alacritty.enable = true;
|
||||||
|
rofi.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
mpv = {
|
mpv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
bindings = {
|
bindings = {
|
||||||
|
@ -40,6 +50,11 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
feh = {
|
||||||
|
enable = true;
|
||||||
|
keybindings = { zoom_in = "plus"; zoom_out = "minus"; };
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
59
files/nix-stuff/nixpkgs/modules/desktop/alacritty.nix
Normal file
59
files/nix-stuff/nixpkgs/modules/desktop/alacritty.nix
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.elkowar.programs.alacritty;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.elkowar.programs.alacritty = {
|
||||||
|
enable = lib.mkEnableOption "Enable alacritty";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.alacritty = {
|
||||||
|
enable = true;
|
||||||
|
package = (
|
||||||
|
pkgs.writeScriptBin "alacritty" ''
|
||||||
|
#!/bin/sh
|
||||||
|
exec nixGLIntel ${pkgs.alacritty}/bin/alacritty "$@"
|
||||||
|
''
|
||||||
|
);
|
||||||
|
settings = {
|
||||||
|
window = {
|
||||||
|
padding.x = 20;
|
||||||
|
padding.y = 20;
|
||||||
|
dynamic_padding = true;
|
||||||
|
dynamic_title = true;
|
||||||
|
};
|
||||||
|
cursor = {
|
||||||
|
style = "Block";
|
||||||
|
unfocused_hollow = true;
|
||||||
|
};
|
||||||
|
shell = "/home/leon/.nix-profile/bin/zsh";
|
||||||
|
#shell = "/usr/bin/fish";
|
||||||
|
mouse = {
|
||||||
|
double_click.threshold = 300;
|
||||||
|
triple_click.threshold = 300;
|
||||||
|
hide_when_typing = true;
|
||||||
|
url.launcher.program = "xdg-open";
|
||||||
|
};
|
||||||
|
|
||||||
|
key_bindings = [
|
||||||
|
{
|
||||||
|
key = "N";
|
||||||
|
mods = "Control|Shift";
|
||||||
|
action = "SpawnNewInstance";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
background_opacity = 1;
|
||||||
|
font = {
|
||||||
|
size = 12;
|
||||||
|
#normal.family = "Iosevka";
|
||||||
|
normal.family = "Terminus (TTF)";
|
||||||
|
offset.x = 0;
|
||||||
|
offset.y = -2;
|
||||||
|
};
|
||||||
|
colors = config.elkowar.desktop.colors;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
43
files/nix-stuff/nixpkgs/modules/desktop/colors/default.nix
Normal file
43
files/nix-stuff/nixpkgs/modules/desktop/colors/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.elkowar.desktop.colors;
|
||||||
|
in
|
||||||
|
with lib; {
|
||||||
|
options = {
|
||||||
|
elkowar.desktop.colors = {
|
||||||
|
primary = {
|
||||||
|
background = mkOption { type = types.str; };
|
||||||
|
foreground = mkOption { type = types.str; };
|
||||||
|
bg_darker = mkOption { type = types.str; };
|
||||||
|
bg_lighter = mkOption { type = types.str; };
|
||||||
|
};
|
||||||
|
|
||||||
|
#cursor = {
|
||||||
|
#background = mkOption { type = types.str; };
|
||||||
|
#foreground = mkOption { type = types.str; };
|
||||||
|
#};
|
||||||
|
|
||||||
|
normal = {
|
||||||
|
black = mkOption { type = types.str; };
|
||||||
|
red = mkOption { type = types.str; };
|
||||||
|
green = mkOption { type = types.str; };
|
||||||
|
yellow = mkOption { type = types.str; };
|
||||||
|
blue = mkOption { type = types.str; };
|
||||||
|
magenta = mkOption { type = types.str; };
|
||||||
|
cyan = mkOption { type = types.str; };
|
||||||
|
white = mkOption { type = types.str; };
|
||||||
|
};
|
||||||
|
|
||||||
|
bright = {
|
||||||
|
black = mkOption { type = types.str; };
|
||||||
|
red = mkOption { type = types.str; };
|
||||||
|
green = mkOption { type = types.str; };
|
||||||
|
yellow = mkOption { type = types.str; };
|
||||||
|
blue = mkOption { type = types.str; };
|
||||||
|
magenta = mkOption { type = types.str; };
|
||||||
|
cyan = mkOption { type = types.str; };
|
||||||
|
white = mkOption { type = types.str; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
34
files/nix-stuff/nixpkgs/modules/desktop/colors/gruvbox.nix
Normal file
34
files/nix-stuff/nixpkgs/modules/desktop/colors/gruvbox.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
rec {
|
||||||
|
#accent = bright.cyan;
|
||||||
|
#accentDark = normal.cyan;
|
||||||
|
|
||||||
|
primary = {
|
||||||
|
background = "#282828";
|
||||||
|
foreground = "#ebdbb2";
|
||||||
|
bg_darker = "#1d2021";
|
||||||
|
bg_lighter = "#3c3836";
|
||||||
|
};
|
||||||
|
|
||||||
|
normal = {
|
||||||
|
black = "#282828";
|
||||||
|
red = "#cc241d";
|
||||||
|
green = "#98971a";
|
||||||
|
yellow = "#d79921";
|
||||||
|
blue = "#458588";
|
||||||
|
magenta = "#b16286";
|
||||||
|
cyan = "#689d6a";
|
||||||
|
white = "#a89984";
|
||||||
|
};
|
||||||
|
|
||||||
|
bright = {
|
||||||
|
black = "#928374";
|
||||||
|
red = "#fb4934";
|
||||||
|
green = "#b8bb26";
|
||||||
|
yellow = "#fabd2f";
|
||||||
|
blue = "#83a598";
|
||||||
|
magenta = "#d3869b";
|
||||||
|
cyan = "#8ec07c";
|
||||||
|
white = "#ebdbb2";
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
1
files/nix-stuff/nixpkgs/modules/desktop/default.nix
Normal file
1
files/nix-stuff/nixpkgs/modules/desktop/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ ... }: { imports = [ ./alacritty.nix ./rofi ./colors ./gtk.nix ]; }
|
45
files/nix-stuff/nixpkgs/modules/desktop/gtk.nix
Normal file
45
files/nix-stuff/nixpkgs/modules/desktop/gtk.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.elkowar.desktop.gtk;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.elkowar.desktop.gtk = {
|
||||||
|
enable = lib.mkEnableOption "Enable gtk configuration";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme.name = "phocus";
|
||||||
|
iconTheme.name = "Numix";
|
||||||
|
#font.name = "Terminus (TTF) 12";
|
||||||
|
font.name = "xos4 Terminus 12";
|
||||||
|
|
||||||
|
gtk2.extraConfig = ''gtk-theme-name = "Adwaita-dark"'';
|
||||||
|
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
gtk-menu-images = 1;
|
||||||
|
gtk-xft-hinting = 1;
|
||||||
|
gtk-xft-rgba = "rgb";
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
gtk-decoration-layout = ":";
|
||||||
|
gtk-toolbar-style = "GTK_TOOLBAR_ICONS";
|
||||||
|
gtk-toolbar-icon-size = "GTK_ICON_SIZE_LARGE_TOOLBAR";
|
||||||
|
gtk-enable-even-sounds = 0;
|
||||||
|
gtk-enable-input-feedback-sounds = 0;
|
||||||
|
gtk-button-images = 1;
|
||||||
|
ctk-cursor-theme-name = "capitaine-cursors-light";
|
||||||
|
gtk-cursor-theme-size = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk3.extraCss = ''
|
||||||
|
.termite {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
vte-terminal {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
115
files/nix-stuff/nixpkgs/modules/desktop/rofi/default.nix
Normal file
115
files/nix-stuff/nixpkgs/modules/desktop/rofi/default.nix
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.elkowar.programs.rofi;
|
||||||
|
myConf = import ../myConfig.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.elkowar.programs.rofi = {
|
||||||
|
enable = lib.mkEnableOption "Enable rofi";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
programs.rofi = lib.mkIf cfg.enable {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.rofi.override { plugins = [ pkgs.rofi-emoji ]; };
|
||||||
|
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||||
|
theme = with config.elkowar.desktop.colors; builtins.toString (pkgs.writeText "rofi-theme" ''
|
||||||
|
configuration {
|
||||||
|
drun-display-format: "{icon} {name}";
|
||||||
|
display-drun: "Applications";
|
||||||
|
show-icons: true;
|
||||||
|
icon-theme: "Papirus";
|
||||||
|
location: 0;
|
||||||
|
yoffset: 0;
|
||||||
|
xoffset: 0;
|
||||||
|
columns: 2;
|
||||||
|
fake-transparency: false;
|
||||||
|
hide-scrollbar: true;
|
||||||
|
bw: 0;
|
||||||
|
fullscreen: false;
|
||||||
|
show-icons: true;
|
||||||
|
terminal: "termite";
|
||||||
|
sidebar-mode: false;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
accent: ${normal.cyan};
|
||||||
|
background: ${primary.bg_darker};
|
||||||
|
background-light: ${primary.background};
|
||||||
|
foreground: ${primary.foreground};
|
||||||
|
on: ${normal.green};
|
||||||
|
off: ${normal.blue};
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
text-font: "Iosevka 12";
|
||||||
|
|
||||||
|
inputbar-margin: 3px 3px;
|
||||||
|
prompt-padding: 10px 10px;
|
||||||
|
entry-padding: 10px 0px 10px 0px;
|
||||||
|
list-element-padding: 10px;
|
||||||
|
list-element-margin: @inputbar-margin;
|
||||||
|
list-element-border: 0px 0px 0px 4px;
|
||||||
|
|
||||||
|
apps-textbox-prompt-colon-padding: 10px -5px 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
width: 50%;
|
||||||
|
height: 60%;
|
||||||
|
padding: 40px 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
background-color: @background;
|
||||||
|
text-color: @foreground;
|
||||||
|
font: @text-font;
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar,
|
||||||
|
prompt,
|
||||||
|
textbox-prompt-colon,
|
||||||
|
entry {
|
||||||
|
background-color: @background-light;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inputbar {
|
||||||
|
children: [ prompt, textbox-prompt-colon, entry ];
|
||||||
|
margin: @inputbar-margin;
|
||||||
|
}
|
||||||
|
|
||||||
|
#prompt {
|
||||||
|
padding: @prompt-padding;
|
||||||
|
background-color: @accent;
|
||||||
|
text-color: @background;
|
||||||
|
}
|
||||||
|
|
||||||
|
#textbox-prompt-colon {
|
||||||
|
expand: false;
|
||||||
|
str: " :: ";
|
||||||
|
padding: @apps-textbox-prompt-colon-padding;
|
||||||
|
}
|
||||||
|
|
||||||
|
#entry {
|
||||||
|
text-color: @accent;
|
||||||
|
padding: @entry-padding;
|
||||||
|
}
|
||||||
|
|
||||||
|
#element {
|
||||||
|
padding: @list-element-padding;
|
||||||
|
margin: @list-element-margin;
|
||||||
|
border: @list-element-border;
|
||||||
|
background-color: @background-light;
|
||||||
|
border-color: @background-light;
|
||||||
|
}
|
||||||
|
|
||||||
|
#element.selected {
|
||||||
|
background-color: @background-focus;
|
||||||
|
text-color: @accent;
|
||||||
|
border-color: @accent;
|
||||||
|
}
|
||||||
|
''
|
||||||
|
);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
1
files/nix-stuff/nixpkgs/modules/term/default.nix
Normal file
1
files/nix-stuff/nixpkgs/modules/term/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ ... }: { imports = [ ./zsh ./fish ./tmux.nix ]; }
|
|
@ -169,7 +169,7 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
plugins = let
|
plugins = let
|
||||||
sources = import ./zsh/nix/sources.nix;
|
sources = import ./nix/sources.nix;
|
||||||
in
|
in
|
||||||
[
|
[
|
||||||
{ name = "fzf-tab"; src = sources.fzf-tab; }
|
{ name = "fzf-tab"; src = sources.fzf-tab; }
|
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
monospaceFont = "Terminus (TTF)";
|
|
||||||
colors = rec {
|
|
||||||
accent = light.cyan;
|
|
||||||
accentDark = normal.cyan;
|
|
||||||
|
|
||||||
primary = {
|
|
||||||
background = "#282828";
|
|
||||||
foreground = "#ebdbb2";
|
|
||||||
};
|
|
||||||
normal = {
|
|
||||||
black = "#282828";
|
|
||||||
red = "#cc241d";
|
|
||||||
green = "#98971a";
|
|
||||||
yellow = "#d79921";
|
|
||||||
blue = "#458588";
|
|
||||||
magenta = "#b16286";
|
|
||||||
cyan = "#689d6a";
|
|
||||||
white = "#a89984";
|
|
||||||
};
|
|
||||||
light = {
|
|
||||||
black = "#928374";
|
|
||||||
red = "#fb4934";
|
|
||||||
green = "#b8bb26";
|
|
||||||
yellow = "#fabd2f";
|
|
||||||
blue = "#83a598";
|
|
||||||
magenta = "#d3869b";
|
|
||||||
cyan = "#8ec07c";
|
|
||||||
white = "#ebdbb2";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
38
files/nix-stuff/nixpkgs/nix/sources.json
Normal file
38
files/nix-stuff/nixpkgs/nix/sources.json
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
"manix": {
|
||||||
|
"branch": "master",
|
||||||
|
"description": "A fast CLI documentation searcher for Nix.",
|
||||||
|
"homepage": null,
|
||||||
|
"owner": "mlvzk",
|
||||||
|
"repo": "manix",
|
||||||
|
"rev": "a2eb8111f779903fed3ce8e411dd3e255466ada5",
|
||||||
|
"sha256": "03pp4ij0bg9chqlqanymjh7iqcjb46nzbjc5wn5i7gyjfrcz7j54",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/mlvzk/manix/archive/a2eb8111f779903fed3ce8e411dd3e255466ada5.tar.gz",
|
||||||
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
|
},
|
||||||
|
"niv": {
|
||||||
|
"branch": "master",
|
||||||
|
"description": "Easy dependency management for Nix projects",
|
||||||
|
"homepage": "https://github.com/nmattia/niv",
|
||||||
|
"owner": "nmattia",
|
||||||
|
"repo": "niv",
|
||||||
|
"rev": "e82eb322ea32a747a51c431d7787221bcc6d9038",
|
||||||
|
"sha256": "1fy4dcr05d80diwlxmh42xnjm5ki1pkbky38smvlqjaky2y2f71f",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/nmattia/niv/archive/e82eb322ea32a747a51c431d7787221bcc6d9038.tar.gz",
|
||||||
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"branch": "release-20.03",
|
||||||
|
"description": "Nix Packages collection",
|
||||||
|
"homepage": null,
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9319284c1d02e2969bb6340e691e06105e87015f",
|
||||||
|
"sha256": "1g3wli01qnbjmf9x2wqfjk65z9h94cglrljpcc0slz5g0g6pjg99",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs/archive/9319284c1d02e2969bb6340e691e06105e87015f.tar.gz",
|
||||||
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
|
}
|
||||||
|
}
|
138
files/nix-stuff/nixpkgs/nix/sources.nix
Normal file
138
files/nix-stuff/nixpkgs/nix/sources.nix
Normal file
|
@ -0,0 +1,138 @@
|
||||||
|
# This file has been generated by Niv.
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
#
|
||||||
|
# The fetchers. fetch_<type> fetches specs of type <type>.
|
||||||
|
#
|
||||||
|
|
||||||
|
fetch_file = pkgs: spec:
|
||||||
|
if spec.builtin or true then
|
||||||
|
builtins_fetchurl { inherit (spec) url sha256; }
|
||||||
|
else
|
||||||
|
pkgs.fetchurl { inherit (spec) url sha256; };
|
||||||
|
|
||||||
|
fetch_tarball = pkgs: name: spec:
|
||||||
|
let
|
||||||
|
ok = str: ! builtins.isNull (builtins.match "[a-zA-Z0-9+-._?=]" str);
|
||||||
|
# sanitize the name, though nix will still fail if name starts with period
|
||||||
|
name' = stringAsChars (x: if ! ok x then "-" else x) "${name}-src";
|
||||||
|
in
|
||||||
|
if spec.builtin or true then
|
||||||
|
builtins_fetchTarball { name = name'; inherit (spec) url sha256; }
|
||||||
|
else
|
||||||
|
pkgs.fetchzip { name = name'; inherit (spec) url sha256; };
|
||||||
|
|
||||||
|
fetch_git = spec:
|
||||||
|
builtins.fetchGit { url = spec.repo; inherit (spec) rev ref; };
|
||||||
|
|
||||||
|
fetch_local = spec: spec.path;
|
||||||
|
|
||||||
|
fetch_builtin-tarball = name: throw
|
||||||
|
''[${name}] The niv type "builtin-tarball" is deprecated. You should instead use `builtin = true`.
|
||||||
|
$ niv modify ${name} -a type=tarball -a builtin=true'';
|
||||||
|
|
||||||
|
fetch_builtin-url = name: throw
|
||||||
|
''[${name}] The niv type "builtin-url" will soon be deprecated. You should instead use `builtin = true`.
|
||||||
|
$ niv modify ${name} -a type=file -a builtin=true'';
|
||||||
|
|
||||||
|
#
|
||||||
|
# Various helpers
|
||||||
|
#
|
||||||
|
|
||||||
|
# The set of packages used when specs are fetched using non-builtins.
|
||||||
|
mkPkgs = sources:
|
||||||
|
let
|
||||||
|
sourcesNixpkgs =
|
||||||
|
import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) {};
|
||||||
|
hasNixpkgsPath = builtins.any (x: x.prefix == "nixpkgs") builtins.nixPath;
|
||||||
|
hasThisAsNixpkgsPath = <nixpkgs> == ./.;
|
||||||
|
in
|
||||||
|
if builtins.hasAttr "nixpkgs" sources
|
||||||
|
then sourcesNixpkgs
|
||||||
|
else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then
|
||||||
|
import <nixpkgs> {}
|
||||||
|
else
|
||||||
|
abort
|
||||||
|
''
|
||||||
|
Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or
|
||||||
|
add a package called "nixpkgs" to your sources.json.
|
||||||
|
'';
|
||||||
|
|
||||||
|
# The actual fetching function.
|
||||||
|
fetch = pkgs: name: spec:
|
||||||
|
|
||||||
|
if ! builtins.hasAttr "type" spec then
|
||||||
|
abort "ERROR: niv spec ${name} does not have a 'type' attribute"
|
||||||
|
else if spec.type == "file" then fetch_file pkgs spec
|
||||||
|
else if spec.type == "tarball" then fetch_tarball pkgs name spec
|
||||||
|
else if spec.type == "git" then fetch_git spec
|
||||||
|
else if spec.type == "local" then fetch_local spec
|
||||||
|
else if spec.type == "builtin-tarball" then fetch_builtin-tarball name
|
||||||
|
else if spec.type == "builtin-url" then fetch_builtin-url name
|
||||||
|
else
|
||||||
|
abort "ERROR: niv spec ${name} has unknown type ${builtins.toJSON spec.type}";
|
||||||
|
|
||||||
|
# Ports of functions for older nix versions
|
||||||
|
|
||||||
|
# a Nix version of mapAttrs if the built-in doesn't exist
|
||||||
|
mapAttrs = builtins.mapAttrs or (
|
||||||
|
f: set: with builtins;
|
||||||
|
listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set))
|
||||||
|
);
|
||||||
|
|
||||||
|
# https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295
|
||||||
|
range = first: last: if first > last then [] else builtins.genList (n: first + n) (last - first + 1);
|
||||||
|
|
||||||
|
# https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257
|
||||||
|
stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1));
|
||||||
|
|
||||||
|
# https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269
|
||||||
|
stringAsChars = f: s: concatStrings (map f (stringToCharacters s));
|
||||||
|
concatStrings = builtins.concatStringsSep "";
|
||||||
|
|
||||||
|
# fetchTarball version that is compatible between all the versions of Nix
|
||||||
|
builtins_fetchTarball = { url, name, sha256 }@attrs:
|
||||||
|
let
|
||||||
|
inherit (builtins) lessThan nixVersion fetchTarball;
|
||||||
|
in
|
||||||
|
if lessThan nixVersion "1.12" then
|
||||||
|
fetchTarball { inherit name url; }
|
||||||
|
else
|
||||||
|
fetchTarball attrs;
|
||||||
|
|
||||||
|
# fetchurl version that is compatible between all the versions of Nix
|
||||||
|
builtins_fetchurl = { url, sha256 }@attrs:
|
||||||
|
let
|
||||||
|
inherit (builtins) lessThan nixVersion fetchurl;
|
||||||
|
in
|
||||||
|
if lessThan nixVersion "1.12" then
|
||||||
|
fetchurl { inherit url; }
|
||||||
|
else
|
||||||
|
fetchurl attrs;
|
||||||
|
|
||||||
|
# Create the final "sources" from the config
|
||||||
|
mkSources = config:
|
||||||
|
mapAttrs (
|
||||||
|
name: spec:
|
||||||
|
if builtins.hasAttr "outPath" spec
|
||||||
|
then abort
|
||||||
|
"The values in sources.json should not have an 'outPath' attribute"
|
||||||
|
else
|
||||||
|
spec // { outPath = fetch config.pkgs name spec; }
|
||||||
|
) config.sources;
|
||||||
|
|
||||||
|
# The "config" used by the fetchers
|
||||||
|
mkConfig =
|
||||||
|
{ sourcesFile ? ./sources.json
|
||||||
|
, sources ? builtins.fromJSON (builtins.readFile sourcesFile)
|
||||||
|
, pkgs ? mkPkgs sources
|
||||||
|
}: rec {
|
||||||
|
# The sources, i.e. the attribute set of spec name to spec
|
||||||
|
inherit sources;
|
||||||
|
|
||||||
|
# The "pkgs" (evaluated nixpkgs) to use for e.g. non-builtin fetchers
|
||||||
|
inherit pkgs;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
mkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); }
|
6
files/nix-stuff/nixpkgs/overlay/cool-retro-term.nix
Normal file
6
files/nix-stuff/nixpkgs/overlay/cool-retro-term.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{ pkgs }:
|
||||||
|
|
||||||
|
pkgs.writeScriptBin "cool-retro-term" ''
|
||||||
|
#!/bin/sh
|
||||||
|
exec nixGLIntel ${pkgs.cool-retro-term}/bin/cool-retro-term "$@"
|
||||||
|
''
|
3
files/nix-stuff/nixpkgs/overlay/default.nix
Normal file
3
files/nix-stuff/nixpkgs/overlay/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
self: super: {
|
||||||
|
cool-retro-term = super.callPackage ./cool-retro-term.nix { };
|
||||||
|
}
|
13
files/nix-stuff/nixpkgs/packages/boox.nix
Normal file
13
files/nix-stuff/nixpkgs/packages/boox.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
|
pkgs.stdenv.mkDerivation {
|
||||||
|
name = "boox";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "BanchouBoo";
|
||||||
|
repo = "boox";
|
||||||
|
rev = "bbbb883436d505b5f85cbb3024d14c82da548d9b";
|
||||||
|
sha256 = "1xy3g1gyzhmm87cg5dyal55ysj2zrfzk2myrws5v0ck63zyq5593";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [ xorg.libxcb xorg.xcbutilcursor pkgconfig ];
|
||||||
|
installFlags = [ "PREFIX=$(out)" ];
|
||||||
|
}
|
34
files/nix-stuff/nixpkgs/packages/scr.nix
Normal file
34
files/nix-stuff/nixpkgs/packages/scr.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
|
let
|
||||||
|
|
||||||
|
scr = pkgs.fetchFromGitHub {
|
||||||
|
owner = "6gk";
|
||||||
|
repo = "scr";
|
||||||
|
rev = "4064159e291e59f4543a676b872c91fe049a3f1e";
|
||||||
|
sha256 = "1pq0w3qpap6rsgxashphq5xlhvdyhryjaz7dh0l5rfmh7ydpzf12";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
pkgs.runCommand "scr"
|
||||||
|
{ buildInputs = with pkgs; [ slop ffmpeg dmenu xclip shotgun ]; }
|
||||||
|
''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp ${scr}/scr $out/bin/scr
|
||||||
|
sed -i "2 i export PATH=$PATH" $out/bin/scr
|
||||||
|
''
|
||||||
|
|
||||||
|
|
||||||
|
#pkgs.stdenv.mkDerivation {
|
||||||
|
#name = "scr";
|
||||||
|
#src = pkgs.fetchFromGitHub {
|
||||||
|
#owner = "6gk";
|
||||||
|
#repo = "scr";
|
||||||
|
#rev = "4064159e291e59f4543a676b872c91fe049a3f1e";
|
||||||
|
#sha256 = "1pq0w3qpap6rsgxashphq5xlhvdyhryjaz7dh0l5rfmh7ydpzf12";
|
||||||
|
#};
|
||||||
|
|
||||||
|
#nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||||
|
#installPhase = "install -m755 -D ./scr $out/bin/scr";
|
||||||
|
#postFixup = ''
|
||||||
|
#wrapProgram "$out/bin/scr" --prefix PATH : ${pkgs.lib.makeBinPath (with pkgs; [ slop ffmpeg dmenu xclip shotgun ])}
|
||||||
|
#'';
|
||||||
|
#}
|
5
files/scripts/screenvideo.sh
Executable file
5
files/scripts/screenvideo.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rec_filename="$HOME/Bilder/screenvids/$(date '+%Y-%m-%d_%H-%M-%S').mp4"
|
||||||
|
scr -m s -f 30 -c "$rec_filename"
|
||||||
|
dragon --and-exit "$rec_filename"
|
31
files/scripts/scrotshadow.sh
Normal file
31
files/scripts/scrotshadow.sh
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# NAME: dropshadow.sh
|
||||||
|
# VERSION:
|
||||||
|
# AUTHOR: (c) 2013 Glutanimate
|
||||||
|
# DESCRIPTION: - adds transparent dropshadow to images (e.g. screenshots)
|
||||||
|
# - moves them to predefined screenshot folder
|
||||||
|
# FEATURES:
|
||||||
|
# DEPENDENCIES: imagemagick suite
|
||||||
|
#
|
||||||
|
# LICENSE: MIT license (http://opensource.org/licenses/MIT)
|
||||||
|
#
|
||||||
|
# NOTICE: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
||||||
|
# OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# USAGE: dropshadow.sh <image>
|
||||||
|
|
||||||
|
SCREENSHOTFOLDER="$HOME/Pictures/Screenshots"
|
||||||
|
|
||||||
|
|
||||||
|
FILE="${1}"
|
||||||
|
FILENAME="${FILE##*/}"
|
||||||
|
FILEBASE="${FILENAME%.*}"
|
||||||
|
|
||||||
|
convert "${FILE}" \( +clone -background black -shadow 80x20+0+15 \) +swap -background transparent -layers merge +repage "$SCREENSHOTFOLDER/${FILEBASE}.png"
|
||||||
|
|
||||||
|
rm "$FILE" #remove this line to preserve original image
|
Loading…
Reference in a new issue