Compare commits

...

26 Commits
main ... dev

Author SHA1 Message Date
David JULIEN a5d532394a [sxhkd] fix: tmux session name for irc 1 week ago
David JULIEN b057e1566b [nvim] feat: add env snippet 1 week ago
David JULIEN 562672bbf1 [nvim] feat: improve snippets 1 week ago
David JULIEN 238dae78d7
[system] feat: add LATEX_RESOURCES variable 1 week ago
David JULIEN 0f478a9d4b [nvim] cleanup: remove unused function 1 week ago
David JULIEN 4743d71c8f [nvim] fix: let cmp handle completion 1 week ago
David JULIEN 5450d0c189 [nvim] feat: tex formatoptions 1 week ago
David JULIEN 5b27863d03 [nvim] feat: add lua maps + cmp hierarchy 1 week ago
David JULIEN c6f0d78af6 [ncmpcpp]: don't display startup message 1 week ago
David JULIEN 96f5019a94 [gnupg] fix: env variable setup 1 week ago
David JULIEN b7cb6c1940 [irssi] feat: add irc client 1 week ago
David JULIEN 2cee2b21fc [tmux] feat: introducing tmux 1 week ago
David JULIEN 8b1944ecdd [zsh] feat: add necessary env variables 1 week ago
David JULIEN 46fdc12c29 [scripts] fix: maker cpp project handling 1 week ago
David JULIEN bf676aa089
[nvim] cleanup: move plugin config to packer.lua 1 week ago
David JULIEN 5b87400ae3
[nvim] [WIP] feat: luasnip 1 week ago
David JULIEN 555cb3e04e [nvim] change packersync map 4 weeks ago
David JULIEN 2a5d513a00 [nvim] add c and lua filetype settings 4 weeks ago
David JULIEN 05e1b49a20 [nvim] fix verilog/coq maps 4 weeks ago
David JULIEN a137ededaa [nvim] update lua_lsp config 4 weeks ago
David JULIEN a532830d77 [nvim] new plugin : autopairs 4 weeks ago
David JULIEN 73ac47a773 [npm] introducing npm 4 weeks ago
David JULIEN ee9e0e819d
[nvim] astronomy: add static colors for coq 1 month ago
David JULIEN ce6a7026d7 [scripts] fix: error codes 1 month ago
David JULIEN 01cac0167f [scripts] feat: improve dmenuopen speed 1 month ago
David JULIEN d22ff7fd07 [dunst] fix: criticial urgency timeout 1 month ago
  1. 2
      .config/X11/xinitrc
  2. 1
      .config/X11/xprofile
  3. 1
      .config/aliasrc
  4. 2
      .config/dunst/dunstrc
  5. 2
      .config/gnupg/gpg-agent.conf
  6. 366
      .config/irssi/config.template
  7. 2
      .config/ncmpcpp/config
  8. 4
      .config/npm/npmrc
  9. 9
      .config/nvim/after/ftplugin/c.lua
  10. 9
      .config/nvim/after/ftplugin/lua.lua
  11. 8
      .config/nvim/after/ftplugin/tex.lua
  12. 5
      .config/nvim/after/ftplugin/verilog.lua
  13. 12
      .config/nvim/init.lua
  14. 11
      .config/nvim/lua/lsp/lua.lua
  15. 6
      .config/nvim/lua/maps.lua
  16. 14
      .config/nvim/lua/plugin/cmp.lua
  17. 493
      .config/nvim/lua/plugin/luasnip.lua
  18. 14
      .config/nvim/lua/plugin/packer.lua
  19. 7
      .config/sxhkd/sxhkdrc
  20. 81
      .config/tmux/tmux.conf
  21. 8
      .config/zsh/.zprofile
  22. 1
      .config/zsh/.zshrc
  23. 21
      .local/bin/dmenuopen
  24. 6
      .local/bin/maker
  25. 2
      .local/bin/switch-colors
  26. 9
      .local/bin/tsession
  27. 295
      .local/share/irssi/default.theme
  28. 498
      .local/share/irssi/elf.theme
  29. 85
      .local/share/irssi/scripts/autorun/hilightwin.pl
  30. 60
      .local/share/irssi/scripts/autorun/splitlong.pl
  31. 432
      .local/share/irssi/scripts/autorun/tmux-nicklist-portable.pl
  32. 2
      .local/src/astronomy.nvim

2
.config/X11/xinitrc

@ -28,4 +28,4 @@ else
. "$HOME/.xprofile"
fi
exec dwm
exec /usr/bin/dbus-launch --sh-syntax --exit-with-session dwm

1
.config/X11/xprofile

@ -3,6 +3,7 @@
# This file is sourced when launching a DM from startx/xinit
# session launch
eval $(dbus-launch --sh-syntax --exit-with-session)
xss-lock -- slock &
redshift &

1
.config/aliasrc

@ -21,3 +21,4 @@ alias abcde='abcde -c $XDG_CONFIG_HOME/abcde/config'
alias abook='abook --config $XDG_CONFIG_HOME/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook'
alias pip-upgrade="pip freeze --user | cut -d'=' -f1 | xargs -n1 pip install -U"
alias wget="wget --hsts-file=$XDG_CACHE_HOME/wget-hsts"
alias irssi="irssi --config=$XDG_CONFIG_HOME/irssi/config --home=$XDG_DATA_HOME/irssi"

2
.config/dunst/dunstrc

@ -311,7 +311,7 @@
background = "#131616"
foreground = "#ea6962"
frame_color = "#ea6962"
timeout = 0
timeout = 10
# Icon for notifications with critical urgency, uncomment to enable
#icon = /path/to/icon

2
.config/gnupg/gpg-agent.conf

@ -1,3 +1,5 @@
allow-preset-passphrase
default-cache-ttl 604800
max-cache-ttl 604800
pinentry-program /usr/bin/pinentry

366
.config/irssi/config.template

@ -0,0 +1,366 @@
servers = (
{ address = "irc.dal.net"; chatnet = "DALnet"; port = "6667"; },
{
address = "ssl.efnet.org";
chatnet = "EFNet";
port = "9999";
use_tls = "yes";
},
{
address = "irc.esper.net";
chatnet = "EsperNet";
port = "6697";
use_tls = "yes";
tls_verify = "yes";
},
{
address = "chat.freenode.net";
chatnet = "Freenode";
port = "6697";
use_tls = "yes";
tls_verify = "yes";
},
{
address = "irc.gamesurge.net";
chatnet = "GameSurge";
port = "6667";
},
{
address = "eu.irc6.net";
chatnet = "IRCnet";
port = "6667";
use_tls = "yes";
},
{ address = "open.ircnet.net"; chatnet = "IRCnet"; port = "6667"; },
{
address = "irc.ircsource.net";
chatnet = "IRCSource";
port = "6667";
},
{ address = "irc.netfuze.net"; chatnet = "NetFuze"; port = "6667"; },
{
address = "irc.oftc.net";
chatnet = "OFTC";
port = "6697";
use_tls = "yes";
tls_verify = "yes";
},
{
address = "irc.quakenet.org";
chatnet = "QuakeNet";
port = "6667";
},
{
address = "irc.rizon.net";
chatnet = "Rizon";
port = "6697";
use_tls = "yes";
tls_verify = "yes";
},
{ address = "silc.silcnet.org"; chatnet = "SILC"; port = "706"; },
{
address = "irc.undernet.org";
chatnet = "Undernet";
port = "6667";
},
{
address = "irc.libera.chat";
chatnet = "LiberaChat";
port = "6697";
use_tls = "yes";
tls_verify = "yes";
autoconnect = "yes";
},
{
address = "irc.epiknet.org";
chatnet = "Epinet";
port = "6697";
use_tls = "yes";
tls_verify = "yes";
},
{
address = "irc.epiknet.org";
chatnet = "EpikNet";
port = "6697";
use_tls = "yes";
tls_verify = "yes";
}
);
chatnets = {
DALnet = {
type = "IRC";
max_kicks = "4";
max_msgs = "20";
max_whois = "30";
};
EFNet = {
type = "IRC";
max_kicks = "1";
max_msgs = "4";
max_whois = "1";
};
EsperNet = {
type = "IRC";
max_kicks = "1";
max_msgs = "4";
max_whois = "1";
};
Freenode = {
type = "IRC";
max_kicks = "1";
max_msgs = "4";
max_whois = "1";
};
GameSurge = {
type = "IRC";
max_kicks = "1";
max_msgs = "1";
max_whois = "1";
};
IRCnet = {
type = "IRC";
max_kicks = "1";
max_msgs = "1";
max_whois = "1";
};
IRCSource = {
type = "IRC";
max_kicks = "1";
max_msgs = "4";
max_whois = "1";
};
NetFuze = {
type = "IRC";
max_kicks = "1";
max_msgs = "1";
max_whois = "1";
};
OFTC = { type = "IRC"; max_kicks = "1"; max_msgs = "1"; max_whois = "1"; };
QuakeNet = {
type = "IRC";
max_kicks = "1";
max_msgs = "1";
max_whois = "1";
};
Rizon = {
type = "IRC";
max_kicks = "1";
max_msgs = "1";
max_whois = "1";
};
SILC = { type = "SILC"; };
Undernet = {
type = "IRC";
max_kicks = "1";
max_msgs = "1";
max_whois = "1";
};
LiberaChat = {
type = "IRC";
sasl_mechanism = "PLAIN";
sasl_username = "swytch";
};
EpikNet = { type = "IRC"; };
};
channels = (
{ name = "#lobby"; chatnet = "EsperNet"; autojoin = "No"; },
{ name = "#freenode"; chatnet = "Freenode"; autojoin = "No"; },
{ name = "#irssi"; chatnet = "Freenode"; autojoin = "No"; },
{ name = "#gamesurge"; chatnet = "GameSurge"; autojoin = "No"; },
{ name = "#irssi"; chatnet = "IRCNet"; autojoin = "No"; },
{ name = "#ircsource"; chatnet = "IRCSource"; autojoin = "No"; },
{ name = "#netfuze"; chatnet = "NetFuze"; autojoin = "No"; },
{ name = "#oftc"; chatnet = "OFTC"; autojoin = "No"; },
{ name = "silc"; chatnet = "SILC"; autojoin = "No"; },
{ name = "#gentoo"; chatnet = "LiberaChat"; },
{ name = "#gentoo-fr"; chatnet = "LiberaChat"; },
{ name = "#neovim"; chatnet = "LiberaChat"; },
{ name = "#git"; chatnet = "LiberaChat"; },
{ name = "#coq"; chatnet = "LiberaChat"; },
{ name = "#18-25"; chatnet = "EpikNet"; },
{ name = "#irssi"; chatnet = "LiberaChat"; }
);
aliases = {
ATAG = "WINDOW SERVER";
ADDALLCHANS = "SCRIPT EXEC foreach my \\$channel (Irssi::channels()) { Irssi::command(\"CHANNEL ADD -auto \\$channel->{visible_name} \\$channel->{server}->{tag} \\$channel->{key}\")\\;}";
B = "BAN";
BACK = "AWAY";
BANS = "BAN";
BYE = "QUIT";
C = "CLEAR";
CALC = "EXEC - if command -v bc >/dev/null 2>&1\\; then printf '%s=' '$*'\\; echo '$*' | bc -l\\; else echo bc was not found\\; fi";
CHAT = "DCC CHAT";
DATE = "TIME";
DEHIGHLIGHT = "DEHILIGHT";
DESCRIBE = "ACTION";
DHL = "DEHILIGHT";
EXEMPTLIST = "MODE $C +e";
EXIT = "QUIT";
GOTO = "SCROLLBACK GOTO";
HIGHLIGHT = "HILIGHT";
HL = "HILIGHT";
HOST = "USERHOST";
INVITELIST = "MODE $C +I";
J = "JOIN";
K = "KICK";
KB = "KICKBAN";
KN = "KNOCKOUT";
LAST = "LASTLOG";
LEAVE = "PART";
M = "MSG";
MUB = "UNBAN *";
N = "NAMES";
NMSG = "^MSG";
P = "PART";
Q = "QUERY";
RESET = "SET -default";
RUN = "SCRIPT LOAD";
SAY = "MSG *";
SB = "SCROLLBACK";
SBAR = "STATUSBAR";
SIGNOFF = "QUIT";
SV = "MSG * Irssi $J ($V) - https://irssi.org";
T = "TOPIC";
UB = "UNBAN";
UMODE = "MODE $N";
UNSET = "SET -clear";
W = "WHO";
WC = "WINDOW CLOSE";
WG = "WINDOW GOTO";
WJOIN = "JOIN -window";
WI = "WHOIS";
WII = "WHOIS $0 $0";
WL = "WINDOW LIST";
WN = "WINDOW NEW HIDDEN";
WQUERY = "QUERY -window";
WW = "WHOWAS";
};
statusbar = {
items = {
barstart = "{sbstart}";
barend = "{sbend}";
topicbarstart = "{topicsbstart}";
topicbarend = "{topicsbend}";
time = "{sb $Z}";
user = "{sb {sbnickmode $cumode}$N{sbmode $usermode}{sbaway $A}}";
window = "{sb $winref:$tag/$itemname{sbmode $M}}";
window_empty = "{sb $winref{sbservertag $tag}}";
prompt = "{prompt $[.15]itemname}";
prompt_empty = "{prompt $winname}";
topic = " $topic";
topic_empty = " Irssi v$J - https://irssi.org";
lag = "{sb Lag: $0-}";
act = "{sb Act: $0-}";
more = "-- more --";
};
default = {
window = {
disabled = "no";
type = "window";
placement = "bottom";
position = "1";
visible = "active";
items = {
barstart = { priority = "100"; };
time = { };
user = { };
window = { };
window_empty = { };
lag = { priority = "-1"; };
act = { priority = "10"; };
more = { priority = "-1"; alignment = "right"; };
barend = { priority = "100"; alignment = "right"; };
};
};
window_inact = {
type = "window";
placement = "bottom";
position = "1";
visible = "inactive";
items = {
barstart = { priority = "100"; };
window = { };
window_empty = { };
more = { priority = "-1"; alignment = "right"; };
barend = { priority = "100"; alignment = "right"; };
};
};
prompt = {
type = "root";
placement = "bottom";
position = "100";
visible = "always";
items = {
prompt = { priority = "-1"; };
prompt_empty = { priority = "-1"; };
input = { priority = "10"; };
};
};
topic = {
type = "root";
placement = "top";
position = "1";
visible = "always";
items = {
topicbarstart = { priority = "100"; };
topic = { };
topic_empty = { };
topicbarend = { priority = "100"; alignment = "right"; };
};
};
};
};
settings = {
core = {
real_name = "DavidJ";
user_name = "swytch";
nick = "swytch";
timestamp_format = "%H:%M:%S";
};
"fe-text" = { actlist_sort = "refnum"; };
"fe-common/core" = { theme = "elf"; };
};
hilights = ( { text = "swytch"; nick = "yes"; word = "yes"; } );
windows = {
1 = { immortal = "yes"; name = "(status)"; level = "ALL"; };
2 = { name = "hilight"; sticky = "yes"; };
};
mainwindows = {
1 = {
first_line = "12";
lines = "39";
first_column = "0";
columns = "191";
};
2 = {
first_line = "1";
lines = "11";
first_column = "0";
columns = "191";
};
};

2
.config/ncmpcpp/config

@ -400,7 +400,7 @@ song_columns_list_format = (6f)[green]{NE} (30)[white]{t|f:Title} (7f)[green]{l}
#statusbar_visibility = yes
#
## Show the "Connected to ..." message on startup
#connected_message_on_startup = yes
connected_message_on_startup = no
#
#titles_visibility = yes
#

4
.config/npm/npmrc

@ -0,0 +1,4 @@
prefix=${XDG_DATA_HOME}/npm
cache=${XDG_CACHE_HOME}/npm
tmp=${XDG_RUNTIME_DIR}/npm
init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js

9
.config/nvim/after/ftplugin/c.lua

@ -0,0 +1,9 @@
-- Author : swytch
-- Created : Saturday Oct. 30, 2021 11:43:34 CET
-- License : GPLv3
-- Description : c settings file
local opt = vim.opt
local g = vim.g
opt.formatoptions = "trq1jp"

9
.config/nvim/after/ftplugin/lua.lua

@ -0,0 +1,9 @@
-- Author : swytch
-- Created : Saturday Oct. 30, 2021 11:43:21 CET
-- License : GPLv3
-- Description : lua settings file
local opt = vim.opt
local g = vim.g
opt.formatoptions = "trq1jp"

8
.config/nvim/after/ftplugin/tex.lua

@ -1,9 +1,15 @@
-- Author : swytch
-- Created : Monday Oct. 04, 2021 16:09:13 CET
-- License : GPLv3
-- Description : tex fietype config
-- Description : tex filetype config
local opt = vim.opt
local g = vim.g
opt.formatoptions = "trq1jp"
opt.tabstop = 4
-- Caps
utils.map("i", "AA", "À")
utils.map("i", "CC", "Ç")

5
.config/nvim/after/ftplugin/verilog.lua

@ -7,7 +7,8 @@ utils.map("n", "<C-c>", "<cmd>CoqInterrupt<CR>")
utils.map("n", "<leader>j", "<cmd>CoqNext<CR>")
utils.map("n", "<leader>k", "<cmd>CoqUndo<CR>")
utils.map("n", "<leader><CR>", "<cmd>CoqToLine<CR>")
utils.map("n", "<leader>a", "<cmd>Coq About")
utils.map("n", "<leader>G", "<cmd>CoqJumpToEnd")
utils.map("n", "<leader>a", ":Coq About")
utils.map("n", "<leader>s", ":Coq Search")
utils.map("n", "<leader>G", "<cmd>CoqJumpToEnd<CR>")
utils.map("i", "//", "")

12
.config/nvim/init.lua

@ -3,9 +3,9 @@
-- License : GPLv3
-- Description : neovim configuration file
require("globals") -- ./lua/globals.lua
require("utils") -- ./lua/utils.lua
require("settings") -- ./lua/settings.lua
require("plugins") -- ./lua/plugins.lua
require("maps") -- ./lua/maps.lua
require("statusline") -- ./lua/statusline.lua
require("globals") -- ./lua/globals.lua
require("utils") -- ./lua/utils.lua
require("settings") -- ./lua/settings.lua
require("plugin.packer") -- ./lua/plugin/packer.lua
require("maps") -- ./lua/maps.lua
require("statusline") -- ./lua/statusline.lua

11
.config/nvim/lua/lsp/lua.lua

@ -11,6 +11,10 @@ local sumneko_root_path = vim.fn.stdpath("data") ..
local sumneko_binary = sumneko_root_path .. "/bin/" .. system_name ..
"/lua-language-server"
local runtime_path = vim.split(package.path, ';')
table.insert(runtime_path, "lua/?.lua")
table.insert(runtime_path, "lua/?/init.lua")
require'lspconfig'.sumneko_lua.setup {
cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"};
settings = {
@ -19,7 +23,7 @@ require'lspconfig'.sumneko_lua.setup {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
-- Setup your lua path
path = vim.split(package.path, ';'),
path = runtime_path,
},
diagnostics = {
-- Get the language server to recognize the `vim` global
@ -27,10 +31,7 @@ require'lspconfig'.sumneko_lua.setup {
},
workspace = {
-- Make the server aware of Neovim runtime files
library = {
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
},
library = vim.api.nvim_get_runtime_file("", true),
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {

6
.config/nvim/lua/maps.lua

@ -7,7 +7,7 @@ utils.map("n", "<space>", "<leader>")
utils.map("n", "<leader>y", "\"+y")
utils.map("n", "<leader>p", "\"+P")
utils.map("n", "<leader><enter>", "<cmd>w! | !compiler %<CR>")
utils.map("n", "<leader>s", "<cmd>PackerSync<CR>")
utils.map("n", "<leader>u", "<cmd>PackerSync<CR>")
utils.map("n", "<leader>c", "<cmd>ColorizerToggle<CR>")
-- LSP
@ -26,3 +26,7 @@ utils.map("n", "<leader>tl", "<cmd>Telescope live_grep<CR>")
-- colorscheme
utils.map("n", "<C-s>", "<cmd>lua require(\"astronomy\").toggle_variant()<CR>")
-- snippets
utils.map("i", "<C-E>", "<Plug>luasnip-next-choice", {})
utils.map("s", "<C-E>", "<Plug>luasnip-next-choice", {})

14
.config/nvim/lua/plugin/cmp.lua

@ -5,10 +5,7 @@
local cmp = require("cmp")
local luasnip = require("luasnip")
local t = function(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
local check_backspace = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
@ -17,24 +14,29 @@ local check_backspace = function()
sub(col, col):match('%s') == nil
end
-- If you want insert `(` after select function or method item
cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } }))
cmp.setup {
completion = {
autocomplete = false
},
sources = {
{ name = "path" },
{ name = "buffer" },
{ name = "luasnip" },
{ name = "nvim_lsp" },
{ name = "buffer" },
{ name = "nvim_lua" },
{ name = "treesitter" },
{ name = "calc" },
{ name = "spell" },
{ name = "treesitter" },
},
formatting = {
format = function(entry, vim_item)
vim_item.menu = ({
nvim_lsp = "[lsp]",
nvim_lua = "[nvim]",
luasnip = "[snip]",
path = "[path]",
buffer = "[buff]",
calc = "[calc]",

493
.config/nvim/lua/plugin/luasnip.lua

@ -0,0 +1,493 @@
-- Author : swytch
-- Created : Friday Nov. 19, 2021 23:27:24 CET
-- License : GPLv3
-- Description : luasnip config file
local ls = require("luasnip")
-- some shorthands...
local s = ls.snippet
local sn = ls.snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local l = require("luasnip.extras").lambda
local r = require("luasnip.extras").rep
local p = require("luasnip.extras").partial
local m = require("luasnip.extras").match
local n = require("luasnip.extras").nonempty
local dl = require("luasnip.extras").dynamic_lambda
local fmt = require("luasnip.extras.fmt").fmt
local fmta = require("luasnip.extras.fmt").fmta
local types = require("luasnip.util.types")
local conds = require("luasnip.extras.expand_conditions")
-- Every unspecified option will be set to the default.
ls.config.set_config({
history = true,
-- Update more often, :h events for more info.
updateevents = "TextChanged,TextChangedI",
ext_opts = {
[types.choiceNode] = {
active = {
virt_text = { { "choiceNode", "Comment" } },
},
},
},
-- treesitter-hl has 100, use something higher (default is 200).
ext_base_prio = 200,
-- minimal increase in priority.
ext_prio_increase = 1,
enable_autosnippets = true,
})
-- args is a table, where 1 is the text in Placeholder 1, 2 the text in
-- placeholder 2,...
local function copy(args)
return args[1]
end
-- 'recursive' dynamic snippet. Expands to some text followed by itself.
local rec_ls
rec_ls = function()
return sn(
nil,
c(1, {
-- Order is important, sn(...) first would cause infinite loop of expansion.
t(""),
sn(nil, { t({ "", "", "\t\\item " }), i(1), d(2, rec_ls, {}) }),
})
)
end
-- complicated function for dynamicNode.
local function jdocsnip(args, _, old_state)
local nodes = {
t({ "/**", " * " }),
i(1, "A short Description"),
t({ "", "" }),
}
-- These will be merged with the snippet; that way, should the snippet be updated,
-- some user input eg. text can be referred to in the new snippet.
local param_nodes = {}
if old_state then
nodes[2] = i(1, old_state.descr:get_text())
end
param_nodes.descr = nodes[2]
-- At least one param.
if string.find(args[2][1], ", ") then
vim.list_extend(nodes, { t({ " * ", "" }) })
end
local insert = 2
for indx, arg in ipairs(vim.split(args[2][1], ", ", true)) do
-- Get actual name parameter.
arg = vim.split(arg, " ", true)[2]
if arg then
local inode
-- if there was some text in this parameter, use it as static_text for this new snippet.
if old_state and old_state[arg] then
inode = i(insert, old_state["arg" .. arg]:get_text())
else
inode = i(insert)
end
vim.list_extend(
nodes,
{ t({ " * @param " .. arg .. " " }), inode, t({ "", "" }) }
)
param_nodes["arg" .. arg] = inode
insert = insert + 1
end
end
if args[1][1] ~= "void" then
local inode
if old_state and old_state.ret then
inode = i(insert, old_state.ret:get_text())
else
inode = i(insert)
end
vim.list_extend(
nodes,
{ t({ " * ", " * @return " }), inode, t({ "", "" }) }
)
param_nodes.ret = inode
insert = insert + 1
end
if vim.tbl_count(args[3]) ~= 1 then
local exc = string.gsub(args[3][2], " throws ", "")
local ins
if old_state and old_state.ex then
ins = i(insert, old_state.ex:get_text())
else
ins = i(insert)
end
vim.list_extend(
nodes,
{ t({ " * ", " * @throws " .. exc .. " " }), ins, t({ "", "" }) }
)
param_nodes.ex = ins
insert = insert + 1
end
vim.list_extend(nodes, { t({ " */" }) })
local snip = sn(nil, nodes)
-- Error on attempting overwrite.
snip.old_state = param_nodes
return snip
end
-- Make sure to not pass an invalid command, as io.popen() may write over nvim-text.
local function bash(_, _, command)
local file = io.popen(command, "r")
local res = {}
for line in file:lines() do
table.insert(res, line)
end
return res
end
-- Returns a snippet_node wrapped around an insert_node whose initial
-- text value is set to the current date in the desired format.
local date_input = function(args, state, fmt)
local fmt = fmt or "%Y-%m-%d"
return sn(nil, i(1, os.date(fmt)))
end
ls.snippets = {
-- When trying to expand a snippet, luasnip first searches the tables for
-- each filetype specified in 'filetype' followed by 'all'.
-- If ie. the filetype is 'lua.c'
-- - luasnip.lua
-- - luasnip.c
-- - luasnip.all
-- are searched in that order.
all = {
-- trigger is fn.
s("fn", {
-- Simple static text.
t("//Parameters: "),
-- function, first parameter is the function, second the Placeholders
-- whose text it gets as input.
f(copy, 2),
t({ "", "function " }),
-- Placeholder/Insert.
i(1),
t("("),
-- Placeholder with initial text.
i(2, "int foo"),
-- Linebreak
t({ ") {", "\t" }),
-- Last Placeholder, exit Point of the snippet. EVERY 'outer' SNIPPET NEEDS Placeholder 0.
i(0),
t({ "", "}" }),
}),
s("class", {
-- Choice: Switch between two different Nodes, first parameter is its position, second a list of nodes.
c(1, {
t("public "),
t("private "),
}),
t("class "),
i(2),
t(" "),
c(3, {
t("{"),
-- sn: Nested Snippet. Instead of a trigger, it has a position, just like insert-nodes. !!! These don't expect a 0-node!!!!
-- Inside Choices, Nodes don't need a position as the choice node is the one being jumped to.
sn(nil, {
t("extends "),
i(1),
t(" {"),
}),
sn(nil, {
t("implements "),
i(1),
t(" {"),
}),
}),
t({ "", "\t" }),
i(0),
t({ "", "}" }),
}),
-- Use a dynamic_node to interpolate the output of a
-- function (see date_input above) into the initial
-- value of an insert_node.
s("novel", {
t("It was a dark and stormy night on "),
d(1, date_input, {}, "%A, %B %d of %Y"),
t(" and the clocks were striking thirteen."),
}),
-- Parsing snippets: First parameter: Snippet-Trigger, Second: Snippet body.
-- Placeholders are parsed into choices with 1. the placeholder text(as a snippet) and 2. an empty string.
-- This means they are not SELECTed like in other editors/Snippet engines.
ls.parser.parse_snippet(
"lspsyn",
"Wow! This ${1:Stuff} really ${2:works. ${3:Well, a bit.}}"
),
-- When wordTrig is set to false, snippets may also expand inside other words.
ls.parser.parse_snippet(
{ trig = "te", wordTrig = false },
"${1:cond} ? ${2:true} : ${3:false}"
),
-- When regTrig is set, trig is treated like a pattern, this snippet will expand after any number.
ls.parser.parse_snippet({ trig = "%d", regTrig = true }, "A Number!!"),
-- Using the condition, it's possible to allow expansion only in specific cases.
s("cond", {
t("will only expand in c-style comments"),
}, {
condition = function(line_to_cursor, matched_trigger, captures)
-- optional whitespace followed by //
return line_to_cursor:match("%s*//")
end,
}),
-- there's some built-in conditions in "luasnip.extras.expand_conditions".
s("cond2", {
t("will only expand at the beginning of the line"),
}, {
condition = conds.line_begin,
}),
-- The last entry of args passed to the user-function is the surrounding snippet.
s(
{ trig = "a%d", regTrig = true },
f(function(_, snip)
return "Triggered with " .. snip.trigger .. "."
end, {})
),
-- It's possible to use capture-groups inside regex-triggers.
s(
{ trig = "b(%d)", regTrig = true },
f(function(_, snip)
return "Captured Text: " .. snip.captures[1] .. "."
end, {})
),
s({ trig = "c(%d+)", regTrig = true }, {
t("will only expand for even numbers"),
}, {
condition = function(line_to_cursor, matched_trigger, captures)
return tonumber(captures[1]) % 2 == 0
end,
}),
-- Use a function to execute any shell command and print its text.
s("bash", f(bash, {}, "ls")),
-- Short version for applying String transformations using function nodes.
s("transform", {
i(1, "initial text"),
t({ "", "" }),
-- lambda nodes accept an l._1,2,3,4,5, which in turn accept any string transformations.
-- This list will be applied in order to the first node given in the second argument.
l(l._1:match("[^i]*$"):gsub("i", "o"):gsub(" ", "_"):upper(), 1),
}),
s("transform2", {
i(1, "initial text"),
t("::"),
i(2, "replacement for e"),
t({ "", "" }),
-- Lambdas can also apply transforms USING the text of other nodes:
l(l._1:gsub("e", l._2), { 1, 2 }),
}),
s({ trig = "trafo(%d+)", regTrig = true }, {
-- env-variables and captures can also be used:
l(l.CAPTURE1:gsub("1", l.TM_FILENAME), {}),
}),
-- Set store_selection_keys = "<Tab>" (for example) in your
-- luasnip.config.setup() call to access TM_SELECTED_TEXT. In
-- this case, select a URL, hit Tab, then expand this snippet.
s("link_url", {
t('<a href="'),
f(function(_, snip)
return snip.env.TM_SELECTED_TEXT[1] or {}
end, {}),
t('">'),
i(1),
t("</a>"),
i(0),
}),
-- Shorthand for repeating the text in a given node.
s("repeat", { i(1, "text"), t({ "", "" }), r(1) }),
-- Directly insert the ouput from a function evaluated at runtime.
s("part", p(os.date, "%Y")),
-- use matchNodes to insert text based on a pattern/function/lambda-evaluation.
s("mat", {
i(1, { "sample_text" }),
t(": "),
m(1, "%d", "contains a number", "no number :("),
}),
-- The inserted text defaults to the first capture group/the entire
-- match if there are none
s("mat2", {
i(1, { "sample_text" }),
t(": "),
m(1, "[abc][abc][abc]"),
}),
-- It is even possible to apply gsubs' or other transformations
-- before matching.
s("mat3", {
i(1, { "sample_text" }),
t(": "),
m(
1,
l._1:gsub("[123]", ""):match("%d"),
"contains a number that isn't 1, 2 or 3!"
),
}),
-- `match` also accepts a function, which in turn accepts a string
-- (text in node, \n-concatted) and returns any non-nil value to match.
-- If that value is a string, it is used for the default-inserted text.
s("mat4", {
i(1, { "sample_text" }),
t(": "),
m(1, function(text)
return (#text % 2 == 0 and text) or nil
end),
}),
-- The nonempty-node inserts text depending on whether the arg-node is
-- empty.
s("nempty", {
i(1, "sample_text"),
n(1, "i(1) is not empty!"),
}),
-- dynamic lambdas work exactly like regular lambdas, except that they
-- don't return a textNode, but a dynamicNode containing one insertNode.
-- This makes it easier to dynamically set preset-text for insertNodes.
s("dl1", {
i(1, "sample_text"),
t({ ":", "" }),
dl(2, l._1, 1),
}),
-- Obviously, it's also possible to apply transformations, just like lambdas.
s("dl2", {
i(1, "sample_text"),
i(2, "sample_text_2"),
t({ "", "" }),
dl(3, l._1:gsub("\n", " linebreak ") .. l._2, { 1, 2 }),
}),
-- Alternative printf-like notation for defining snippets. It uses format
-- string with placeholders similar to the ones used with Python's .format().
s(
"fmt1",
fmt("To {title} {} {}.", {
i(2, "Name"),
i(3, "Surname"),
title = c(1, { t("Mr."), t("Ms.") }),
})
),
-- To escape delimiters use double them, e.g. `{}` -> `{{}}`.
-- Multi-line format strings by default have empty first/last line removed.
-- Indent common to all lines is also removed. Use the third `opts` argument
-- to control this behaviour.
s(
"fmt2",
fmt(
[[
foo({1}, {3}) {{
return {2} * {4}
}}
]],
{
i(1, "x"),
r(1),
i(2, "y"),
r(2),
}
)
),
-- Empty placeholders are numbered automatically starting from 1 or the last
-- value of a numbered placeholder. Named placeholders do not affect numbering.
s(
"fmt3",
fmt("{} {a} {} {1} {}", {
t("1"),
t("2"),
a = t("A"),
})
),
-- The delimiters can be changed from the default `{}` to something else.
s(
"fmt4",
fmt("foo() { return []; }", i(1, "x"), { delimiters = "[]" })
),
-- `fmta` is a convenient wrapper that uses `<>` instead of `{}`.
s("fmt5", fmta("foo() { return <>; }", i(1, "x"))),
-- By default all args must be used. Use strict=false to disable the check
s(
"fmt6",
fmt("use {} only", { t("this"), t("not this") }, { strict = false })
),
},
tex = {
-- rec_ls is self-referencing. That makes this snippet 'infinite' eg. have as many
-- \item as necessary by utilizing a choiceNode.
s("ls", {
t({ "\\begin{itemize}", "\t\\item " }),
i(1),
t({ "" }),
d(2, rec_ls, {}),
t({ "", "\\end{itemize}", "" }),
}),
s("frm", {
t({ "\\begin{" }),
i(1),
t({ "}[" }),
i(2),
t({ "]{" }),
f(copy, 1),
t({ ":" }),
i(3, "foo"),
t({ "}", "\t" }),
i(0),
t({ "", "\\end{" }),
f(copy, 1),
t({ "}", "" }),
}),
s("env", {
t({ "\\begin{" }),
i(1, "foo"),
t({ "}", "\t" }),
i(2),
t({ "", "\\end{" }),
f(copy,1),
t({ "}", "" }),
}),
},
}
-- autotriggered snippets have to be defined in a separate table, luasnip.autosnippets.
ls.autosnippets = {
all = {
s("autotrigger", {
t("autosnippet"),
}),
},
}
-- in a lua file: search lua-, then c-, then all-snippets.
ls.filetype_extend("lua", { "c" })
-- in a cpp file: search c-snippets, then all-snippets only (no cpp-snippets!!).
ls.filetype_set("cpp", { "c" })
--[[
-- Beside defining your own snippets you can also load snippets from "vscode-like" packages
-- that expose snippets in json files, for example <https://github.com/rafamadriz/friendly-snippets>.
-- Mind that this will extend `ls.snippets` so you need to do it after your own snippets or you
-- will need to extend the table yourself instead of setting a new one.
]]
require("luasnip/loaders/from_vscode").load({ include = { "python" } }) -- Load only python snippets
-- The directories will have to be structured like eg. <https://github.com/rafamadriz/friendly-snippets> (include
-- a similar `package.json`)
require("luasnip/loaders/from_vscode").load({ paths = { "./my-snippets" } }) -- Load snippets from my-snippets folder
-- You can also use lazy loading so you only get in memory snippets of languages you use
require("luasnip/loaders/from_vscode").lazy_load() -- You can pass { paths = "./my-snippets/"} as well

14
.config/nvim/lua/plugins.lua → .config/nvim/lua/plugin/packer.lua

@ -68,14 +68,18 @@ return require("packer").startup(function()
use {
"hrsh7th/nvim-cmp",
requires = {
"L3MON4D3/LuaSnip",
{
"L3MON4D3/LuaSnip",
config = function() require("plugin.luasnip") end
},
"saadparwaiz1/cmp_luasnip",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-calc",
"ray-x/cmp-treesitter",
"f3fora/cmp-spell"
"f3fora/cmp-spell",
},
config = function() require("plugin.cmp") end
}
@ -86,6 +90,12 @@ return require("packer").startup(function()
config = function() require("plugin.comment") end
}
-- autopairs
use {
"windwp/nvim-autopairs",
config = function() require('nvim-autopairs').setup() end
}
-- display colors directly in editor
use {
"norcalli/nvim-colorizer.lua",

7
.config/sxhkd/sxhkdrc

@ -60,10 +60,13 @@ super + shift + {h,j,k,l}
player {prev,stop,toggle,next}
super + shift + m
$TERMINAL -g 128x32 -c "floating" -e $MUSIC_PLAYER
$TERMINAL -g 128x32 -c "floating" -e $MUSIC_CLIENT
super + shift + n
$TERMINAL -g 128x32 -c "floating" -e neomutt
$TERMINAL -g 128x32 -c "floating" -e tsession "mail" "$MAIL_CLIENT"
super + shift + i
$TERMINAL -g 128x32 -c "floating" -e tsession "irc" "$IRC_CLIENT"
super + shift + t
$TERMINAL -g 128x32 -c "floating" -e tremc

81
.config/tmux/tmux.conf

@ -0,0 +1,81 @@
#
#
# Adapated from the work of Nicholas Marriott. Public domain.
#
# Some tweaks to the status line
# set -g status-right "$SHELL"
# set -g window-status-current-style "underscore"
set-option -g status-style bg=color0 # bg=bg1, fg=fg1
set-option -g status-left "\
#[fg=color8, bg=color7]#{?client_prefix,#[bg=color9],} ❐ #S "
set-option -g status-right "\
#[fg=color7, bg=color8] %b. %d \
#[fg=color10] ( %I:%M%p )"
set-window-option -g window-status-current-format "\
#[fg=color7, bg=color8] #I* \
#[fg=color7, bg=color0, bold] #W "
set-window-option -g window-status-format "\
#[fg=color7, bg=color8] #I \
#[fg=color7, bg=color0, bold] #W "
# Set the history limit so we get lots of scrollback.
setw -g history-limit 50000000
# If running inside tmux ($TMUX is set), then change the status line to red
%if #{TMUX}
set -g status-bg red
%endif
# Enable RGB colour if running in xterm(1)
set-option -sa terminal-overrides ",xterm*:Tc"
# Change the default $TERM to tmux-256color
set -g default-terminal "tmux-256color"
# No bells at all
set -g bell-action none
# Keep windows around after they exit
# set -g remain-on-exit on
# Change the prefix key to C-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Turn the mouse on, but without copy mode dragging
# set -g mouse on
# unbind -n MouseDrag1Pane
# unbind -Tcopy-mode MouseDrag1Pane
# Some extra key bindings to select higher numbered windows
bind F1 selectw -t:10
bind F2 selectw -t:11
bind F3 selectw -t:12
bind F4 selectw -t:13
bind F5 selectw -t:14
bind F6 selectw -t:15
bind F7 selectw -t:16
bind F8 selectw -t:17
bind F9 selectw -t:18
bind F10 selectw -t:19
bind F11 selectw -t:20
bind F12 selectw -t:21
# A key to toggle between smallest and largest sizes if a window is visible in
# multiple places
bind F set -w window-size
# Keys to toggle monitoring activity in a window and the synchronize-panes option
bind m set monitor-activity
bind y set synchronize-panes\; display 'synchronize-panes #{?synchronize-panes,on,off}'
# Session loading
bind i source-file $XDG_CONFIG_HOME/tmux/irssi.session
bind l source-file $XDG_CONFIG_HOME/tmux/latex.session

8
.config/zsh/.zprofile

@ -3,8 +3,9 @@
# This file is sourced when launching a DM from startx/xinit
# environment variables
## dotfiles
## custom paths
export DOTFILES="$HOME/.dotfiles.git"
export LATEX_RESOURCES="$HOME/documents/latex"
## XDG_BASE_DIRECTORIES
export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"
@ -21,6 +22,7 @@ export TEXMFHOME="$XDG_DATA_HOME/texmf"
export CARGO_HOME="$XDG_DATA_HOME/cargo"
export OPAMROOT="$XDG_DATA_HOME/opam"
export COQBIN="$OPAMROOT/default/bin/"
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
## default programs
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
@ -30,4 +32,6 @@ export EDITOR="nvim"
export TERMINAL="st"
export READER="zathura"
export BROWSER="firefox"
export MUSIC_PLAYER="ncmpcpp"
export IRC_CLIENT="irssi"
export MAIL_CLIENT="neomutt"
export MUSIC_CLIENT="ncmpcpp"

1
.config/zsh/.zshrc

@ -3,6 +3,7 @@
# Reset tty for gpg
export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye >/dev/null
# Enable colors and change prompt:
autoload -U colors && colors

21
.local/bin/dmenuopen

@ -10,22 +10,19 @@
######################################################################
filetypes=".pdf .png .jpg .txt .mom .tex .mkv" # could be augmented
filetypes="pdf png jpg txt mom tex mkv" # could be augmented
filetype=$(printf "$filetypes" | sed "s| |\n|g" | dmenu -i -p "type of the file?")
if [ -z "$filetype" ]; then
exit 0
fi
[ -z "$filetype" ] && exit 1
file=$(find $HOME/ -type f | grep "$filetype" | dmenu -i -l 20 -p "open")
if [ -z "$file" ]; then
exit 0
fi
file=$(find $HOME/{documents,downloads} -type f -path "*.$filetype" | dmenu -i -l 20 -p "open")
[ -z "$file" ] && exit 2
case "$filetype" in
*.pdf) zathura "$file" ;;
*.png|.jpg) sxiv "$file" ;;
*.txt|*.mom|*.tex) "$TERMINAL" -e nvim "$file" ;;
*.mkv) mpv "$file";;
pdf) zathura "$file" ;;
png|jpg) sxiv "$file" ;;
txt|mom|tex) "$TERMINAL" -e nvim "$file" ;;
mkv) mpv "$file";;
esac

6
.local/bin/maker

@ -11,15 +11,15 @@
######################################################################
headers_list="$(ls | grep '.h$')"
sources_list="$(ls | grep '.cp*$')"
headers_list="$(ls | grep '\.hp*$')"
sources_list="$(ls | grep '\.cp*$')"
modules_list="$(printf "\n$sources_list" | sed 's/\.cp*//g' | tr '\n' ' ')"
targets_list="$(printf "\n$sources_list" | sed 's/\.cp*/\.o/g' | tr '\n' ' ')"
get_compiler(){
for source_ in "$sources_list"; do
case "$source_" in
*.cpp) comp="g++" && return;;
*.cpp) comp="g++";;
*.c) comp="gcc";;
esac
done

2
.local/bin/switch-colors

@ -46,5 +46,3 @@ else
switch_scheme
fi
fi
exit 0

9
.local/bin/tsession

@ -0,0 +1,9 @@
#! /usr/bin/env sh
session="$1"
cmd="$2"
tmux new -s $session -d
tmux send-keys -t $session "exec $cmd" C-m
tmux attach -t $session

295
.local/share/irssi/default.theme

@ -0,0 +1,295 @@
# When testing changes, the easiest way to reload the theme is with /RELOAD.
# This reloads the configuration file too, so if you did any changes remember
# to /SAVE it first. Remember also that /SAVE overwrites the theme file with
# old data so keep backups :)
# TEMPLATES:
# The real text formats that irssi uses are the ones you can find with
# /FORMAT command. Back in the old days all the colors and texts were mixed
# up in those formats, and it was really hard to change the colors since you
# might have had to change them in tens of different places. So, then came
# this templating system.
# Now the /FORMATs don't have any colors in them, and they also have very
# little other styling. Most of the stuff you need to change is in this
# theme file. If you can't change something here, you can always go back
# to change the /FORMATs directly, they're also saved in these .theme files.
# So .. the templates. They're those {blahblah} parts you see all over the
# /FORMATs and here. Their usage is simply {name parameter1 parameter2}.
# When irssi sees this kind of text, it goes to find "name" from abstracts
# block below and sets "parameter1" into $0 and "parameter2" into $1 (you
# can have more parameters of course). Templates can have subtemplates.
# Here's a small example:
# /FORMAT format hello {colorify {underline world}}
# abstracts = { colorify = "%G$0-%n"; underline = "%U$0-%U"; }
# When irssi expands the templates in "format", the final string would be:
# hello %G%Uworld%U%n
# ie. underlined bright green "world" text.
# and why "$0-", why not "$0"? $0 would only mean the first parameter,
# $0- means all the parameters. With {underline hello world} you'd really
# want to underline both of the words, not just the hello (and world would
# actually be removed entirely).
# COLORS:
# You can find definitions for the color format codes in docs/formats.txt.
# There's one difference here though. %n format. Normally it means the
# default color of the terminal (white mostly), but here it means the
# "reset color back to the one it was in higher template". For example
# if there was /FORMAT test %g{foo}bar, and foo = "%Y$0%n", irssi would
# print yellow "foo" (as set with %Y) but "bar" would be green, which was
# set at the beginning before the {foo} template. If there wasn't the %g
# at start, the normal behaviour of %n would occur. If you _really_ want
# to use the terminal's default color, use %N.
#############################################################################
# default foreground color (%N) - -1 is the "default terminal color"
default_color = "-1";
# print timestamp/servertag at the end of line, not at beginning
info_eol = "false";
# these characters are automatically replaced with specified color
# (dark grey by default)
replaces = { "[]=" = "%K$*%n"; };
abstracts = {
##
## generic
##
# text to insert at the beginning of each non-message line
line_start = "%B-%n!%B-%n ";
# timestamp styling, nothing by default
timestamp = "$*";
# any kind of text that needs hilighting, default is to bold
hilight = "%_$*%_";
# any kind of error message, default is bright red
error = "%R$*%n";
# channel name is printed
channel = "%_$*%_";
# nick is printed
nick = "%_$*%_";
# nick host is printed
nickhost = "[$*]";
# server name is printed
server = "%_$*%_";
# some kind of comment is printed
comment = "[$*]";
# reason for something is printed (part, quit, kick, ..)
reason = "{comment $*}";
# mode change is printed ([+o nick])
mode = "{comment $*}";
##
## channel specific messages
##
# highlighted nick/host is printed (joins)
channick_hilight = "%C$*%n";
chanhost_hilight = "{nickhost %c$*%n}";
# nick/host is printed (parts, quits, etc.)
channick = "%c$*%n";
chanhost = "{nickhost $*}";
# highlighted channel name is printed
channelhilight = "%c$*%n";
# ban/ban exception/invite list mask is printed
ban = "%c$*%n";
##
## messages
##
# the basic styling of how to print message, $0 = nick mode, $1 = nick
msgnick = "%K<%n$0$1-%K>%n %|";
# message from you is printed. "ownnick" specifies the styling of the
# nick ($0 part in msgnick) and "ownmsgnick" specifies the styling of the
# whole line.
# Example1: You want the message text to be green:
# ownmsgnick = "{msgnick $0 $1-}%g";
# Example2.1: You want < and > chars to be yellow:
# ownmsgnick = "%Y{msgnick $0 $1-%Y}%n";
# (you'll also have to remove <> from replaces list above)
# Example2.2: But you still want to keep <> grey for other messages:
# pubmsgnick = "%K{msgnick $0 $1-%K}%n";
# pubmsgmenick = "%K{msgnick $0 $1-%K}%n";
# pubmsghinick = "%K{msgnick $1 $0$2-%n%K}%n";
# ownprivmsgnick = "%K{msgnick $*%K}%n";
# privmsgnick = "%K{msgnick %R$*%K}%n";
# $0 = nick mode, $1 = nick
ownmsgnick = "{msgnick $0 $1-}";
ownnick = "%_$*%n";
# public message in channel, $0 = nick mode, $1 = nick
pubmsgnick = "{msgnick $0 $1-}";
pubnick = "%N$*%n";
# public message in channel meant for me, $0 = nick mode, $1 = nick
pubmsgmenick = "{msgnick $0 $1-}";
menick = "%Y$*%n";
# public highlighted message in channel
# $0 = highlight color, $1 = nick mode, $2 = nick
pubmsghinick = "{msgnick $1 $0$2-%n}";
# channel name is printed with message
msgchannel = "%K:%c$*%n";
# private message, $0 = nick, $1 = host
privmsg = "[%R$0%K(%r$1-%K)%n] ";
# private message from you, $0 = "msg", $1 = target nick
ownprivmsg = "[%r$0%K(%R$1-%K)%n] ";
# own private message in query
ownprivmsgnick = "{msgnick $*}";
ownprivnick = "%_$*%n";
# private message in query
privmsgnick = "{msgnick %R$*%n}";
##
## Actions (/ME stuff)
##
# used internally by this theme
action_core = "%_ * $*%n";
# generic one that's used by most actions
action = "{action_core $*} ";
# own action, both private/public
ownaction = "{action $*}";
# own action with target, both private/public
ownaction_target = "{action_core $0}%K:%c$1%n ";
# private action sent by others
pvtaction = "%_ (*) $*%n ";
pvtaction_query = "{action $*}";
# public action sent by others
pubaction = "{action $*}";
##
## other IRC events
##
# whois
whois = "%# $[8]0 : $1-";
# notices
ownnotice = "[%r$0%K(%R$1-%K)]%n ";
notice = "%K-%M$*%K-%n ";
pubnotice_channel = "%K:%m$*";
pvtnotice_host = "%K(%m$*%K)";
servernotice = "%g!$*%n ";
# CTCPs
ownctcp = "[%r$0%K(%R$1-%K)] ";
ctcp = "%g$*%n";
# wallops
wallop = "%_$*%n: ";
wallop_nick = "%n$*";
wallop_action = "%_ * $*%n ";
# netsplits
netsplit = "%R$*%n";
netjoin = "%C$*%n";
# /names list
names_prefix = "";
names_nick = "[%_$0%_$1-] ";
names_nick_op = "{names_nick $*}";
names_nick_halfop = "{names_nick $*}";
names_nick_voice = "{names_nick $*}";
names_users = "[%g$*%n]";
names_channel = "%G$*%n";
# DCC
dcc = "%g$*%n";
dccfile = "%_$*%_";
# DCC chat, own msg/action
dccownmsg = "[%r$0%K($1-%K)%n] ";
dccownnick = "%R$*%n";
dccownquerynick = "%_$*%n";
dccownaction = "{action $*}";
dccownaction_target = "{action_core $0}%K:%c$1%n ";
# DCC chat, others
dccmsg = "[%G$1-%K(%g$0%K)%n] ";
dccquerynick = "%G$*%n";
dccaction = "%_ (*dcc*) $*%n %|";
##
## statusbar
##
# default background for all statusbars. You can also give
# the default foreground color for statusbar items.
sb_background = "%4%w";
window_border = "%4%w";