diff --git a/.config/compton/compton.conf b/.config/compton/compton.conf index c1d0dff..fb630c5 100755 --- a/.config/compton/compton.conf +++ b/.config/compton/compton.conf @@ -32,30 +32,7 @@ detect-client-leader = true; invert-color-include = [ ]; glx-copy-from-front = false; glx-swap-method = "undefined"; -opacity-rule = [ "99:name *?= 'Call'", -"99:class_g = 'Chromium'", -"99:name *?= 'Conky'", -"99:class_g = 'Darktable'", -"50:class_g = 'Dmenu'", -"99:name *?= 'Event'", -"99:class_g = 'Firefox'", -"99:class_g = 'GIMP'", -"99:name *?= 'Image'", -"99:class_g = 'Lazpaint'", -"99:class_g = 'Midori'", -"99:name *?= 'Minitube'", -"99:class_g = 'Mousepad'", -"99:name *?= 'MuseScore'", -"90:name *?= 'Page Info'", -"90:name *?= 'Panel'", -"99:class_g = 'Pinta'", -"90:name *?= 'Restart'", -"99:name *?= 'sudo'", -"99:name *?= 'Screenshot'", -"99:class_g = 'Viewnior'", -"99:class_g = 'VirtualBox'", -"99:name *?= 'VLC'", -"99:name *?= 'Write'", +opacity-rule = [ "99:name *?= 'Call'", "95:name *?= 'Lynx'", "95:name *?= 'toot'", "95:name *?= 'nmon'", diff --git a/.config/vifm/colors/Default.vifm b/.config/vifm/colors/Default.vifm index b6a910e..91f23a6 100644 --- a/.config/vifm/colors/Default.vifm +++ b/.config/vifm/colors/Default.vifm @@ -46,23 +46,23 @@ highlight clear -highlight Win cterm=none ctermfg=white ctermbg=default -highlight Directory cterm=bold ctermfg=cyan ctermbg=default -highlight Link cterm=bold ctermfg=yellow ctermbg=default +highlight Win cterm=none ctermfg=default ctermbg=default +highlight Directory cterm=bold ctermfg=green ctermbg=default +highlight Link cterm=bold ctermfg=default ctermbg=default highlight BrokenLink cterm=bold ctermfg=red ctermbg=default highlight Socket cterm=bold ctermfg=magenta ctermbg=default highlight Device cterm=bold ctermfg=red ctermbg=default highlight Fifo cterm=bold ctermfg=cyan ctermbg=default -highlight Executable cterm=bold ctermfg=green ctermbg=default +highlight Executable cterm=bold ctermfg=red ctermbg=default highlight Selected cterm=bold ctermfg=magenta ctermbg=default -highlight CurrLine cterm=bold,reverse ctermfg=default ctermbg=default -highlight TopLine cterm=none ctermfg=147 ctermbg=red +highlight CurrLine cterm=bold,reverse ctermfg=4 ctermbg=black +highlight TopLine cterm=none ctermfg=147 ctermbg=8 highlight TopLineSel cterm=bold ctermfg=white ctermbg=default -highlight StatusLine cterm=bold ctermfg=white ctermbg=red +highlight StatusLine cterm=bold ctermfg=white ctermbg=8 highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black -highlight CmdLine cterm=none ctermfg=white ctermbg=black +highlight CmdLine cterm=none ctermfg=green ctermbg=black highlight ErrorMsg cterm=none ctermfg=red ctermbg=black -highlight Border cterm=none ctermfg=black ctermbg=red +highlight Border cterm=none ctermfg=black ctermbg=8 highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=white highlight SuggestBox cterm=bold ctermfg=default ctermbg=default highlight CmpMismatch cterm=bold ctermfg=white ctermbg=red diff --git a/.surf/bookmarks b/.surf/bookmarks index 0062595..070d0ac 100644 --- a/.surf/bookmarks +++ b/.surf/bookmarks @@ -1,3 +1,4 @@ +distrowatch.com/ https://gitlab.com/dwt1 https://www.youtube.com/c/DistroTube/ https://www.patreon.com/distrotube @@ -9,4 +10,4 @@ https://forum.members.fsf.org/ google.com/?gws_rd=ssl suckless.org/ https://distrowatch.com/ -https://www.omgubuntu.co.uk/ \ No newline at end of file +https://www.omgubuntu.co.uk/ diff --git a/dwm/selfrestart.c b/dwm/selfrestart.c new file mode 100755 index 0000000..d695d48 --- /dev/null +++ b/dwm/selfrestart.c @@ -0,0 +1,65 @@ +#include +#include +#include +#include +#include + +/** + * Magically finds the current's executable path + * + * I'm doing the do{}while(); trick because Linux (what I'm running) is not + * POSIX compilant and so lstat() cannot be trusted on /proc entries + * + * @return char* the path of the current executable + */ +char *get_dwm_path(){ + struct stat s; + int r, length, rate = 42; + char *path = NULL; + + if(lstat("/proc/self/exe", &s) == -1){ + perror("lstat:"); + return NULL; + } + + length = s.st_size + 1 - rate; + + do{ + length+=rate; + + free(path); + path = malloc(sizeof(char) * length); + + if(path == NULL){ + perror("malloc:"); + return NULL; + } + + r = readlink("/proc/self/exe", path, length); + + if(r == -1){ + perror("readlink:"); + return NULL; + } + }while(r >= length); + + path[r] = '\0'; + + return path; +} + +/** + * self-restart + * + * Initially inspired by: Yu-Jie Lin + * https://sites.google.com/site/yjlnotes/notes/dwm + */ +void self_restart(const Arg *arg) { + char *const argv[] = {get_dwm_path(), NULL}; + + if(argv[0] == NULL){ + return; + } + + execv(argv[0], argv); +}