Browse Source

Configs

main
Yigit Colakoglu 4 months ago
parent
commit
e94a6f4705
9 changed files with 226 additions and 34 deletions
  1. +21
    -2
      .config/nvim/lua/art.lua
  2. +8
    -7
      .config/nvim/lua/config/plugin/alpha.lua
  3. +20
    -0
      .config/nvim/lua/quotes.lua
  4. +6
    -0
      .config/nvim/lua/utils.lua
  5. +8
    -0
      .config/zsh/.zshrc
  6. +144
    -0
      .config/zsh/completions/pass.zsh-completion
  7. +8
    -10
      .local/src/dwm/config.h
  8. +6
    -7
      .local/src/dwm/keybinds.h
  9. +5
    -8
      .local/src/dwm/rules.h

+ 21
- 2
.config/nvim/lua/art.lua View File

@ -23,8 +23,27 @@ M.skull_bent = {
[[?MXT@Wx.~ : ~"##*$$$$M~ ]],
}
M.all = {
M.skull_bent
M.philosopher_bust = {
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣶⣶⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡿⠿⠿⠿⠿⢿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣷⣶⡆⢰⣶⣾⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢆⠘⢁⡤⢤⡈⠃⡰⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⡀⢸⣶⣿⣷⣾⣿⣶⡇⢀⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⣷⡀⠻⢿⣿⣿⡿⠟⢀⡾⢻⡏⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⣿⣦⣄⣀⠀⢠⣴⣿⠃⣾⠁⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⠇⢀⣿⠃⡟⢸⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⡟⠀⣼⠏⠸⠇⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣤⣤⣤⣤⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡟⠛⠛⠛⠛⢻⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⢸⣿⣿⡇⢸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣈⣁⣈⣉⣉⣁⣈⣁⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀]],
}
M.all_art = {
M.skull_bent,
M.philosopher_bust,
}
return M

+ 8
- 7
.config/nvim/lua/config/plugin/alpha.lua View File

@ -2,10 +2,11 @@ return function()
local theme = require("alpha.themes.theta")
local art = require("art")
local quotes = require("quotes")
local utils = require("utils")
-- Header
local function apply_gradient_hl(text)
local gradient = require("utils").create_gradient("#CBA6F7", "#94E2D5", #text)
local gradient = utils.create_gradient("#CBA6F7", "#94E2D5", #text)
local lines = {}
for i, line in ipairs(text) do
@ -96,16 +97,16 @@ return function()
end
theme.config.layout = {
{ type = "padding", val = 4 },
apply_gradient_hl(art.skull_bent),
{ type = "padding", val = 1 },
get_info(),
apply_gradient_hl(utils.random_from_list(art.all_art)),
{ type = "padding", val = 1 },
links,
get_info(),
{ type = "padding", val = 2 },
links,
{ type = "padding", val = 1 },
get_mru(5),
{ type = "padding", val = 3 },
footer_align(quotes.simple_einstein, 50),
{ type = "padding", val = 2 },
footer_align(utils.random_from_list(quotes.all_quotes), 50),
}
require("alpha").setup(theme.config)


+ 20
- 0
.config/nvim/lua/quotes.lua View File

@ -106,4 +106,24 @@ M.perl = {
[[ -- Larry Wall in <199704251604.JAA27300@wall.org> ]],
}
M.all_quotes = {
M.simple_einstein,
M.honesty,
M.autonomy,
M.evil,
M.violence,
M.fortune_cookie,
M.god,
M.maintenance,
M.coordinates,
M.byte,
M.fanatic,
M.lovelace,
M.dopeler,
M.change,
M.doubt,
M.guest,
M.perl,
}
return M

+ 6
- 0
.config/nvim/lua/utils.lua View File

@ -59,4 +59,10 @@ M.pad_string = function(str, len, align)
end
end
M.random_from_list = function (list)
math.randomseed(os.time())
local random_index = math.random(#list)
return list[random_index]
end
return M

+ 8
- 0
.config/zsh/.zshrc View File

@ -81,6 +81,14 @@ function x11-clip-wrap-widgets() {
done
}
# Disable vim mode
bindkey -e
# Ctrl-E sends to vim to edit command Line
autoload -z edit-command-line
zle -N edit-command-line
bindkey "^E" edit-command-line
# Del, End & Home keys
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word


+ 144
- 0
.config/zsh/completions/pass.zsh-completion View File

@ -0,0 +1,144 @@
#compdef pass
#autoload
# Copyright (C) 2012 - 2014:
# Johan Venant <jvenant@invicem.pro>
# Brian Mattern <rephorm@rephorm.com>
# Jason A. Donenfeld <Jason@zx2c4.com>.
# All Rights Reserved.
# This file is licensed under the GPLv2+. Please see COPYING for more information.
# If you use multiple repositories, you can configure completion like this:
#
# compdef _pass workpass
# zstyle ':completion::complete:workpass::' prefix "$HOME/work/pass"
# workpass() {
# PASSWORD_STORE_DIR=$HOME/work/pass pass $@
# }
_pass () {
local cmd
if (( CURRENT > 2)); then
cmd=${words[2]}
# Set the context for the subcommand.
curcontext="${curcontext%:*:*}:pass-$cmd"
# Narrow the range of words we are looking at to exclude `pass'
(( CURRENT-- ))
shift words
# Run the completion for the subcommand
case "${cmd}" in
init)
_arguments : \
"-p[gpg-id will only be applied to this subfolder]" \
"--path[gpg-id will only be applied to this subfolder]"
_pass_complete_keys
;;
ls|list|edit)
_pass_complete_entries_with_subdirs
;;
insert)
_arguments : \
"-e[echo password to console]" \
"--echo[echo password to console]" \
"-m[multiline]" \
"--multiline[multiline]"
_pass_complete_entries_with_subdirs
;;
generate)
_arguments : \
"-n[don't include symbols in password]" \
"--no-symbols[don't include symbols in password]" \
"-c[copy password to the clipboard]" \
"--clip[copy password to the clipboard]" \
"-f[force overwrite]" \
"--force[force overwrite]" \
"-i[replace first line]" \
"--in-place[replace first line]"
_pass_complete_entries_with_subdirs
;;
cp|copy|mv|rename)
_arguments : \
"-f[force rename]" \
"--force[force rename]"
_pass_complete_entries_with_subdirs
;;
rm)
_arguments : \
"-f[force deletion]" \
"--force[force deletion]" \
"-r[recursively delete]" \
"--recursive[recursively delete]"
_pass_complete_entries_with_subdirs
;;
git)
local -a subcommands
subcommands=(
"init:Initialize git repository"
"push:Push to remote repository"
"pull:Pull from remote repository"
"config:Show git config"
"log:Show git log"
"reflog:Show git reflog"
)
_describe -t commands 'pass git' subcommands
;;
show|*)
_pass_cmd_show
;;
esac
else
local -a subcommands
subcommands=(
"init:Initialize new password storage"
"ls:List passwords"
"find:Find password files or directories based on pattern"
"grep:Search inside decrypted password files for matching pattern"
"show:Decrypt and print a password"
"insert:Insert a new password"
"generate:Generate a new password using pwgen"
"edit:Edit a password with \$EDITOR"
"mv:Rename the password"
"cp:Copy the password"
"rm:Remove the password"
"git:Call git on the password store"
"version:Output version information"
"help:Output help message"
)
_describe -t commands 'pass' subcommands
_arguments : \
"--version[Output version information]" \
"--help[Output help message]"
_pass_cmd_show
fi
}
_pass_cmd_show () {
_arguments : \
"-c[put it on the clipboard]" \
"--clip[put it on the clipboard]"
_pass_complete_entries
}
_pass_complete_entries_helper () {
local IFS=$'\n'
local prefix
zstyle -s ":completion:${curcontext}:" prefix prefix || prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
_values -C 'passwords' ${$(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print 2>/dev/null | sed -e "s#${prefix}/\{0,1\}##" -e 's#\.gpg##' -e 's#\\#\\\\#' | sort):-""}
}
_pass_complete_entries_with_subdirs () {
_pass_complete_entries_helper
}
_pass_complete_entries () {
_pass_complete_entries_helper -type f
}
_pass_complete_keys () {
local IFS=$'\n'
# Extract names and email addresses from gpg --list-keys
_values 'gpg keys' $(gpg2 --list-secret-keys --with-colons | cut -d : -f 10 | sort -u | sed '/^$/d')
}
_pass

+ 8
- 10
.local/src/dwm/config.h View File

@ -43,19 +43,17 @@ static const Layout layouts[] = {
/* scratchpads */
const char *spcmd1[] = {"st", "-c", "scratchpad", "-n", "spterm", "-g", "120x34", NULL };
const char *spcmd2[] = {"feh", "--title", "scratchpad", "--class", "spfeh", "-g","900x300+500+350", "/home/yigit/Pictures/us_keyboard.png", NULL};
const char *spcmd3[] = {"st", "-c", "scratchpad", "-n", "spmutt", "-g", "180x51", "-e", "neomutt", NULL };
static const char *spcmd4[] = { "/usr/local/bin/st", "-g", "150x35", "-c", "spfile", "-n", "spfile", "-e", "/home/yigit/.local/bin/lf-ueberzug", NULL };
static const char *spcmd5[] = { "/usr/local/bin/st", "-g", "150x35", "-c", "spmusic", "-n", "spmusic", "-e", "ncmpcpp", NULL };
static const char *spcmd6[] = { "/usr/local/bin/st", "-g", "150x35", "-c", "spcal", "-n", "spcal", "-e", "calcurse", NULL };
const char *spcmd2[] = {"st", "-c", "scratchpad", "-n", "spmutt", "-g", "180x51", "-e", "neomutt", NULL };
static const char *spcmd3[] = { "/usr/bin/nemo", "-g", "1200x700", "--class=spfile", "--name=spfile", NULL };
static const char *spcmd4[] = { "/usr/local/bin/st", "-g", "150x35", "-c", "spcal", "-n", "spcal", "-e", "qcal", NULL };
static const char *spcmd5[] = { "obsidian" };
static Sp scratchpads[] = {
{"spterm", spcmd1},
{"spfeh", spcmd2},
{"spmutt", spcmd3},
{"spfile", spcmd4},
{"spmusic", spcmd5},
{"spcal", spcmd6},
{"spmutt", spcmd2},
{"spfile", spcmd3},
{"spcal", spcmd4},
{"obsidian", spcmd5},
};
/* key definitions */


+ 6
- 7
.local/src/dwm/keybinds.h View File

@ -20,7 +20,7 @@
static char dmenumon[2] = "0";
static const char *dmenucmd[] = { "/home/yigit/.local/bin/dmenu_run_history", "-m", dmenumon, "-z", "1900", "-x", "10", "-y", "10"};
static const char *termcmd[] = { "/usr/local/bin/st", NULL };
static const char *tmuxcmd[] = { "/usr/local/bin/st","-e", "/home/yigit/.local/bin/st_tmux", NULL };
static const char *termcmd_alt[] = { "/usr/bin/alacritty", NULL };
static const char *upvol[] = { "/home/yigit/.local/bin/pacontrol.sh", "up", NULL };
static const char *downvol[] = { "/home/yigit/.local/bin/pacontrol.sh", "down", NULL };
static const char *mutevol[] = { "/home/yigit/.local/bin/pacontrol.sh", "toggle-mute", NULL };
@ -69,7 +69,7 @@ static Key keys[] = {
{ MODKEY, XK_d, spawn, {.v = dmenucmd } },
{ MODKEY, XK_p, spawn, {.v = bwmenu } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = tmuxcmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd_alt } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
@ -140,11 +140,10 @@ static Key keys[] = {
{ MODKEY|ShiftMask, XK_h, spawn, {.v = hamster } },
{ MODKEY, XK_t, spawn, {.v = toolkit } },
{ MODKEY, XK_s, togglescratch, {.ui = 0 } },
// { MODKEY|ShiftMask, XK_s, togglescratch, {.ui = 1 } },
{ MODKEY, XK_m, togglescratch, {.ui = 2 } },
{ MODKEY|ShiftMask, XK_f, togglescratch, {.ui = 3} },
{ MODKEY, XK_n, togglescratch, {.ui = 4} },
{ MODKEY|ShiftMask, XK_c, togglescratch, {.ui = 5} },
{ MODKEY, XK_m, togglescratch, {.ui = 1 } },
{ MODKEY|ShiftMask, XK_f, togglescratch, {.ui = 2} },
{ MODKEY|ShiftMask, XK_c, togglescratch, {.ui = 3} },
{ MODKEY, XK_n, togglescratch, {.ui = 4} },
/* FloatPos Patch Keybinds */
{ Mod3Mask, XK_u, floatpos, {.v = "-26x -26y" } }, //
{ Mod3Mask, XK_i, floatpos, {.v = " 0x -26y" } }, //


+ 5
- 8
.local/src/dwm/rules.h View File

@ -40,6 +40,7 @@ static const Rule rules[] = {
{ "VirtualBox Machine" , NULL , NULL , 1 << 4 , NULL , NULL , 0 , 0 , -1 },
{ "Microsoft Teams - Preview" , NULL , NULL , 1 << 5 , NULL , NULL , 0 , 0 , -1 },
{ "Journal" , NULL , NULL , 1 << 3 , NULL , NULL , 0 , 0 , -1 },
{ "neovide" , NULL , NULL , 1 << 2 , NULL , NULL , 0 , 0 , -1 },
{ "Nemo" , NULL , NULL , 0 , 1 , "50% 50% 1200W 800H" , 0 , 0 , -1 },
{ "ranger" , NULL , NULL , 0 , 1 , "50% 50% 800W 560H" , 0 , 0 , -1 },
{ "lf" , NULL , NULL , 0 , 1 , "50% 50% 800W 560H" , 0 , 0 , -1 },
@ -54,15 +55,11 @@ static const Rule rules[] = {
{ "Zathura" , NULL , NULL , 0 , 0 , NULL , 0 , 1 , -1 },
{ "DEA" , NULL , NULL , 0 , 1 , NULL , 0 , 1 , -1 },
{ "Qemu-system-x86_64", NULL , NULL , 0 , 1 , NULL , 0 , 1 , -1 },
{ "spfeh" , NULL , NULL , SPTAG(1) , 1 , NULL , 0 , 0 , -1 },
{ "obsidian" , NULL , NULL , 1 << 4 , 0 , NULL , 0 , 1 , -1 },
{ "spfeh" , NULL , NULL , SPTAG(1) , 1 , NULL , 0 , 0 , -1 },
{ NULL , "spterm" , NULL , SPTAG(0) , 1 , NULL , 0 , 0 , -1 },
{ NULL , "spmutt" , NULL , SPTAG(2) , 1 , NULL , 0 , 0 , -1 },
{ NULL , "spfile" , NULL , SPTAG(3) , 1 , NULL , 0 , 0 , -1 },
{ NULL , "spmusic" , NULL , SPTAG(4) , 1 , NULL , 0 , 0 , -1 },
{ NULL , "spcal" , NULL , SPTAG(5) , 1 , NULL , 0 , 0 , -1 },
{ NULL , "obsidian" , NULL , SPTAG(6) , 1 , "50% 50% 1400W 700H" , 0 , 0 , -1 },
{ NULL , "spmutt" , NULL , SPTAG(1) , 1 , NULL , 0 , 0 , -1 },
{ NULL , "spfile" , NULL , SPTAG(2) , 1 , NULL , 0 , 0 , -1 },
{ NULL , "spcal" , NULL , SPTAG(3) , 1 , NULL , 0 , 0 , -1 },
{ NULL , "obsidian" , NULL , SPTAG(4) , 1 , "50% 50% 1400W 700H" , 0 , 0 , -1 },
{ NULL , "sxiv" , NULL , 0 , 1 , "100% 1% 600W 350H" , 1 , 0 , -1 },
{ NULL , "Kunst" , NULL , 0 , 1 , "100% 1% 150W 150H" , 0 , 0 , -1 },
{ NULL , NULL , "SimCrop" , 0 , 1 , "50% 50% 800W 500H" , 0 ,0 , -1 },


Loading…
Cancel
Save