@ -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" |
@ -0,0 +1,6 @@ | |||
apts | |||
.apts | |||
.calcurse.pid | |||
notes | |||
todo | |||
caldav/sync.db |
@ -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 - |
@ -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 |
@ -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!" |
@ -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 | |||
@ -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; |