Browse Source

Switched to Material Ocean color scheme for st and calendar

main
Yiğit Çolakoğlu 4 years ago
parent
commit
f8d515e1f6
30 changed files with 366 additions and 218 deletions
  1. +1
    -0
      .gitignore
  2. +2
    -1
      .gitsecret/paths/mapping.cfg
  3. +8
    -0
      gtk/gtkrc-2.0
  4. +6
    -1
      install.sh
  5. BIN
      mail/mbsyncrc.secret
  6. BIN
      mail/msmtp/config.secret
  7. +6
    -0
      misc/calcurse/.gitignore
  8. BIN
      misc/calcurse/caldav/config.secret
  9. +0
    -0
      misc/calcurse/conf
  10. +55
    -0
      misc/calcurse/keys
  11. BIN
      misc/nextcloud.secret
  12. BIN
      misc/ranger/colorschemes/__pycache__/__init__.cpython-39.opt-1.pyc
  13. BIN
      misc/ranger/colorschemes/__pycache__/material-ocean.cpython-39.opt-1.pyc
  14. +0
    -181
      misc/ranger/colorschemes/material-ocean.py
  15. +1
    -1
      misc/ranger/rc.conf
  16. BIN
      misc/spotifyd.conf.secret
  17. +18
    -0
      misc/vdirsyncer/config
  18. BIN
      misc/wakatime.cfg.secret
  19. +10
    -1
      scripts/status-bar/date
  20. +3
    -0
      scripts/status-bar/memory
  21. +3
    -1
      suckless/dwm/rules.h
  22. +20
    -20
      suckless/st/config.h
  23. +1
    -1
      suckless/st/config.mk
  24. +163
    -0
      suckless/st/patches/st-alpha-0.8.2.diff
  25. +0
    -0
      suckless/st/patches/st-universcroll-0.8.4.diff
  26. +1
    -0
      suckless/st/st.h
  27. +30
    -10
      suckless/st/x.c
  28. +1
    -1
      zsh/antibody/zsh_plugins.txt
  29. BIN
      zsh/secret.secret
  30. +37
    -0
      zsh/zshrc

+ 1
- 0
.gitignore View File

@ -6,3 +6,4 @@ mail/msmtp/config
misc/spotifyd.conf
misc/wakatime.cfg
misc/nextcloud
misc/calcurse/caldav/config

+ 2
- 1
.gitsecret/paths/mapping.cfg View File

@ -3,4 +3,5 @@ mail/mbsyncrc:65eec91b162f829575c2cc4b2428faa90eb71f3f79ba779bcfe70712f161cabe
mail/msmtp/config:529c5ae169a81f528ece6356c2bfb23f20af93619386aa018f28fab9505271ec
misc/spotifyd.conf:dd73afe8809498ba3b00ba9aa99e78fb3606867dc4871231880d2ebfd55196a9
misc/wakatime.cfg:e306146d45036c38f15aa9a817fc172bdca3c4c9d9ed3c4f6fe1d8d93d783d78
misc/nextcloud:936fb8a7f1f7a624c12e370edb0d19e219f9a8bb7210728449d6fff1b9d060a9
misc/nextcloud:1ee8feae4ac43c1e27178a5114374ff0afed84a1fd558a12d91e5409f77efef1
misc/calcurse/caldav/config:15d288e4edcbb85da765080fcdc7d25815cf2e22854002af5ea5ca2b4c4c7955

+ 8
- 0
gtk/gtkrc-2.0 View File

@ -0,0 +1,8 @@
# Auto-written by gtk2_prefs. Do not edit.
gtk-theme-name = "material-ocean"
style "user-font"
{
font_name="CaskaydiaCove Nerd Font Mono 11"
}
widget_class "*" style "user-font"

+ 6
- 1
install.sh View File

@ -84,7 +84,8 @@ ln -s ~/.dotfiles/vim/nvim ~/.config/nvim
# GTK
ln -s ~/.dotfiles/gtk/themes ~/.themes
ln -s ~/.dotfiles/gtk/gtk-2.0 ~/.config/gtk-2.0
ln -s ~/.dotfiles/gtk/gtkrc-2.0 ~/.gtkrc-2.0
ln -s ~/.dotfiles/gtk/gtk-3.0 ~/.config/gtk-2.0
ln -s ~/.dotfiles/gtk/gtk-3.0 ~/.config/gtk-3.0
ln -s ~/.dotfiles/gtk/gtk-4.0 ~/.config/gtk-4.0
~/.dotfiles/gtk/Tela-icon-theme/install.sh
@ -93,6 +94,7 @@ ln -s ~/.dotfiles/gtk/gtk-4.0 ~/.config/gtk-4.0
ln -s ~/.dotfiles/misc/dunst ~/.config/dunst
ln -s ~/.dotfiles/misc/zathura ~/.config/zathura
ln -s ~/.dotfiles/misc/termite/ ~/.config/termite
ln -s ~/.dotfiles/misc/vdirsyncer ~/.vdirsyncer
ln -s ~/.dotfiles/misc/systemd ~/.config/systemd
ln -s ~/.dotfiles/misc/ranger ~/.config/ranger
ln -s ~/.dotfiles/misc/neofetch ~/.config/neofetch
@ -104,6 +106,7 @@ ln -s ~/.dotfiles/misc/mimeapps.list ~/.config/mimeapps.list
ln -s ~/.dotfiles/misc/wakatime.cfg ~/.wakatime.cfg
ln -s ~/.dotfiles/misc/BetterDiscord ~/.config/BetterDiscord
ln -s ~/.dotfiles/misc/nextcloud ~/.nextcloud
ln -s ~/.dotfiles/misc/calcurse ~/.calcurse
mkdir -p ~/.config/spotifyd
ln -s ~/.dotfiles/misc/spotifyd.conf ~/.config/spotifyd/spotifyd.conf
ln -s ~/.dotfiles/fonts ~/.fonts
@ -151,6 +154,8 @@ if [ ! -f "/var/spool/cron$username" ]; then
fi
echo "*/8 * * * * /home/$username/.scripts/mailsync" >> /var/spool/cron/yigit
echo "*/15 * * * * /home/$username/.scripts/nextcloud-sync" >> /var/spool/cron/yigit
echo "*/30 * * * * calcurse-caldav" >> /var/spool/cron/yigit
echo "*/30 * * * * vdirsyncer sync" >> /var/spool/cron/yigit
# Root
sudo cp ~/.dotfiles/root/dwm.desktop /usr/share/xsessions


BIN
mail/mbsyncrc.secret View File


BIN
mail/msmtp/config.secret View File


+ 6
- 0
misc/calcurse/.gitignore View File

@ -0,0 +1,6 @@
apts
.apts
.calcurse.pid
notes
todo
caldav/sync.db

BIN
misc/calcurse/caldav/config.secret View File


misc/ranger/colorschemes/__init__.py → misc/calcurse/conf View File


+ 55
- 0
misc/calcurse/keys View File

@ -0,0 +1,55 @@
#
# Calcurse keys configuration file
#
# In this file the keybindings used by Calcurse are defined.
# It is generated automatically by Calcurse and is maintained
# via the key configuration menu of the interactive user
# interface. It should not be edited directly.
generic-cancel ESC
generic-select SPC
generic-credits @
generic-help ?
generic-quit q Q
generic-save s S ^S
generic-reload R
generic-copy c
generic-paste p ^V
generic-change-view TAB
generic-import i I
generic-export x X
generic-goto g G
generic-other-cmd o O
generic-config-menu C
generic-redraw ^R
generic-add-appt ^A
generic-add-todo ^T
generic-prev-day T ^H
generic-next-day t ^L
generic-prev-week W ^K
generic-next-week w
generic-prev-month M
generic-next-month m
generic-prev-year Y
generic-next-year y
generic-scroll-down ^N
generic-scroll-up ^P
generic-goto-today ^G
generic-command :
move-right l L RGT
move-left h H LFT
move-down j J DWN
move-up k K UP
start-of-week 0
end-of-week $
add-item a A
del-item d D
edit-item e E
view-item v V RET
pipe-item |
flag-item !
repeat r
edit-note n N
view-note >
raise-priority +
lower-priority -

BIN
misc/nextcloud.secret View File


BIN
misc/ranger/colorschemes/__pycache__/__init__.cpython-39.opt-1.pyc View File


BIN
misc/ranger/colorschemes/__pycache__/material-ocean.cpython-39.opt-1.pyc View File


+ 0
- 181
misc/ranger/colorschemes/material-ocean.py View File

@ -1,181 +0,0 @@
# This file is part of ranger, the console file manager.
# License: GNU GPL version 3, see the file "AUTHORS" for details.
from __future__ import (absolute_import, division, print_function)
from ranger.gui.colorscheme import ColorScheme
from ranger.gui.color import (
default, normal, bold, reverse, dim, BRIGHT, default_colors,
)
black = 16
blue = 32
cyan = 50
green = 47
magenta = 141
red = 9
white = 255
yellow =227
class Default(ColorScheme):
progress_bar_color = 87
def use(self, context): # pylint: disable=too-many-branches,too-many-statements
fg, bg, attr = 231, black, bold
if context.reset:
return default_colors
elif context.in_browser:
if context.selected:
attr = reverse
else:
attr = normal
if context.empty or context.error:
bg = red
if context.border:
fg = default
if context.media:
if context.image:
fg = yellow
else:
fg = magenta
if context.container:
fg = red
if context.directory:
attr |= bold
fg = blue
elif context.executable and not \
any((context.media, context.container,
context.fifo, context.socket)):
attr |= bold
fg = green
if context.socket:
attr |= bold
fg = magenta
if context.fifo or context.device:
fg = yellow
if context.device:
attr |= bold
if context.link:
fg = cyan if context.good else magenta
if context.tag_marker and not context.selected:
attr |= bold
if fg in (red, magenta):
fg = white
else:
fg = red
if not context.selected and (context.cut or context.copied):
attr |= bold
fg = black
# If the terminal doesn't support bright colors, use dim white
# instead of black.
if BRIGHT == 0:
attr |= dim
fg = white
if context.main_column:
# Doubling up with BRIGHT here causes issues because it's
# additive not idempotent.
if context.selected:
attr |= bold
if context.marked:
attr |= bold
fg = yellow
if context.badinfo:
if attr & reverse:
bg = magenta
else:
fg = magenta
if context.inactive_pane:
fg = cyan
elif context.in_titlebar:
if context.hostname:
fg = red if context.bad else green
elif context.directory:
fg = blue
elif context.tab:
if context.good:
bg = green
elif context.link:
fg = cyan
attr |= bold
elif context.in_statusbar:
if context.permissions:
if context.good:
fg = cyan
elif context.bad:
fg = magenta
if context.marked:
attr |= bold | reverse
fg = yellow
if context.frozen:
attr |= bold | reverse
fg = cyan
if context.message:
if context.bad:
attr |= bold
fg = red
if context.loaded:
bg = self.progress_bar_color
if context.vcsinfo:
fg = blue
attr &= ~bold
if context.vcscommit:
fg = yellow
attr &= ~bold
if context.vcsdate:
fg = cyan
attr &= ~bold
if context.text:
if context.highlight:
attr |= reverse
if context.in_taskview:
if context.title:
fg = blue
if context.selected:
attr |= reverse
if context.loaded:
if context.selected:
fg = self.progress_bar_color
else:
bg = self.progress_bar_color
if context.vcsfile and not context.selected:
attr &= ~bold
if context.vcsconflict:
fg = magenta
elif context.vcsuntracked:
fg = cyan
elif context.vcschanged:
fg = red
elif context.vcsunknown:
fg = red
elif context.vcsstaged:
fg = green
elif context.vcssync:
fg = green
elif context.vcsignored:
fg = default
elif context.vcsremote and not context.selected:
attr &= ~bold
if context.vcssync or context.vcsnone:
fg = green
elif context.vcsbehind:
fg = red
elif context.vcsahead:
fg = blue
elif context.vcsdiverged:
fg = magenta
elif context.vcsunknown:
fg = red
return fg, bg, attr

+ 1
- 1
misc/ranger/rc.conf View File

@ -31,7 +31,7 @@ set unicode_ellipsis true
# Show dotfiles in the bookmark preview box?
set show_hidden_bookmarks true
set colorscheme material-ocean
#set colorscheme material-ocean
# Preview files on the rightmost column?
# And collapse (shrink) the last column if there is nothing to preview?


BIN
misc/spotifyd.conf.secret View File


+ 18
- 0
misc/vdirsyncer/config View File

@ -0,0 +1,18 @@
[general]
status_path = "~/.cache/vsync-status/"
[pair nextcloud_contacts]
a = "nx_contacts_local"
b = "nx_contacts_remote"
collections = ["from a", "from b"]
[storage nx_contacts_local]
type = "filesystem"
path = "~/.card/contacts"
fileext = ".vcf"
[storage nx_contacts_remote]
type = "carddav"
url = "https://drive.yigitcolakoglu.com/"
username = "yigitcolakoglu"
password = "@Ygtclksbl12!"

BIN
misc/wakatime.cfg.secret View File


+ 10
- 1
scripts/status-bar/date View File

@ -1,8 +1,17 @@
#! /bin/sh
icon=
events=$(calcurse -a | grep -- '->' | wc -l)
if [ ! "$events" = "0" ]; then
events="($events) "
fi
cmd=$(date +"%h %e")
#echo "$ifg $icon $tfg$cmd"
echo -n "^c#0f111a^^b#88c0d0^ $icon $cmd ^d^"
echo -n "^c#0f111a^^b#88c0d0^ $icon $events$cmd ^d^"
case $BLOCK_BUTTON in
1) setsid -f st -c center -n center -e calcurse;;
esac

+ 3
- 0
scripts/status-bar/memory View File

@ -4,4 +4,7 @@ MEM=$(free | grep Mem | awk '{printf("%d", $3/$2 * 100.0)}')
echo "^c#a3be8c^ ^d^ $MEM%"
case $BLOCK_BUTTON in
1) setsid -f st -c htop -n htop -e htop;;
esac

+ 3
- 1
suckless/dwm/rules.h View File

@ -32,8 +32,10 @@ static const Rule rules[] = {
RULE(.class = "mpv", 0, .isfloating = 1, .floatpos="100% 1% 600W 350H")
RULE(.instance = "sxiv", 0, .isfloating = 1, .floatpos="100% 1% 600W 350H")
RULE(.class = "neomutt-send", 0, .isfloating = 1, .floatpos="50% 50% 1000W 700H")
RULE(.class = "neomutt-send", 0, .isfloating = 1, .floatpos="50% 50% 250W 600H") // Why did I put this here?
RULE(.class = "Zathura", 0, .isfloating = 1, .floatpos="100% 50% 700W 1000H")
RULE(.class = "weather", 0, .isfloating = 1, .floatpos="50% 50% 1200W 800H") // Why did I put this here?
RULE(.class = "center", 0, .isfloating = 1, .floatpos="50% 50% 1000W 600H") // Why did I put this here?
RULE(.class = "htop", 0, .isfloating = 1, .floatpos="50% 50% 1200W 600H") // Why did I put this here?
RULE(.title = "SimCrop", 0, .isfloating = 1, .floatpos="50% 50% 800W 500H")
};

+ 20
- 20
suckless/st/config.h View File

@ -9,6 +9,7 @@ static char *font = "CaskaydiaCove Nerd Font Mono:pixelsize=16:antialias=true:au
static char *font2[] = {
"Symbola:pixelsize=16:antialias=true:autohint=true",
};
char *iso14755_cmd = "dmenu -p codepoint: </dev/null";
static int borderpx = 2;
@ -25,6 +26,7 @@ char *utmp = NULL;
/* scroll program: to enable use a string like "scroll" */
char *scroll = "scroll";
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
float alpha = 1;
/* identification sequence returned in DA and DECID */
char *vtiden = "\033[?6c";
@ -100,31 +102,30 @@ unsigned int tabspaces = 8;
static const char *colorname[] = {
/* 8 normal colors */
[0] = "#000000", /* black */
[1] = "#cc0000", /* red */
[2] = "#4e9a06", /* green */
[3] = "#c4a000", /* yellow */
[4] = "#3465a4", /* blue */
[5] = "#75507b", /* magenta */
[6] = "#06989a", /* cyan */
[7] = "#d3d7cf", /* white */
[0] = "#3b4252", /* black */
[1] = "#bf616a", /* red */
[2] = "#a3be8c", /* green */
[3] = "#ebcb8b", /* yellow */
[4] = "#81a1c1", /* blue */
[5] = "#b48ead", /* magenta */
[6] = "#88c0d0", /* cyan */
[7] = "#e5e9f0", /* white */
/* 8 bright colors */
[8] = "#555753", /* black */
[9] = "#ef2929", /* red */
[10] = "#8ae234", /* green */
[11] = "#fce94f", /* yellow */
[12] = "#729fcf", /* blue */
[13] = "#ad7fa8", /* magenta */
[14] = "#34e2e2", /* cyan */
[15] = "#eeeeec", /* white */
[8] = "#4c566a", /* black */
[9] = "#bf616a", /* red */
[10] = "#a3be8c", /* green */
[11] = "#ebcb8b", /* yellow */
[12] = "#81a1c1", /* blue */
[13] = "#b48ead", /* magenta */
[14] = "#8fbcbb", /* cyan */
[15] = "#eceff4", /* white */
/* special colors */
[256] = "#000000", /* background */
[257] = "#ffffff", /* foreground */
[256] = "#0f111a", /* background */
[257] = "#d8dee9", /* foreground */
};
/*
* Default colors (colorname index)
* foreground, background, cursor, reverse cursor
@ -194,7 +195,6 @@ static MouseShortcut mshortcuts[] = {
static unsigned int cursorstyle = 1;
static Rune stcursor = 0x2603; /* snowman (U+2603) */
char *iso14755_cmd = "dmenu -w \"$WINDOWID\" -p codepoint: </dev/null";
static Shortcut shortcuts[] = {
/* mask keysym function argument */


+ 1
- 1
suckless/st/config.mk View File

@ -16,7 +16,7 @@ PKG_CONFIG = pkg-config
INCS = -I$(X11INC) \
`$(PKG_CONFIG) --cflags fontconfig` \
`$(PKG_CONFIG) --cflags freetype2`
LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \
LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft -lXrender\
`$(PKG_CONFIG) --libs fontconfig` \
`$(PKG_CONFIG) --libs freetype2`


+ 163
- 0
suckless/st/patches/st-alpha-0.8.2.diff View File

@ -0,0 +1,163 @@
diff --git a/config.def.h b/config.def.h
index 0e01717..e116631 100644
--- a/config.def.h
+++ b/config.def.h
@@ -82,6 +82,9 @@ char *termname = "st-256color";
*/
unsigned int tabspaces = 8;
+/* bg opacity */
+float alpha = 0.8;
+
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
/* 8 normal colors */
@@ -109,6 +112,7 @@ static const char *colorname[] = {
/* more colors can be added after 255 to use with DefaultXX */
"#cccccc",
"#555555",
+ "black",
};
@@ -117,7 +121,7 @@ static const char *colorname[] = {
* foreground, background, cursor, reverse cursor
*/
unsigned int defaultfg = 7;
-unsigned int defaultbg = 0;
+unsigned int defaultbg = 258;
static unsigned int defaultcs = 256;
static unsigned int defaultrcs = 257;
diff --git a/config.mk b/config.mk
index 0cbb002..1d2f0e2 100644
--- a/config.mk
+++ b/config.mk
@@ -16,7 +16,7 @@ PKG_CONFIG = pkg-config
INCS = -I$(X11INC) \
`$(PKG_CONFIG) --cflags fontconfig` \
`$(PKG_CONFIG) --cflags freetype2`
-LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \
+LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft -lXrender\
`$(PKG_CONFIG) --libs fontconfig` \
`$(PKG_CONFIG) --libs freetype2`
diff --git a/st.h b/st.h
index 38c61c4..b7634ab 100644
--- a/st.h
+++ b/st.h
@@ -120,3 +120,4 @@ extern char *termname;
extern unsigned int tabspaces;
extern unsigned int defaultfg;
extern unsigned int defaultbg;
+extern float alpha;
diff --git a/x.c b/x.c
index 0422421..588dec3 100644
--- a/x.c
+++ b/x.c
@@ -98,6 +98,7 @@ typedef struct {
XSetWindowAttributes attrs;
int scr;
int isfixed; /* is fixed geometry? */
+ int depth; /* bit depth */
int l, t; /* left and top offset */
int gm; /* geometry mask */
} XWindow;
@@ -229,6 +230,7 @@ static char *usedfont = NULL;
static double usedfontsize = 0;
static double defaultfontsize = 0;
+static char *opt_alpha = NULL;
static char *opt_class = NULL;
static char **opt_cmd = NULL;
static char *opt_embed = NULL;
@@ -688,7 +690,7 @@ xresize(int col, int row)
XFreePixmap(xw.dpy, xw.buf);
xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h,
- DefaultDepth(xw.dpy, xw.scr));
+ xw.depth);
XftDrawChange(xw.draw, xw.buf);
xclear(0, 0, win.w, win.h);
@@ -748,6 +750,13 @@ xloadcols(void)
else
die("could not allocate color %d\n", i);
}
+
+ /* set alpha value of bg color */
+ if (opt_alpha)
+ alpha = strtof(opt_alpha, NULL);
+ dc.col[defaultbg].color.alpha = (unsigned short)(0xffff * alpha);
+ dc.col[defaultbg].pixel &= 0x00FFFFFF;
+ dc.col[defaultbg].pixel |= (unsigned char)(0xff * alpha) << 24;
loaded = 1;
}
@@ -1004,11 +1013,23 @@ xinit(int cols, int rows)
Window parent;
pid_t thispid = getpid();
XColor xmousefg, xmousebg;
+ XWindowAttributes attr;
+ XVisualInfo vis;
if (!(xw.dpy = XOpenDisplay(NULL)))
die("can't open display\n");
xw.scr = XDefaultScreen(xw.dpy);
- xw.vis = XDefaultVisual(xw.dpy, xw.scr);
+
+ if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0)))) {
+ parent = XRootWindow(xw.dpy, xw.scr);
+ xw.depth = 32;
+ } else {
+ XGetWindowAttributes(xw.dpy, parent, &attr);
+ xw.depth = attr.depth;
+ }
+
+ XMatchVisualInfo(xw.dpy, xw.scr, xw.depth, TrueColor, &vis);
+ xw.vis = vis.visual;
/* font */
if (!FcInit())
@@ -1018,7 +1039,7 @@ xinit(int cols, int rows)
xloadfonts(usedfont, 0);
/* colors */
- xw.cmap = XDefaultColormap(xw.dpy, xw.scr);
+ xw.cmap = XCreateColormap(xw.dpy, parent, xw.vis, None);
xloadcols();
/* adjust fixed window geometry */
@@ -1038,19 +1059,15 @@ xinit(int cols, int rows)
| ButtonMotionMask | ButtonPressMask | ButtonReleaseMask;
xw.attrs.colormap = xw.cmap;
- if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0))))
- parent = XRootWindow(xw.dpy, xw.scr);
xw.win = XCreateWindow(xw.dpy, parent, xw.l, xw.t,
- win.w, win.h, 0, XDefaultDepth(xw.dpy, xw.scr), InputOutput,
+ win.w, win.h, 0, xw.depth, InputOutput,
xw.vis, CWBackPixel | CWBorderPixel | CWBitGravity
| CWEventMask | CWColormap, &xw.attrs);
memset(&gcvalues, 0, sizeof(gcvalues));
gcvalues.graphics_exposures = False;
- dc.gc = XCreateGC(xw.dpy, parent, GCGraphicsExposures,
- &gcvalues);
- xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h,
- DefaultDepth(xw.dpy, xw.scr));
+ xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, xw.depth);
+ dc.gc = XCreateGC(xw.dpy, xw.buf, GCGraphicsExposures, &gcvalues);
XSetForeground(xw.dpy, dc.gc, dc.col[defaultbg].pixel);
XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, win.w, win.h);
@@ -1894,6 +1911,9 @@ main(int argc, char *argv[])
case 'a':
allowaltscreen = 0;
break;
+ case 'A':
+ opt_alpha = EARGF(usage());
+ break;
case 'c':
opt_class = EARGF(usage());
break;

suckless/st/st-universcroll-0.8.4.diff → suckless/st/patches/st-universcroll-0.8.4.diff View File


+ 1
- 0
suckless/st/st.h View File

@ -125,4 +125,5 @@ extern char *termname;
extern unsigned int tabspaces;
extern unsigned int defaultfg;
extern unsigned int defaultbg;
extern float alpha;
extern char *iso14755_cmd;

+ 30
- 10
suckless/st/x.c View File

@ -106,6 +106,7 @@ typedef struct {
XSetWindowAttributes attrs;
int scr;
int isfixed; /* is fixed geometry? */
int depth; /* bit depth */
int l, t; /* left and top offset */
int gm; /* geometry mask */
} XWindow;
@ -246,6 +247,7 @@ static char *usedfont = NULL;
static double usedfontsize = 0;
static double defaultfontsize = 0;
static char *opt_alpha = NULL;
static char *opt_class = NULL;
static char **opt_cmd = NULL;
static char *opt_embed = NULL;
@ -740,7 +742,7 @@ xresize(int col, int row)
XFreePixmap(xw.dpy, xw.buf);
xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h,
DefaultDepth(xw.dpy, xw.scr));
xw.depth);
XftDrawChange(xw.draw, xw.buf);
xclear(0, 0, win.w, win.h);
@ -800,6 +802,13 @@ xloadcols(void)
else
die("could not allocate color %d\n", i);
}
/* set alpha value of bg color */
if (opt_alpha)
alpha = strtof(opt_alpha, NULL);
dc.col[defaultbg].color.alpha = (unsigned short)(0xffff * alpha);
dc.col[defaultbg].pixel &= 0x00FFFFFF;
dc.col[defaultbg].pixel |= (unsigned char)(0xff * alpha) << 24;
loaded = 1;
}
@ -1204,11 +1213,23 @@ xinit(int cols, int rows)
Window parent;
pid_t thispid = getpid();
XColor xmousefg, xmousebg;
XWindowAttributes attr;
XVisualInfo vis;
if (!(xw.dpy = XOpenDisplay(NULL)))
die("can't open display\n");
xw.scr = XDefaultScreen(xw.dpy);
xw.vis = XDefaultVisual(xw.dpy, xw.scr);
if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0)))) {
parent = XRootWindow(xw.dpy, xw.scr);
xw.depth = 32;
} else {
XGetWindowAttributes(xw.dpy, parent, &attr);
xw.depth = attr.depth;
}
XMatchVisualInfo(xw.dpy, xw.scr, xw.depth, TrueColor, &vis);
xw.vis = vis.visual;
/* font */
if (!FcInit())
@ -1221,7 +1242,7 @@ xinit(int cols, int rows)
xloadsparefonts();
/* colors */
xw.cmap = XDefaultColormap(xw.dpy, xw.scr);
xw.cmap = XCreateColormap(xw.dpy, parent, xw.vis, None);
xloadcols();
/* adjust fixed window geometry */
@ -1241,19 +1262,15 @@ xinit(int cols, int rows)
| ButtonMotionMask | ButtonPressMask | ButtonReleaseMask;
xw.attrs.colormap = xw.cmap;
if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0))))
parent = XRootWindow(xw.dpy, xw.scr);
xw.win = XCreateWindow(xw.dpy, parent, xw.l, xw.t,
win.w, win.h, 0, XDefaultDepth(xw.dpy, xw.scr), InputOutput,
win.w, win.h, 0, xw.depth, InputOutput,
xw.vis, CWBackPixel | CWBorderPixel | CWBitGravity
| CWEventMask | CWColormap, &xw.attrs);
memset(&gcvalues, 0, sizeof(gcvalues));
gcvalues.graphics_exposures = False;
dc.gc = XCreateGC(xw.dpy, parent, GCGraphicsExposures,
&gcvalues);
xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h,
DefaultDepth(xw.dpy, xw.scr));
xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, xw.depth);
dc.gc = XCreateGC(xw.dpy, xw.buf, GCGraphicsExposures, &gcvalues);
XSetForeground(xw.dpy, dc.gc, dc.col[defaultbg].pixel);
XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, win.w, win.h);
@ -2127,6 +2144,9 @@ main(int argc, char *argv[])
case 'a':
allowaltscreen = 0;
break;
case 'A':
opt_alpha = EARGF(usage());
break;
case 'c':
opt_class = EARGF(usage());
break;


+ 1
- 1
zsh/antibody/zsh_plugins.txt View File

@ -8,6 +8,6 @@ zsh-users/zsh-syntax-highlighting
zsh-users/zsh-history-substring-search
zsh-users/zsh-autosuggestions
le0me55i/zsh-extract
Aloxaf/fzf-tab
# Aloxaf/fzf-tab
rupa/z

BIN
zsh/secret.secret View File


+ 37
- 0
zsh/zshrc View File

@ -44,3 +44,40 @@ export KEYTIMEOUT=5
# added by travis gem
[ ! -s /home/yigit/.travis/travis.sh ] || source /home/yigit/.travis/travis.sh
function x11-clip-wrap-widgets() {
local copy_or_paste=$1
shift
for widget in $@; do
if [[ $copy_or_paste == "copy" ]]; then
eval "
function _x11-clip-wrapped-$widget() {
zle .$widget
xclip -in -selection clipboard <<<\$CUTBUFFER
}
"
else
eval "
function _x11-clip-wrapped-$widget() {
CUTBUFFER=\$(xclip -out -selection clipboard)
zle .$widget
}
"
fi
zle -N $widget _x11-clip-wrapped-$widget
done
}
local copy_widgets=(
vi-yank vi-yank-eol vi-delete vi-backward-kill-word vi-change-whole-line
)
local paste_widgets=(
vi-put-{before,after}
)
x11-clip-wrap-widgets copy $copy_widgets
x11-clip-wrap-widgets paste $paste_widgets

Loading…
Cancel
Save