diff options
41 files changed, 690 insertions, 316 deletions
diff --git a/bin/common/ask b/bin/common/ask index 9fb04ce..95530f5 100755 --- a/bin/common/ask +++ b/bin/common/ask @@ -1,36 +1,4 @@  #!/bin/sh - -# requirements -which pass jq > /dev/null || -	exit 1 - -# input -test -z "${inp:=$@}" && -	inp="$(cat /dev/stdin)" - -# \n\t -> ' ' && "->'  -prompt="$(echo "$inp" | tr "\n\t\"" "  '")" -test -z "$prompt" && exit 1 - -API_KEY="$(pass tokens/openai-api)" -model="text-davinci-003" -tokens="1024" -temperature=0 - -data=$(echo \ -'{ -  "prompt": "'"$prompt"'", -  "model": "'"$model"'", -  "max_tokens": '$tokens', -  "temperature": '$temperature' -}') - -output=$(curl -s -X POST \ -	-H 'Content-Type: application/json' \ -    -H "Authorization: Bearer $API_KEY" \ -	-d "$data" \ -	https://api.openai.com/v1/completions \ -	| jq -r '.choices[0].text') - -# remove newline -echo "${output:1}" +which tgpt >/dev/null || exit 1 +[ "${inp:=$@}" ] || inp="$(cat /dev/stdin)" +tgpt "$inp" diff --git a/bin/common/targit b/bin/common/targit index ae046ac..ca560b3 100755 --- a/bin/common/targit +++ b/bin/common/targit @@ -1,6 +1,5 @@  #!/bin/sh -pwd=$(pwd)  root="$(git rev-parse --show-toplevel)"  cd "$root" || exit 1 -file="$(basename "$root" | sed 's/^\.//').tar.gz" -tar czf "$pwd/$file" $(git ls-files) +file="${root##*/}".tar.gz +tar czf "$file" $(git ls-files) diff --git a/bin/common/ytclipo b/bin/common/ytclipo index 5d86c3f..959ee21 100755 --- a/bin/common/ytclipo +++ b/bin/common/ytclipo @@ -11,9 +11,13 @@ fi  inp="$1"  [ "${inp:=$(paste)}" ] || inp="$(cat /dev/stdin)" -# take last link from clipboard -# works when link is from yt-local -inp="https://youtu.be/$(echo "$inp" | sed 's/.*\(.\{11\}\)$/\1/')" +# remove util scheme +inp="${inp#*//}" +# convert to youtube.com/path url +# works for: +# - 'youtu.be/watch?v=xxxxxx' +# - 'https://piped.video/watch?v=xxxxx' +inp="https://youtube.com/${inp#*/}"  >&2 printf "inp: %s\n" "$inp"  notify-send "ytclipo" "downloading <i>$inp</i>" || : @@ -23,5 +27,5 @@ yt-dlp "$inp" \  	-f "b" \  	-S "res:1080" \  	-P "$HOME/vids/youtube/" \ -	-o "%(channel)s - %(title)s.%(ext)s" +	-o "%(channel)s/%(title)s.%(ext)s"  notify-send "ytclipo" "finished downloading." || : diff --git a/bin/extra/aivpn b/bin/extra/aivpn index fd72ffb..3c87ce8 100755 --- a/bin/extra/aivpn +++ b/bin/extra/aivpn @@ -33,9 +33,3 @@ ssh vm "rasdial \"vpn.student.ehb.be\""  ssh -f -N \  	-L 2222:10.2.160.41:22 \  	vm - -ssh -t \ -	-L 8188:localhost:8188 \ -	vm \ -	ssh -N -L 8188:localhost:8188 luca@10.2.160.41 -logn "[8188], [2222]" diff --git a/bin/extra/append2mpv b/bin/extra/append2mpv new file mode 100755 index 0000000..28c3916 --- /dev/null +++ b/bin/extra/append2mpv @@ -0,0 +1,30 @@ +#!/bin/sh +IPC="/tmp/mpvsocket" + +die () { >&2 printf '%s\n' "$@"; exit 1; } +append_to_mpv() +{ +    file="$(readlink -f "$1")" +    if [ ! -r "$file" ] +    then +        >&2 printf '%s\n' "'$file' not found" +        return +    fi + +    echo '{ "command":   ["loadfile", "'"$file"'", "append"] }' | +        socat - "$IPC" +} + +[ -S "$IPC" ] || die "$IPC is not a socket or doesn't exist" +which socat > /dev/null || exit 1 + + +if [ -t 0 ] +then +    append_to_mpv "$1" +else +    while read -r file +    do +        append_to_mpv "$file" +    done +fi diff --git a/bin/extra/cht.sh b/bin/extra/cht.sh index 681fc69..f373e55 100755 --- a/bin/extra/cht.sh +++ b/bin/extra/cht.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash  # shellcheck disable=SC1117,SC2001  #  # [X] open section diff --git a/bin/extra/sgimg b/bin/extra/sgimg new file mode 100755 index 0000000..7c1823c --- /dev/null +++ b/bin/extra/sgimg @@ -0,0 +1,6 @@ +#!/bin/sh + +imv "$(find ~/.local/share/gurk/ -type f -printf "%A@\t%p\n" | +	sort -n | +	tail -n 1 | +	cut -f 2-)" diff --git a/bin/extra/supd b/bin/extra/supd index 48638bd..9a5ce0c 100755 --- a/bin/extra/supd +++ b/bin/extra/supd @@ -7,7 +7,7 @@ then  	>&2 cat <<-EOF  	usage:  	    supd                              Update dirs in current dir -	    ls ~/projects | supd              Update dirs read from stdin +	    ... | supd                        Update dirs read from stdin  	    supd -h                           Show help  	EOF  	exit @@ -17,16 +17,22 @@ fi  for dir in $dirs  do -	printf '%s:' "$dir" | >&2 sed "s#$HOME#~#"  	(  	cd "$dir" || return +    # is git dir +    if ! git rev-parse > /dev/null 2>&1 +    then +        printf 'x\n' +        exit +    fi +	printf '%s: ' "$dir" | >&2 sed "s#$HOME#~#"      git "${1:-fetch}" > /dev/null 2>&1 && -        printf ' o' || -        printf ' x' +        printf 'o' || +        printf 'x'      # Show remote state -    printf '%s %s\n' "$(git status --short 2> /dev/null | -        awk 'NR==1 {print $1}')" "$(git branch -v 2>/dev/null | -        awk -F '[][]' '/^\*/ {print $2}')" | -        sed 's/ahead/↑ /;s/behind/↓ /;s/[^↓↑]*/ /g' +    printf ' %s%s\n' "$(git status --short 2> /dev/null | +        awk 'NR==1 {print "(" $1 ")"}')" "$(git branch -v 2>/dev/null | +        awk -F '[][]' '/^\*/ {print $2}' | +        sed 's/ahead/↑ /;s/behind/↓ /;s/[^↓↑]*//g')"  	)  done diff --git a/bin/guiscripts/clipo b/bin/guiscripts/clipo new file mode 100755 index 0000000..39994f9 --- /dev/null +++ b/bin/guiscripts/clipo @@ -0,0 +1,6 @@ +#!/bin/sh +[ "$1" = "-p" ] && arg='primary' +if [ "$WAYLAND_DISPLAY" ] +then wl-paste -n ${1} +else xclip -o -selection "${arg:-clipboard}" -r +fi diff --git a/bin/guiscripts/clipp b/bin/guiscripts/clipp new file mode 100755 index 0000000..c9e4f51 --- /dev/null +++ b/bin/guiscripts/clipp @@ -0,0 +1,6 @@ +#!/bin/sh +[ "$1" = "-p" ] && arg='primary' +if [ "$WAYLAND_DISPLAY" ] +then wl-copy -n $1 +else xclip -selection "${arg:-clipboard}" -r +fi diff --git a/bin/guiscripts/clipswap b/bin/guiscripts/clipswap new file mode 100755 index 0000000..1cae135 --- /dev/null +++ b/bin/guiscripts/clipswap @@ -0,0 +1,4 @@ +#!/bin/sh +paste="$(clipo)" +clipo -p | clipp +printf '%s' "$paste" | clipp -p diff --git a/bin/guiscripts/cliptype b/bin/guiscripts/cliptype new file mode 100755 index 0000000..e6ac093 --- /dev/null +++ b/bin/guiscripts/cliptype @@ -0,0 +1,2 @@ +#!/bin/sh +clipo | ydotool type -f - diff --git a/bin/guiscripts/dmfm b/bin/guiscripts/dmfm index d1dd8b8..9485469 100755 --- a/bin/guiscripts/dmfm +++ b/bin/guiscripts/dmfm @@ -2,9 +2,10 @@  while true  do +    dir="$(printf '%s' "$PWD" | sed "s#^$HOME#\~#;s#\([^/]\)[^/]*/#\1/#g")"  	file=$(find . -maxdepth 1 -mindepth 1 -not -name '.*' -printf '%y\t%f\n' |  		sort -k 1 -k 2 | cut -f 2- | -		commander -xcd -p "$PWD>") +		commander -xc -p "$dir")  	[ "$file" ] || break  	[ ! -e "$file" ] && continue diff --git a/bin/menuscripts/memoji b/bin/menuscripts/memoji index 9c45950..45a74f1 100755 --- a/bin/menuscripts/memoji +++ b/bin/menuscripts/memoji @@ -5,30 +5,19 @@  # If this file includes emojis below "__DATA__" it is generated.  # This file was generated: 2022-04-21 12:38:03+00:00 -if [ "$WAYLAND_DISPLAY" ] -then -	alias copycmd="wl-copy" -else -	alias copycmd="xclip -sel c" -fi  set -e  case "$1" in -	"list") -		data=$(sed '0,/^__DATA__$/d' "$0") -		printf "%s" "$data" -		;; +	"list") printf "%s" "$(sed '0,/^__DATA__$/d' "$0")" ;;  	"copy")  		input=$(tee | cut -f 1 -d ' ')  		if [ "$input" ]  		then  			notify-send "dmemoji" "$input <b>copied!</b>" -			printf "%s" "$input" | copycmd +			printf "%s" "$input" | clipp  		fi  		;; -	"") -		sh "$0" list | commander -p "Emoji:" -l -x | sh "$0" copy -		;; +	"") sh "$0" list | commander -p "Emoji:" -x -w 44 -y 10 -c | sh "$0" copy ;;  esac  exit diff --git a/config/X/x11/xinitrc b/config/X/x11/xinitrc index 4eb34ed..beb33f2 100755 --- a/config/X/x11/xinitrc +++ b/config/X/x11/xinitrc @@ -27,6 +27,7 @@ xmodmap -e "keycode 135 = Super_L"  xautolock -time 5 -locker slock &  gammastep -m randr &  slstatus & +emacs --daemon &  eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --eval --quiet --agents gpg,ssh)"  unclutter --timeout 3 --jitter 50 -b  exec startdwm diff --git a/config/common/mpv/input.conf b/config/common/mpv/input.conf index 295dd4d..dd2674f 100644 --- a/config/common/mpv/input.conf +++ b/config/common/mpv/input.conf @@ -204,3 +204,6 @@ Alt+c cycle sub-visibility              # Toggle subtitles  v cycle audio                           # switch audio track  V cycle audio                           # switch audio track  ctrl+l cycle-values loop-file "inf" "no"    # toggle infinite looping + +# Keep open after exit +P cycle keep-open up diff --git a/config/essentials/nvim/after/plugin/colorizer.lua b/config/essentials/nvim/after/plugin/colorizer.lua.disabled index 6ca374f..6ca374f 100644 --- a/config/essentials/nvim/after/plugin/colorizer.lua +++ b/config/essentials/nvim/after/plugin/colorizer.lua.disabled diff --git a/config/essentials/nvim/after/plugin/luasnip.lua b/config/essentials/nvim/after/plugin/luasnip.lua index 319a68c..9119264 100644 --- a/config/essentials/nvim/after/plugin/luasnip.lua +++ b/config/essentials/nvim/after/plugin/luasnip.lua @@ -29,33 +29,33 @@ vim.keymap.set({"i", "s"}, "<C-k>", "<Plug>luasnip-expand-or-jump", { noremap =  vim.keymap.set({"i", "s"}, "<C-j>", "<Plug>luasnip-jump-prev", { noremap = true })  vim.keymap.set({"i", "s"}, "<C-l>", "<Plug>luasnip-next-choice", { noremap = true })  vim.keymap.set("n", "<leader><leader>s", function() -	ls.cleanup() -	vim.cmd("source ~/.config/nvim/after/plugin/luasnip.lua") -	print("snippets reloaded.") +    ls.cleanup() +    vim.cmd("source ~/.config/nvim/after/plugin/luasnip.lua") +    print("snippets reloaded.")  end, { noremap = true })  ls.add_snippets("lua", { -	-- print -	s("pt", fmt("print({}){}", { i(1, "\"Hello World!\"") , i(0) })), -	-- local function -	parse("lf", "local $1 = function($2)\n\t$3\nend$0", {}), -		-- require -		s("lrq", fmt("local {} = require('{}')", { i(1), rep(1) })), -		parse("rq", "require('$1')$0", {}), -		parse("rqs", "require('$1').setup {\n\t$2\n}$0", {}), -		parse("use", "use('$1')$0", {}), -		-- function -		s("fn", fmt( -		[[ -		function {}({}) -		{} -	end{} -	]], -	{ i(1), i(2), i(3), i(0) })), -	parse("sn", "s(\"$1\", fmt(\n[[\n$2\n]],\n{ $3 })),$0", {}), +    -- print +    s("pt", fmt("print({}){}", { i(1, "\"Hello World!\"") , i(0) })), +    -- local function +    parse("lf", "local $1 = function($2)\n\t$3\nend$0", {}), +        -- require +        s("lrq", fmt("local {} = require('{}')", { i(1), rep(1) })), +        parse("rq", "require('$1')$0", {}), +        parse("rqs", "require('$1').setup {\n\t$2\n}$0", {}), +        parse("use", "use('$1')$0", {}), +        -- function +        parse("fn", +        [[ +        function $1($2) +    end$0 +    ]], {}), +    parse("sn", "s(\"$1\", fmt(\n[[\n$2\n]],\n{ $3 })),$0", {}),  }) -ls.add_snippets("html", { +local languages = {'php', 'html'} +for language = 1,#languages do +ls.add_snippets(languages[language], {  	s("<!DOCTYPE>", fmt(  	[[  	<!DOCTYPE html> @@ -64,166 +64,166 @@ ls.add_snippets("html", {  			<meta charset="UTF-8">  			<meta name="viewport" content="width-device-width, initial-scale=1.0">  			<meta http-equiv="X-UA-Compatible" content="ie=edge"> -			<title>{}</title>{} +			<title>{}</title>  		</head>  		<body>  			<h1>{}</h1>{}  		</body>  	</html>  	]], -	{i(1, "title"), i(2), i(3, "Header"), i(0)})), -	s("sty", fmt( +	{i(1, "title"), rep(1), i(0)})), +	parse("sty",  	[[ -	<link rel="stylesheet" type="text/css" href="{}">{} -	]], -	{ i(1), i(0) })), +	<link rel="stylesheet" type="text/css" href="$1">$0 +	]], {}),  }) +end  ls.add_snippets("java", { -	-- function -	s("fn", fmt( -	[[ -	{}{} {}({}) -	{{ -		{} -	}} -	]], -	{ -		c(1, {t "public ", t "private ", t ""}), -		i(2, "type"), -		i(3, "f"), -		i(4), i(0) -	})), -	-- setter function -	s("psv", fmt( -	[[ -	public class Main -	{{ -		public static void main (String[] args) -		{{ -			{} -		}} -	}} -	]], -	{ i(0) })), -	-- constructor -	s("class", fmt( -	[[ -	{}class {} -	{{ -		{} -	}}{} -	]], -	{ c(1, {t "public ", t "private ", t ""}), i(2), i(3), i(0)})), -	-- StringBuilder -	s("sb", fmt( -	[[ -	public void print() -	{{ -		StringBuilder sb = new StringBuilder(30); -		sb.append({}); -		sb.append(", ").append({});{} -		System.out.print(sb.toString()); -	}}{} -	]], -	{ i(1), i(2), i(3), i(0)})), -	-- print -	parse("pt", "System.out.println($1);$0", {}), -	parse("pti", "System.out.println(\"$1: \" + $1);$0", {}), -	-- quickies  -	s("pr", t "private "), -	s("ob", fmt( -	[[ -	{} {} = new {}({}); -	{} -	]], -	{ i(1), i(2), rep(1), i(3), i(0) })), -	parse("abs", "Math.abs($1);$0", {}), +    -- function +    s("fn", fmt( +    [[ +    {}{} {}({}) +    {{ +        {} +    }} +    ]], +    { +        c(1, {t "public ", t "private ", t ""}), +        i(2, "type"), +        i(3, "f"), +        i(4), i(0) +    })), +    -- setter function +    s("psv", fmt( +    [[ +    public class Main +    {{ +        public static void main (String[] args) +        {{ +            {} +        }} +    }} +    ]], +    { i(0) })), +    -- constructor +    s("class", fmt( +    [[ +    {}class {} +    {{ +        {} +    }}{} +    ]], +    { c(1, {t "public ", t "private ", t ""}), i(2), i(3), i(0)})), +    -- StringBuilder +    s("sb", fmt( +    [[ +    public void print() +    {{ +        StringBuilder sb = new StringBuilder(30); +        sb.append({}); +        sb.append(", ").append({});{} +        System.out.print(sb.toString()); +    }}{} +    ]], +    { i(1), i(2), i(3), i(0)})), +    -- print +    parse("pt", "System.out.println($1);$0", {}), +    parse("pti", "System.out.println(\"$1: \" + $1);$0", {}), +    -- quickies  +    s("pr", t "private "), +    s("ob", fmt( +    [[ +    {} {} = new {}({}); +    {} +    ]], +    { i(1), i(2), rep(1), i(3), i(0) })), +    parse("abs", "Math.abs($1);$0", {}),  })  ls.add_snippets("sh", { -	s("TD", t "THISDIR=\"$(dirname \"$(readlink -f \"$0\")\")\""), -	parse("pf", ">&2 printf '$1\\n'$0", {}), -	parse("fn", "$1 ()\n{\n\t$2\n}$0", {}), -	-- Functions -	parse("rchar", -	[[ -	read_char () -	{ -		old_stty_cfg=$(stty -g) -		stty raw -echo  -		dd ibs=1 count=1 2> /dev/null -		stty \$old_stty_cfg -	} -	]], {}), -	parse("fdie", -	[[ -	die () { >&2 printf '%s\n' "\$@"; exit 1; } -	]], {}), -	parse("flogn", -	[[ -	logn () { >&2 printf '%s\n' "\$@"; } -	]], {}), -	parse("flog", -	[[ -	log () { >&2 printf '%s' "\$@"; } -	]], {}), -	s("inp", fmt( -	[[ -	test -z "${{{}:=$1}}" &&  -		{}="$(cat /dev/stdin)" -	echo "{}: ${}" 1>&2{} -	]], -	{ i(1), rep(1), rep(1), rep(1), i(0) })), +    s("TD", t "THISDIR=\"$(dirname \"$(readlink -f \"$0\")\")\""), +    parse("pf", ">&2 printf '$1\\n'$0", {}), +    parse("fn", "$1 ()\n{\n\t$2\n}$0", {}), +    -- Functions +    parse("rchar", +    [[ +    read_char () +    { +        old_stty_cfg=$(stty -g) +        stty raw -echo  +        dd ibs=1 count=1 2> /dev/null +        stty \$old_stty_cfg +    } +    ]], {}), +    parse("fdie", +    [[ +    die () { >&2 printf '%s\n' "\$@"; exit 1; } +    ]], {}), +    parse("flogn", +    [[ +    logn () { >&2 printf '%s\n' "\$@"; } +    ]], {}), +    parse("flog", +    [[ +    log () { >&2 printf '%s' "\$@"; } +    ]], {}), +    s("inp", fmt( +    [[ +    test -z "${{{}:=$1}}" &&  +        {}="$(cat /dev/stdin)" +    echo "{}: ${}" 1>&2{} +    ]], +    { i(1), rep(1), rep(1), rep(1), i(0) })),  })  ls.add_snippets("javascript", { -	-- print -	s("pt", fmt("console.log({});{}", { i(1, "\"Hello World!\"") , i(0) })), -	s("rq", fmt("const {} = require('{}');", { i(1), rep(1) })), -	s("dbconn", fmt( -	[[ -		let conn = null; -		try {{ -			conn = await dbConnect();{} -			conn.end() -		}} catch(err) {{ -			console.error('Error:', err); -		}} -	]], -	{ i(0) })), -	s("apr", fmt( -	[[ -	app.get('{}', (req, res) => {{ -		{} -	}});{} -	]], -	{ i(1), i(2, "res.send(\"Hello world!\")"), i(0) })), -	s("cerr", t "console.error('Error:', err);"), -	s("gel", fmt( -	[[ -	let {} = document.getElementById('{}');{} -	]], -	{ i(1), rep(1), i(0) })), +    -- print +    s("pt", fmt("console.log({});{}", { i(1, "\"Hello World!\"") , i(0) })), +    s("rq", fmt("const {} = require('{}');", { i(1), rep(1) })), +    s("dbconn", fmt( +    [[ +        let conn = null; +        try {{ +            conn = await dbConnect();{} +            conn.end() +        }} catch(err) {{ +            console.error('Error:', err); +        }} +    ]], +    { i(0) })), +    s("apr", fmt( +    [[ +    app.get('{}', (req, res) => {{ +        {} +    }});{} +    ]], +    { i(1), i(2, "res.send(\"Hello world!\")"), i(0) })), +    s("cerr", t "console.error('Error:', err);"), +    s("gel", fmt( +    [[ +    let {} = document.getElementById('{}');{} +    ]], +    { i(1), rep(1), i(0) })),  })  ls.add_snippets("cs", { -	parse("cw", "Console.WriteLine($1);$0"), +    parse("cw", "Console.WriteLine($1);$0"),  })  ls.add_snippets("telekasten", { -	--link -	parse("ln", "[[$0]]", {}), -	s("cln", fmt( -	[[ -	[{}]({}){} -	]], -	{ -		i(1), -		f(function () -			return vim.fn.getreg('+') -		end), -		i(0) -	} -	)), +    --link +    parse("ln", "[[$0]]", {}), +    s("cln", fmt( +    [[ +    [{}]({}){} +    ]], +    { +        i(1), +        f(function () +            return vim.fn.getreg('+') +        end), +        i(0) +    } +    )),  }) diff --git a/config/essentials/nvim/after/plugin/plantuml.lua b/config/essentials/nvim/after/plugin/plantuml.lua new file mode 100644 index 0000000..da14862 --- /dev/null +++ b/config/essentials/nvim/after/plugin/plantuml.lua @@ -0,0 +1,10 @@ +require('plantuml').setup +{ +  renderer = { +    type = 'text', +    options = { +      split_cmd = 'split', -- Allowed values: `split`, `vsplit`. +    } +  }, +  render_on_write = true, -- Set to false to disable auto-rendering. +} diff --git a/config/essentials/nvim/after/plugin/telescope.lua b/config/essentials/nvim/after/plugin/telescope.lua index 06c5a03..7a2ef34 100644 --- a/config/essentials/nvim/after/plugin/telescope.lua +++ b/config/essentials/nvim/after/plugin/telescope.lua @@ -1,4 +1,3 @@ -require('telescope').load_extension('fzf')  require('telescope').load_extension('media_files')  require('telescope').setup({ diff --git a/config/essentials/nvim/after/plugin/treesitter.lua b/config/essentials/nvim/after/plugin/treesitter.lua deleted file mode 100644 index e18368e..0000000 --- a/config/essentials/nvim/after/plugin/treesitter.lua +++ /dev/null @@ -1,11 +0,0 @@ -require'nvim-treesitter.configs'.setup { -	ensure_installed = { "c", "lua", "vim", "diff"}, - -	sync_install = false, -	auto_install = true, - -	highlight = { -		enable = true, -		additional_vim_regex_highlighting = false, -	} -} diff --git a/config/essentials/nvim/lua/user/cmp/html.lua b/config/essentials/nvim/lua/user/cmp/html.lua index 69ed29d..d3c99df 100644 --- a/config/essentials/nvim/lua/user/cmp/html.lua +++ b/config/essentials/nvim/lua/user/cmp/html.lua @@ -2,6 +2,7 @@  local capabilities = vim.lsp.protocol.make_client_capabilities()  capabilities.textDocument.completion.completionItem.snippetSupport = true -require'lspconfig'.html.setup { -  capabilities = capabilities, +require 'lspconfig'.html.setup { +	capabilities = capabilities, +	filetypes = { "html", "php" },  } diff --git a/config/essentials/nvim/lua/user/init.lua b/config/essentials/nvim/lua/user/init.lua index 2f29b87..972cb67 100644 --- a/config/essentials/nvim/lua/user/init.lua +++ b/config/essentials/nvim/lua/user/init.lua @@ -1,5 +1,6 @@  require("user.packer")  require("user.remap") +require("user.treesitter")  require("user.set")  require("user.cmp")  require("user.zk") diff --git a/config/essentials/nvim/lua/user/lazy.lua b/config/essentials/nvim/lua/user/lazy.lua new file mode 100644 index 0000000..5c3148c --- /dev/null +++ b/config/essentials/nvim/lua/user/lazy.lua @@ -0,0 +1,98 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then +    vim.fn.system({ +        "git", +        "clone", +        "--filter=blob:none", +        "https://github.com/folke/lazy.nvim.git", +        "--branch=stable", -- latest stable release +        lazypath, +    }) +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup({ +    -- Example using a list of specs with the default options +    "folke/which-key.nvim", + +    -- telescope +    { +        'nvim-telescope/telescope.nvim', +        tag = '0.1.4', +        dependencies = { 'nvim-lua/plenary.nvim' } +    }, +    "nvim-telescope/telescope-ui-select.nvim", +    "nvim-telescope/telescope-media-files.nvim", + +    "nvim-telescope/telescope-symbols.nvim", +    "theprimeagen/harpoon", + +    -- colors +    "shaunsingh/nord.nvim", +    { 'uZer/pywal16.nvim',                        name = 'pywal16' }, +    "norcalli/nvim-colorizer.lua", + +    { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' }, +    "nvim-treesitter/playground", + +    -- syntax +    "sheerun/vim-polyglot", +    "theRealCarneiro/hyprland-vim-syntax", + +    "mbbill/undotree", + +    "tpope/vim-capslock", +    "tpope/vim-commentary", +    -- "tpope/vim-endwise", +    "tpope/vim-fugitive", +    "lewis6991/gitsigns.nvim", +    "tpope/vim-repeat", +    "tpope/vim-surround", +    "tpope/vim-vinegar", +    "m4xshen/autoclose.nvim", + +    "christoomey/vim-tmux-navigator", + +    -- utils +    "godlygeek/tabular", +    "renerocksai/calendar-vim", +    "ojroques/vim-oscyank", +    "potamides/pantran.nvim", +    "alx741/vinfo", + +    -- "github/copilot.vim", +    -- +    { +        'https://gitlab.com/itaranto/plantuml.nvim', +        config = function() require('plantuml').setup() end +    }, + +    -- objects +    "michaeljsmith/vim-indent-object", + +    -- completion +    "neovim/nvim-lspconfig", +    "hrsh7th/nvim-cmp", +    "hrsh7th/cmp-nvim-lua", +    "hrsh7th/cmp-nvim-lsp", +    "hrsh7th/cmp-buffer", +    "hrsh7th/cmp-path", +    "hrsh7th/cmp-cmdline", +    "hrsh7th/cmp-nvim-lsp-signature-help", +    "alvan/vim-closetag", + +    -- debugging +    "mfussenegger/nvim-dap", +    { "rcarriga/nvim-dap-ui",            dependencies = { "mfussenegger/nvim-dap" } }, + +    -- java +    "mfussenegger/nvim-jdtls", + +    -- snippets +    "L3MON4D3/LuaSnip", +    "saadparwaiz1/cmp_luasnip", + +    -- notes +    "renerocksai/telekasten.nvim", + +}) diff --git a/config/essentials/nvim/lua/user/packer.lua b/config/essentials/nvim/lua/user/packer.lua index 36f9ec0..edb763d 100644 --- a/config/essentials/nvim/lua/user/packer.lua +++ b/config/essentials/nvim/lua/user/packer.lua @@ -4,11 +4,11 @@ return require('packer').startup(function(use)  	-- files  	use {  		'nvim-telescope/telescope.nvim', tag = '0.1.2', -		requires = { {'nvim-lua/plenary.nvim'} } +		requires = { { 'nvim-lua/plenary.nvim' } }  	} -	use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' } -	use {'nvim-telescope/telescope-ui-select.nvim' } -	use {'nvim-telescope/telescope-media-files.nvim'} +	use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' } +	use { 'nvim-telescope/telescope-ui-select.nvim' } +	use { 'nvim-telescope/telescope-media-files.nvim' }  	use('nvim-telescope/telescope-symbols.nvim')  	use('theprimeagen/harpoon') @@ -18,20 +18,11 @@ return require('packer').startup(function(use)  	use { 'uZer/pywal16.nvim', as = 'pywal16' }  	use('norcalli/nvim-colorizer.lua') -	use('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'}) +	use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })  	use('nvim-treesitter/playground')  	use('theRealCarneiro/hyprland-vim-syntax')  	use('mbbill/undotree') -	use { -		"nvim-neo-tree/neo-tree.nvim", -		branch = "v3.x", -		requires = { -			"nvim-lua/plenary.nvim", -			"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended -			"MunifTanjim/nui.nvim", -		} -	}  	use('tpope/vim-capslock')  	use('tpope/vim-commentary') @@ -48,10 +39,17 @@ return require('packer').startup(function(use)  	-- utils  	use('godlygeek/tabular')  	use('renerocksai/calendar-vim') -	use('ojroques/vim-oscyank', {branch = "main"}) +	use('ojroques/vim-oscyank', { branch = "main" })  	use("potamides/pantran.nvim")  	use('alx741/vinfo') +	-- use('sheerun/vim-polyglot') TODO: fix error conflicting with telekasten  	-- use('github/copilot.vim') +	-- +	use { +		'https://gitlab.com/itaranto/plantuml.nvim', +		tag = '*', +		config = function() require('plantuml').setup() end +	}  	-- objects  	use('michaeljsmith/vim-indent-object') @@ -69,7 +67,7 @@ return require('packer').startup(function(use)  	-- debugging  	use('mfussenegger/nvim-dap') -	use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap"} } +	use { "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } }  	-- java  	use('mfussenegger/nvim-jdtls') diff --git a/config/essentials/nvim/lua/user/remap.lua b/config/essentials/nvim/lua/user/remap.lua index fadca21..0c3d9a6 100644 --- a/config/essentials/nvim/lua/user/remap.lua +++ b/config/essentials/nvim/lua/user/remap.lua @@ -54,9 +54,14 @@ end, { noremap = true })  -- utils  vim.keymap.set("i", "<LocalLeader>r", "<cmd>r!echo -n $RANDOM<cr><esc>kJA", { noremap = true }) + +-- FORMATTING  -- ordered list  vim.keymap.set("n", "<LocalLeader>n", "<C-v>I0. <esc>gvg<C-a>", { noremap = true })  vim.keymap.set("v", "<Leader>u", "<cmd>'<,'>s/^[0-9]\\+\\. //<cr><esc>", { noremap = true }) +-- table +vim.keymap.set("v", "<LocalLeader>t", "!column -t -s '|' -o '|'<cr>", { noremap = true }) +  -- scripts  vim.keymap.set("n", "<Leader>x", "<cmd>!chmod +x %<cr>", { noremap = true, silent = true})  -- replace @@ -73,8 +78,8 @@ vim.keymap.set("n", "<LocalLeader>s", function ()  	print("sourced.")  end, { noremap = true }) --- Packer -vim.keymap.set("n", "<Leader>P", "<cmd>PackerSync<cr>", { noremap = true }) +-- Lazy +vim.keymap.set("n", "<Leader>P", "<cmd>Lazy<cr>", { noremap = true })  -- spelling  vim.keymap.set("n", "<C-s>s", "<cmd>setlocal spell!<cr>", { noremap = true }) diff --git a/config/essentials/nvim/lua/user/treesitter.lua b/config/essentials/nvim/lua/user/treesitter.lua new file mode 100644 index 0000000..2355215 --- /dev/null +++ b/config/essentials/nvim/lua/user/treesitter.lua @@ -0,0 +1,17 @@ +require'nvim-treesitter.configs'.setup { +  -- A list of parser names, or "all" (the five listed parsers should always be installed) +  ensure_installed = { "c", "lua", "vim", "vimdoc", "query" }, + +  -- Install parsers synchronously (only applied to `ensure_installed`) +  sync_install = false, + +  -- Automatically install missing parsers when entering buffer +  -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally +  auto_install = true, + +  indent = { enable = on }, + +  highlight = { enable = true, }, + +    additional_vim_regex_highlighting = false, +} diff --git a/config/essentials/nvim/lua/user/zk.lua b/config/essentials/nvim/lua/user/zk.lua index 98476ca..3641025 100644 --- a/config/essentials/nvim/lua/user/zk.lua +++ b/config/essentials/nvim/lua/user/zk.lua @@ -41,6 +41,11 @@ require("telekasten").setup({  	media_previewer = "telescope-media-files",  	follow_url_fallback = nil,  	vaults = { +		Ideas = { +			home = home .. "/" .. "Ideas", +			template_new_note = home .. "/" .. "templates/new_note.md", +			new_note_filename = "title", +		},  		Driving = {  			home = home .. "/" .. "Driving",  			template_new_note = home .. "/" .. "templates/new_note.md", diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 76ff87f..c590d54 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -15,13 +15,56 @@ autoload -U select-word-style  autoload -z edit-command-line  zle -N edit-command-line  zstyle ':compinstall' filename '/home/aluc/.zshrc' + +### Completion +# cache +zstyle ':completion:*' use-cache on +zstyle ':completion:*' cache-path "$ZDOTDIR/zcompcache" + +# completers +zstyle ':completion:*' completer _extensions _complete + +# format +zstyle ':completion:*:*:*:*:descriptions' format '%F{blue}-- %D%d --%f' +zstyle ':completion:*:*:*:*:messages' format '%F{purple}-- %d --%f' +zstyle ':completion:*:*:*:*:warnings' format '%F{red}-- no matches found --%f' +zstyle ':completion:*:default' list-prompt '%S%M matches%s' +# show a 'ls -a' like outptut when listing files +zstyle ':completion:*:*:*:*:default' list-colors ${(s.:.)LS_COLORS} + +# Group completions by categories +zstyle ':completion:*' group-name '' +zstyle ':completion:*:*:-command-:*:*' group-order aliases builtins functions commands + +zstyle ':completion:*' squeeze-slashes true + +# Prefer completing for an option (think cd -) +zstyle ':completion:*' complete-options true + +# keep prefix when completing +zstyle ':completion:*' keep-prefix true + +# ui  zstyle ':completion:*' menu select -autoload -Uz compinit +# Move around using h j k l in completion menu +zmodload zsh/complist +bindkey -M menuselect 'h' vi-backward-char +bindkey -M menuselect 'k' vi-up-line-or-history +bindkey -M menuselect 'j' vi-down-line-or-history +bindkey -M menuselect 'l' vi-forward-char +bindkey -M menuselect '^xg' clear-screen +# interactive mode +bindkey -M menuselect '^xi' vi-insert +bindkey -M menuselect '^xh' accept-and-hold                # Hold +bindkey -M menuselect '^xn' accept-and-infer-next-history  # Next +bindkey -M menuselect '^xu' undo                           # Undo + +autoload -Uz compinit; compinit +  autoload -Uz surround  zle -N delete-surround surround  zle -N add-surround surround  zle -N change-surround surround -compinit  # Source files  . $ZDOTDIR/functions.zsh @@ -110,7 +153,7 @@ command_not_found_handler () {  }  # prompt -PS1=' %B%(#.%F{1}.%F{13})[%n%b%f@%B%F{6}%m]%b%f %3~ ' +PS1=' %B%(#.%F{1}.%F{13})%n%b%f@%B%F{6}%m%b%f %3~ '  RPROMPT='%F{blue}$(parse_git_remote)%f%F{red}$(parse_git_status)%f%F{green}$(parse_git_branch)%f%(?.. %?)'  setopt prompt_subst diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index e9c7e2f..3d23cf4 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -17,18 +17,13 @@ then  	alias calc='bc <<<' -	if [ "$WAYLAND_DISPLAY" ] -	then -		alias -g clipp='wl-copy -n' -		alias -g clipo='wl-paste -n' -	else +	if [ -z "$WAYLAND_DISPLAY" ] +    then  		if which devour > /dev/null 2>&1    		then  			alias mpv='devour mpv'  			alias zathura='devour zathura'  		fi -		alias -g clipp='xclip -selection clipboard -r' -		alias -g clipo='xclip -o -selection clipboard -r'  	fi  	alias clipic='clipo > /tmp/pic.png' @@ -174,9 +169,7 @@ alias ch='chown ${USER}:${USER} -R'  alias kll='killall'  alias pi='ping 9.9.9.9 -c4'  alias sba='source env/bin/activate || source bin/activate' -alias smc='systemctl' -alias dsmc='doas systemctl' -alias smcu='smc --user' +  alias zsr='source ${ZDOTDIR:-~}/.zshrc && rehash'  alias rh='rehash'  alias wf='doas wipefs -a' @@ -187,9 +180,40 @@ alias gdate='date +%y_%m_%d-%T'  alias tpid='tail -f /dev/null --pid'  alias pwdcp='pwd | clipp'  alias gw="grep -ri" -alias srcsupd='echo ~/src/{installdrier,dotfiles,password-store} | supd' -alias nextdeadline='sed -n "/$(grep '\''^#'\'' ~/docs/filios/deadlines | sort -t '\''/'\'' -k 3 -k 2 -k 1 -n | head -n 1 | sed '\''s@/@.@g'\'')/,/^#\|^$/p" ~/docs/filios/deadlines | head -n -1' +alias srcsupd='echo ~/src/{installdrier,dotfiles,password-store} ~/.config/emacs | supd' +# systemctl aliases +alias smc='systemctl' +alias smcs='systemctl status' +alias smcst='systemctl start' +alias smcS='systemctl stop' +alias smcr='systemctl restart' +alias smcrl='systemctl reload' +alias smcd='systemctl daemon-reload' +alias smce='systemctl edit' +alias smcen='systemctl enable' +#user +alias smcu='systemctl --user' +alias smcus='systemctl --user status' +alias smcust='systemctl --user start' +alias smcuS='systemctl --user stop' +alias smcur='systemctl --user restart' +alias smcurl='systemctl --user reload' +alias smcud='systemctl --user daemon-reload' +alias smcue='systemctl --user edit' +alias smcuen='systemctl --user enable' +#doas +alias dsmc='doas systemctl' +alias dsmcs='doas systemctl status' +alias dsmcst='doas systemctl start' +alias dsmcS='doas systemctl stop' +alias dsmcr='doas systemctl restart' +alias dsmcrl='doas systemctl reload' +alias dsmcd='doas systemctl daemon-reload' +alias dsmce='doas systemctl edit' +alias dsmcen='doas systemctl enable' + +# virtualbox aliases  alias vbm='vboxmanage'  alias vbls='vbm list vms'  alias vblsr='vbm list runningvms' @@ -244,21 +268,27 @@ alias czo='cd ~/zot/'  alias cdpw='cd ${PASSWORD_STORE_DIR:-~/.password-store}'  alias cdng='cd /etc/nginx'  alias cdrs='cd /srv/' +alias cdv='cd ~/vids'  alias god='cd "$(find . -mindepth 1 -maxdepth 1 -type d | fzf)"' +alias gov='go ~/vids d'  # fzf aliases  alias ppj='cd ~/proj/personal/"$(find ~/proj/personal -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | fzf)"'  alias ppjs='cd ~/proj/personal/scripts/"$(find ~/proj/personal/scripts -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | fzf)"'  alias scr='edit_in_dir ~/proj/personal/scripts/'  alias fil='edit_in_dir ~/docs/filios/' -alias cfg='edit_in_dir ~/src/dotfiles'  alias fzps='ps aux | tail +2 | fzf | tee /dev/stderr | awk '\''{print $2}'\'' | clipp'  alias asf='alias | fzf'  alias fzh="tac $HISTFILE | fzf | tee /dev/stderr | clipp"  alias ffwin='hyprctl clients -j | jq '\''.[].pid'\'' | fzf --preview "hyprctl clients -j | jq '\''.[] | select(.pid == {}) | {class, title, workspace, xwayland}'\''"'  alias pff='find ${PASSWORD_STORE_DIR:=~/src/password-store/} -name "*.gpg" | sed -e "s@$PASSWORD_STORE_DIR/@@" -e '\''s/\.gpg$//'\'' | fzf | xargs pass show -c'  alias fzps='fzf --print0 | xargs -0I{}' -alias ytdl='yt-dlp --restrict-filenames --embed-chapters -f "b" -S "res:1080" -P "$HOME/vids/youtube/" -o "%(channel)s - %(title)s.%(ext)s"' +alias ytdl='yt-dlp --restrict-filenames --embed-chapters -f "b" -S "res:1080" -P "$HOME/vids/youtube/" -o "%(channel)s/%(title)s.%(ext)s"' + +# emacs aliases +alias emacsd='emacs --daemon' +alias emacsdbg='emacs --debug-init' +alias e='emacsclient -c -a "emacs"'  # docker aliases  alias dcb='docker build' @@ -279,6 +309,7 @@ alias dbsmu='rsync -aPz db:/media/basilisk/music/ /media/kilimanjaro/music'  # oh-my-zsh git aliases  alias config='GIT_WORK_TREE=~/src/dotfiles/ GIT_DIR=~/src/dotfiles/.git' +alias cfg='$EDITOR ~/src/dotfiles/"$(config git ls-files | fzf || exit)"'  alias gmod='git status --short | sed '\''/^\s*M/!d;s/^\s*M\s*//'\'' | fzf | xargs $EDITOR'  alias g='git'  alias ga='git add' @@ -318,6 +349,7 @@ alias gcasm='git commit --all --signoff --message'  alias gcb='git checkout -b'  alias gcf='git config --list'  alias gcl='git clone' +alias gclc='git clone "$(clipo)"'  alias gclr='git clone --recurse-submodules'  alias gc1='git clone --depth 1'  alias gclean='git clean --interactive -d' diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index 9783794..8bf6c43 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -242,10 +242,17 @@ pacsize()  mime-default ()  { -	logn "Setting '$1' as default for its mimetypes" -	grep "MimeType=" /usr/share/applications/"$1".desktop | +    local mime +    [ "${mime:=$1}" ] || +        mime="$(find /usr/share/applications/ -iname '*.desktop' -printf '%f\n' | +            sed 's/\.desktop$//' | +            fzf)" + +	logn "Setting '$mime' as default for its mimetypes" +    [ "$mime" ] || exit 1 +	grep "MimeType=" /usr/share/applications/"$mime".desktop |  		cut -d '=' -f 2- | tr ';' '\0' | -		xargs -0I{} xdg-mime default "$1".desktop "{}" +		xargs -0I{} xdg-mime default "$mime".desktop "{}"  	logn "Done."  } @@ -270,13 +277,13 @@ fpass() {  muttmail()  { -	log "email set: " -	ls $HOME/.config/mutt/configs | -		fzf | -		tee /dev/stderr | -		xargs -I {} ln -sf "$HOME/.config/mutt/configs/{}" $HOME/.config/mutt/muttrc -	log 'Press [Enter to login]' -	read && mutt +	local config +	local mail +	config="$HOME/.config/mutt" +	mail="$(find "$config"/configs -type f -printf '%f\n' | fzf)" +	[ "$mail" ] || return 1 +	ln -sf "$config/configs/$mail" "$config"/muttrc +	mutt  }  resize() @@ -292,3 +299,8 @@ edit_in_dir() {  	[ -f "$file" ] || return 1  	$EDITOR "$file"  } + +to_webm() +{ +    ffmpeg -y -i "$1" -vcodec libvpx -cpu-used -12 -deadline realtime "${1%.*}".webm +} diff --git a/config/extra/kitty/kitty.conf b/config/extra/kitty/kitty.conf index 9d9168b..2cf6565 100644 --- a/config/extra/kitty/kitty.conf +++ b/config/extra/kitty/kitty.conf @@ -6,7 +6,7 @@  #: individual font faces and even specify special fonts for particular  #: characters. -font_family      DejaVuSansMono +font_family      monospace  bold_font        auto  italic_font      auto  bold_italic_font auto diff --git a/config/extra/tridactyl/tridactylrc b/config/extra/tridactyl/tridactylrc index d9cab9e..977578b 100644 --- a/config/extra/tridactyl/tridactylrc +++ b/config/extra/tridactyl/tridactylrc @@ -1,5 +1,5 @@  set newtab http://localhost:28669 -set searchengine qwant +set searchengine duckduckgo  " Searchurls  set searchurls.1x https://www.1377x.to/search/%s/1 diff --git a/config/wayland/dwl/startup.sh b/config/wayland/dwl/startup.sh index d743f19..0f482fa 100755 --- a/config/wayland/dwl/startup.sh +++ b/config/wayland/dwl/startup.sh @@ -10,6 +10,7 @@ swaybg -i ~/pics/wallpaper &  wl-paste --watch cliphist store &  swayidle 300 locker &  keyadd id_rsa & +emacs --daemon &  pkill -f "tail -f $HOME/.config/wob/pipe"  WOBCONFIG="$HOME"/.config/wob @@ -20,4 +21,5 @@ then  fi  (tail -f "$WOBCONFIG"/pipe | wob) & -$TERMINAL -e tmux a || $TERMINAL tmux & +# $TERMINAL -e tmux a || $TERMINAL tmux & +emacsclient -c -a 'emacs' & diff --git a/config/wayland/hypr/binds.conf b/config/wayland/hypr/binds.conf index 19c1c8d..251ce69 100644 --- a/config/wayland/hypr/binds.conf +++ b/config/wayland/hypr/binds.conf @@ -11,19 +11,19 @@ bind = $mainMod, F, togglefloating,  bind = $mainMod SHIFT, P, pseudo  bind = $mainMod, S, togglesplit -bind = $mainMod, E, focusmonitor, +1 -bind = $mainMod, W, focusmonitor, -1 +bind = $mainMod, COMMA, focusmonitor, +1 +bind = $mainMod, PERIOD, focusmonitor, -1  binde = $mainMod, H, movefocus, l  binde = $mainMod, J, movefocus, d  binde = $mainMod, K, movefocus, u  binde = $mainMod, L, movefocus, r  binde = $mainMod, SPACE, swapnext -bind = $mainMod SHIFT, E, movewindow, mon:+1 -bind = $mainMod SHIFT, W, movewindow, mon:-1 -bind = $mainMod CTRL, E, movewindow, mon:+1 -bind = $mainMod CTRL, E, focusmonitor, -1 -bind = $mainMod CTRL, W, movewindow, mon:-1 -bind = $mainMod CTRL, W, focusmonitor, +1 +bind = $mainMod SHIFT, PERIOD, movewindow, mon:+1 +bind = $mainMod SHIFT, COMMA, movewindow, mon:-1 +bind = $mainMod CTRL, PERIOD, movewindow, mon:+1 +bind = $mainMod CTRL, PERIOD, focusmonitor, -1 +bind = $mainMod CTRL, COMMA, movewindow, mon:-1 +bind = $mainMod CTRL, COMMA, focusmonitor, +1  binde = $mainMod SHIFT, H, resizeactive, -60 0  binde = $mainMod SHIFT, J, resizeactive, 0 60 @@ -69,12 +69,13 @@ bind = $mainMod, mouse_up, workspace, e-1  bindm = $mainMod, mouse:272, movewindow  bindm = $mainMod, mouse:273, resizewindow +bind = $mainMod, B, exec, $BROWSER +bind = $mainMod, E, exec, emacsclient -c -a 'emacs' +  bind = $mainMod, A, submap, apps  submap = apps  bind = $mainMod, D, exec, discord  bind = , D, exec, discord -bind = $mainMod, B, exec, $BROWSER -bind = , B, exec, $BROWSER  bind = $mainMod, G, exec, gml  bind = , G, exec, gml  source = ./reset-submap.conf diff --git a/config/wayland/mako/config b/config/wayland/mako/config index 2df4b1d..06eed6e 100644 --- a/config/wayland/mako/config +++ b/config/wayland/mako/config @@ -23,3 +23,7 @@ default-timeout=0  [category=mpd]  default-timeout=2000  group-by=category + +[summary=lolaa] +# 45887 = 70% +on-notify=exec paplay --volume=45887 ~/.local/share/sounds/ring1.ogg diff --git a/config/wayland/waybar/configs/hyprland.jsonc b/config/wayland/waybar/configs/hyprland.jsonc index cd24d14..9d60915 100644 --- a/config/wayland/waybar/configs/hyprland.jsonc +++ b/config/wayland/waybar/configs/hyprland.jsonc @@ -23,7 +23,7 @@  		"interval": 10,  	},  	"hyprland/window": { -		"format": "{}", +		"format": " {}",  		"separate-outputs": true,  	},  	"pulseaudio": { diff --git a/config/wayland/waybar/style.css b/config/wayland/waybar/style.css index b5a6cf9..3b7b7f6 120000..100644 --- a/config/wayland/waybar/style.css +++ b/config/wayland/waybar/style.css @@ -1 +1,142 @@ -styles/base16.css
\ No newline at end of file +/* + ******************************************** + *░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░* + *░░█▀█░█░░░█░█░█▀▀░░░█░█░█░░░▀█▀░█▀▄░█▀█░░* + *░░█▀▀░█░░░█░█░▀▀█░░░█░█░█░░░░█░░█▀▄░█▀█░░* + *░░▀░░░▀▀▀░▀▀▀░▀▀▀░░░▀▀▀░▀▀▀░░▀░░▀░▀░▀░▀░░* + *░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░* + ******************************************** + */ +/* https://github.com/jakehamilton/dotfiles */ +/* Amazing I love it :))) */ + +* { +	border: none; +	border-radius: 0; +	font-family: JetBrains Mono; +	font-weight: bold; +	font-size: 14px; +	min-height: 24px; +} + +window#waybar { +	background: transparent; +} + +window#waybar.hidden { +	opacity: 0.2; +} + +window#waybar.termite #window, +window#waybar.Firefox #window, +window#waybar.Navigator #window, +window#waybar.PCSX2 #window { +    color: #2e3440; +	background: #e6e6e6; +} + +#mpd, #battery, +#network, #pulseaudio, #temperature, #cpu, #custom-memory { +	margin-left: 8px; +	padding-left: 16px; +	padding-right: 16px; +} + +#workspaces, #mpd, #battery, +#network, #pulseaudio, #temperature, #cpu, #custom-memory, #workspaces, #clock, #tray { +	margin-top: 4px; +	margin-bottom: 2px; +	transition: none; +	border-radius: 6px; +} + +#battery { +	color: #b48ead; +	background: #4c566a; +} + +#workspaces { +	margin-left: 12px; +	background: #2e3440; +} + +#workspaces button { +	transition: none; +	color: #d8dee9; +	background: transparent; +	font-size: 16px; +} + +#workspaces button.active { +	color: #a3be8c; +    text-shadow: 0px 0px 1px #a3be8c; +} + +#workspaces button:hover { +	transition: none; +	color: #d08770; +} + +#mpd { +	color: #2e3440; +	background: #88c0d0; +} + +#mpd.disconnected, +#mpd.stopped { +	color: #d8dee9; +	background: #2e3440; +} + +#window { +	color: #88c0d0; +} + +#network { +	color: #2e3440; +	background: #5e81ac; +} + +#pulseaudio { +	color: #2e3440; +	background: #b48ead; +} + +#temperature { +	color: #2e3440; +	background: #d08770; +} + +#cpu { +	color: #2e3440; +	background: #ebcb8b; +} + +#custom-memory { +	color: #2e3440; +	background: #a3be8c; +} + +#clock { +	margin-left: 8px; +	margin-right: 12px; +	padding-left: 16px; +	padding-right: 16px; +	color: #d8dee9; +	background: #2e3440; +} + +#tray { +	margin-right: 12px; +	color: #d8dee9; +	background: transparent; +} + +#tray > .needs-attention { +    -gtk-icon-effect: highlight; +    background-color: #bf616a; +} + +#tray > .passive { +    -gtk-icon-effect: dim; +} diff --git a/config/wayland/waybar/styles/base16.css b/config/wayland/waybar/styles/base16.css index c9e3170..639b590 100644 --- a/config/wayland/waybar/styles/base16.css +++ b/config/wayland/waybar/styles/base16.css @@ -17,7 +17,7 @@  	border-radius: 0;  	font-family: monospace;  	font-weight: bold; -	font-size: 14px; +	font-size: 12px;  	min-height: 24px;  } @@ -90,8 +90,6 @@ window#waybar.PCSX2 #window {  #workspaces button.active, #tags button.focused {  	background-color: @color6; -	border-bottom: 6px solid @color4; -  }  #workspaces button:hover, #tags button:hover { diff --git a/config/wayland/waybar/styles/colors/colors.css b/config/wayland/waybar/styles/colors/colors.css index 2a2c2fa..801cf92 120000 --- a/config/wayland/waybar/styles/colors/colors.css +++ b/config/wayland/waybar/styles/colors/colors.css @@ -1 +1 @@ -/home/aluc/.cache/wal/colors-waybar.css
\ No newline at end of file +colors-nord
\ No newline at end of file diff --git a/config/wayland/waybar/styles/nord.css b/config/wayland/waybar/styles/nord.css index efd0e81..3b7b7f6 100644 --- a/config/wayland/waybar/styles/nord.css +++ b/config/wayland/waybar/styles/nord.css @@ -40,7 +40,6 @@ window#waybar.PCSX2 #window {  	margin-left: 8px;  	padding-left: 16px;  	padding-right: 16px; -	border-radius: 26px;  }  #workspaces, #mpd, #battery, @@ -48,6 +47,7 @@ window#waybar.PCSX2 #window {  	margin-top: 4px;  	margin-bottom: 2px;  	transition: none; +	border-radius: 6px;  }  #battery { @@ -57,7 +57,6 @@ window#waybar.PCSX2 #window {  #workspaces {  	margin-left: 12px; -	border-radius: 26px;  	background: #2e3440;  } @@ -69,7 +68,8 @@ window#waybar.PCSX2 #window {  }  #workspaces button.active { -	color: #5e81ac; +	color: #a3be8c; +    text-shadow: 0px 0px 1px #a3be8c;  }  #workspaces button:hover { @@ -122,7 +122,6 @@ window#waybar.PCSX2 #window {  	margin-right: 12px;  	padding-left: 16px;  	padding-right: 16px; -	border-radius: 26px;  	color: #d8dee9;  	background: #2e3440;  }  | 
