Browse Source

Some morning rice

main
Yiğit Çolakoğlu 4 years ago
parent
commit
81e026fbd7
10 changed files with 69 additions and 2483 deletions
  1. +1
    -0
      README.md
  2. +50
    -0
      scripts/dmenu_run_history
  3. +5
    -0
      scripts/status-bar/clipboard
  4. +1
    -1
      scripts/status-bar/weather
  5. +3
    -0
      suckless/clipmenu/clipmenud
  6. +2
    -0
      suckless/dot_surf/bookmarks
  7. +0
    -2476
      suckless/dot_surf/styles/google.css
  8. +3
    -3
      suckless/dwm/keybind.h
  9. +2
    -1
      suckless/dwmblocks/config.h
  10. +2
    -2
      suckless/tabbed/config.h

+ 1
- 0
README.md View File

@ -29,5 +29,6 @@ Just run `git clone --recurse-submodules github.com/yigitcolakoglu/dotfiles.git
## TODOs
* Improve the go function written in surf
* Add the documentation for all the keybinds
* Improve the way indicators look
* !!! High priority add an indicator for insert mode

+ 50
- 0
scripts/dmenu_run_history View File

@ -0,0 +1,50 @@
#!/bin/sh
cachedir=${XDG_CACHE_HOME:-"$HOME/.cache"}
if [ -d "$cachedir" ]; then
cache=$cachedir/dmenu_run
historyfile=$cachedir/dmenu_history
else # if no xdg dir, fall back to dotfiles in ~
cache=$HOME/.dmenu_cache
historyfile=$HOME/.dmenu_history
fi
IFS=:
if stest -dqr -n "$cache" $PATH; then
stest -flx $PATH | sort -u > "$cache"
fi
unset IFS
awk -v histfile=$historyfile '
BEGIN {
while( (getline < histfile) > 0 ) {
sub("^[0-9]+\t","")
print
x[$0]=1
}
} !x[$0]++ ' "$cache" \
| dmenu "$@" \
| awk -v histfile=$historyfile '
BEGIN {
FS=OFS="\t"
while ( (getline < histfile) > 0 ) {
count=$1
sub("^[0-9]+\t","")
fname=$0
history[fname]=count
}
close(histfile)
}
{
history[$0]++
print
}
END {
if(!NR) exit
for (f in history)
print history[f],f | "sort -t '\t' -k1rn >" histfile
}
' \
| while read cmd; do ${SHELL:-"/bin/sh"} -c "$cmd" & done

+ 5
- 0
scripts/status-bar/clipboard View File

@ -0,0 +1,5 @@
#!/bin/bash
clp=$(sselp)
echo "^c#ebcb8b^ ^d^${clp:0:40}"

+ 1
- 1
scripts/status-bar/weather View File

@ -10,7 +10,7 @@ getforecast() { curl -sf "wttr.in/$LOCATION" > "$weatherreport" || exit 1 ;}
# display them with coresponding emojis.
showweather() { printf "%s" "$(sed '16q;d' "$weatherreport" |
grep -wo "[0-9]*%" | sort -rn | sed "s/^/\^c#81a1c1\^  \^d\^/g;1q" | tr -d '\n')"
sed '13q;d' "$weatherreport" | grep -o "m\\([-+]\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ﰕ " $1 "°","^c#ebcb8b^滛 ^d^" $2 "°"}' ;}
sed '13q;d' "$weatherreport" | grep -o "m\\([-+]\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ﰕ " $1 "°" $2 "°"}' ;}
case $BLOCK_BUTTON in
1) setsid -f "$TERMINAL" -e less -Srf "$weatherreport" ;;


+ 3
- 0
suckless/clipmenu/clipmenud View File

@ -175,10 +175,12 @@ while true; do
fi
for selection in "${selections[@]}"; do
echo $selection
updated_sel[$selection]=0
data=$(_xsel -o --"$selection"; printf x)
data=${data%x} # avoid trailing newlines being stripped
echo $data
[[ $data == *[^[:space:]]* ]] || continue
[[ $last_data == "$data" ]] && continue
@ -194,6 +196,7 @@ while true; do
fi
first_line=$(get_first_line "$data")
kill -52 $(pidof dwmblocks)
debug "New clipboard entry on $selection selection: \"$first_line\""
cache_file_output="$(date +%s%N) $first_line"


+ 2
- 0
suckless/dot_surf/bookmarks View File

@ -1 +1,3 @@
portal.tedankara.k12.tr/
wallabag.yigitcolakoglu.com/
https://app.daily.dev/

+ 0
- 2476
suckless/dot_surf/styles/google.css
File diff suppressed because it is too large
View File


+ 3
- 3
suckless/dwm/keybind.h View File

@ -11,7 +11,7 @@
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
static char dmenumon[2] = "0";
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-z", "1900", "-x", "10", "-y", "10"};
static const char *dmenucmd[] = { "/home/yigit/.scripts/dmenu_run_history", "-m", dmenumon, "-z", "1900", "-x", "10", "-y", "10"};
static const char *termcmd[] = { "/usr/local/bin/st", NULL };
static const char *upvol[] = { "/home/yigit/.scripts/pacontrol.sh", "up", NULL };
static const char *downvol[] = { "/home/yigit/.scripts/pacontrol.sh", "down", NULL };
@ -73,9 +73,9 @@ static Key keys[] = {
{ MODKEY|Mod1Mask, XK_f, setlayout, {.v = &layouts[1]} }, /*Spiral*/
{ MODKEY|Mod1Mask, XK_g, setlayout, {.v = &layouts[2]} }, /*Grid*/
{ MODKEY|Mod1Mask, XK_c, setlayout, {.v = &layouts[3]} }, /*center*/
{ MODKEY|Mod1Mask, XK_d, setlayout, {.v = &layouts[4]} }, /*monocle*/
{ MODKEY|Mod1Mask, XK_space, setlayout, {.v = &layouts[4]} }, /*Center floating*/
{ MODKEY|Mod1Mask, XK_m, setlayout, {.v = &layouts[5]} }, /*monocle*/
{ MODKEY|Mod1Mask, XK_m, setlayout, {.v = &layouts[6]} }, /*Deck*/
{ MODKEY|Mod1Mask, XK_d, setlayout, {.v = &layouts[6]} }, /*Deck*/
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} }, /* [>float<] */
{ MODKEY, XK_f, togglefullscreen, {0} }, /*[>Fullscreen<] */
{ MODKEY|Mod1Mask, XK_comma, cyclelayout, {.i = -1 } }, /*Ciclar layouts*/


+ 2
- 1
suckless/dwmblocks/config.h View File

@ -3,13 +3,14 @@
static Block blocks[] = {
{ "", PATH("clipboard"), 30, 18},
{ "", PATH("cpu-temp"), 30, 17},
{ "", PATH("weather"), 60, 16},
{ "", PATH("arch"), 120, 15},
{ "", PATH("volume"), 120, 14},
{ "", PATH("network"), 120, 13},
{ "", PATH("battery"), 60, 12},
{ "", PATH("time"), 30, 11},
// { "", PATH("time"), 30, 11},
};
//Sets delimiter between status commands. NULL character ('\0') means no delimiter.


+ 2
- 2
suckless/tabbed/config.h View File

@ -4,8 +4,8 @@
static const char font[] = "CaskaydiaCove Nerd Font Mono:size=10";
static const char* normbgcolor = "#0f111a";
static const char* normfgcolor = "#e5e9f0";
static const char* selbgcolor = "#4c566a";
static const char* selfgcolor = "#0f111a";
static const char* selbgcolor = "#e5e9f0";
static const char* selfgcolor = "#00010a";
static const char* urgbgcolor = "#bf616a";
static const char* urgfgcolor = "#0f111a";
static const char before[] = "<";


Loading…
Cancel
Save