Browse Source

Configuration

main
Yigit Colakoglu 4 years ago
parent
commit
bd2823e0eb
26 changed files with 377 additions and 31 deletions
  1. +251
    -0
      .ccls-cache/@home@yigit@.dotfiles/suckless@surf@config.h
  2. BIN
      .ccls-cache/@home@yigit@.dotfiles/suckless@surf@config.h.blob
  3. BIN
      .gitsecret/keys/random_seed
  4. +1
    -1
      .gitsecret/paths/mapping.cfg
  5. +1
    -0
      arch-setup/chroot.sh
  6. +5
    -2
      arch-setup/packages.base.artix
  7. +8
    -0
      arch-setup/packages.rice
  8. +1
    -0
      config/.gitignore
  9. +5
    -5
      config/X11/xinitrc
  10. BIN
      config/calcurse/caldav/config.secret
  11. BIN
      config/isync/mbsyncrc.secret
  12. BIN
      config/msmtp/config.secret
  13. BIN
      config/nextcloud/nextcloud.secret
  14. BIN
      config/spotifyd/spotifyd.conf.secret
  15. +15
    -0
      config/surf/styles/default.css
  16. BIN
      config/zsh/secret.secret
  17. +9
    -4
      install.sh
  18. +1
    -1
      local/bin/.gitignore
  19. +30
    -0
      local/bin/check-updates
  20. +2
    -0
      local/bin/firefox-sync
  21. +11
    -11
      local/bin/mailsync
  22. +12
    -5
      local/bin/status-bar/arch
  23. +1
    -1
      notes/firefox.md
  24. +4
    -0
      profile
  25. +19
    -0
      root/quark
  26. +1
    -1
      suckless/surf/config.h

+ 251
- 0
.ccls-cache/@home@yigit@.dotfiles/suckless@surf@config.h View File

@ -0,0 +1,251 @@
/* modifier 0 means no modifier */
static int surfuseragent = 0; /* Append Surf version to default WebKit user agent */
static char *fulluseragent = "Mozilla/5.0 (X11; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0"; /* Or override the whole user agent string */
static char *scriptfiles[] = {
"~/.config/surf/scripts/default.js",
};
static char *styledir = "~/.config/surf/styles/";
static char *certdir = "~/.cache/surf/certificates/";
static char *cachedir = "~/.cache/surf/cache/";
static char *historyfile = "~/.cache/surf/history.txt";
static char *cookiefile = "~/.cache/surf/cookies.txt";
static char *searchengine = "https://google.com/search?q=";
static char **plugindirs = (char*[]){
"~/.config/surf/plugins/",
LIBPREFIX "/mozilla/plugins/",
NULL
};
/* Webkit default features */
/* Highest priority value will be used.
* Default parameters are priority 0
* Per-uri parameters are priority 1
* Command parameters are priority 2
*/
static Parameter defconfig[ParameterLast] = {
/* parameter Arg value priority */
[AcceleratedCanvas] = { { .i = 1 }, },
[AccessMicrophone] = { { .i = 0 }, },
[AccessWebcam] = { { .i = 0 }, },
[Certificate] = { { .i = 0 }, },
[CaretBrowsing] = { { .i = 0 }, },
[CookiePolicies] = { { .v = "A" }, },
[DefaultCharset] = { { .v = "UTF-8" }, },
[DiskCache] = { { .i = 1 }, },
[DNSPrefetch] = { { .i = 0 }, },
[Ephemeral] = { { .i = 0 }, },
[FileURLsCrossAccess] = { { .i = 0 }, },
[FontSize] = { { .i = 12 }, },
[FrameFlattening] = { { .i = 0 }, },
[Geolocation] = { { .i = 0 }, },
[HideBackground] = { { .i = 0 }, },
[Inspector] = { { .i = 0 }, },
[Java] = { { .i = 1 }, },
[JavaScript] = { { .i = 1 }, },
[KioskMode] = { { .i = 0 }, },
[LoadImages] = { { .i = 1 }, },
[MediaManualPlay] = { { .i = 1 }, },
[Plugins] = { { .i = 1 }, },
[PreferredLanguages] = { { .v = (char *[]){ NULL } }, },
[RunInFullscreen] = { { .i = 0 }, },
[ScrollBars] = { { .i = 1 }, },
[ShowIndicators] = { { .i = 1 }, },
[SiteQuirks] = { { .i = 1 }, },
[SmoothScrolling] = { { .i = 0 }, },
[SpellChecking] = { { .i = 0 }, },
[SpellLanguages] = { { .v = ((char *[]){ "en_US", NULL }) }, },
[StrictTLS] = { { .i = 1 }, },
[Style] = { { .i = 1 }, },
[WebGL] = { { .i = 0 }, },
[ZoomLevel] = { { .f = 1.0 }, },
[ClipboardNotPrimary] = { { .i = 1 }, },
};
#define SETURI(p) { .v = (char *[]){ "/bin/sh", "-c", \
"prop=\"`surf_history_dmenu.sh`\" &&" \
"xprop -id $1 -f $0 8s -set $0 \"$prop\"", \
p, winid, NULL } }
static UriParameters uriparams[] = {
{ "(://|\\.)suckless\\.org(/|$)", {
[JavaScript] = { { .i = 0 }, 1 },
[Plugins] = { { .i = 0 }, 1 },
}, },
};
/* default window size: width, height */
static int winsize[] = { 800, 600 };
static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE |
WEBKIT_FIND_OPTIONS_WRAP_AROUND;
#define PROMPT_GO "Go:"
#define PROMPT_FIND "Find:"
/* SETPROP(readprop, setprop, prompt)*/
#define SETPROP(r, s, p) { \
.v = (const char *[]){ "/bin/sh", "-c", \
"prop=\"$(printf '%b' \"$(xprop -id $1 $2 " \
"| sed \"s/^$2(STRING) = //;s/^\\\"\\(.*\\)\\\"$/\\1/\" && cat ~/.config/surf/bookmarks)\" " \
"| dmenu -l 10 -p \"$4\" -w $1)\" && " \
"xprop -id $1 -f $3 8s -set $3 \"$prop\"", \
"surf-setprop", winid, r, s, p, NULL \
} \
}
/* DOWNLOAD(URI, referer) */
#define DOWNLOAD(d, r) { \
.v = (char *[]){ "/bin/sh", "-c", \
"cd ~/Downloads;"\
"st -e /bin/sh -c \"aria2c -U '$1'" \
" --referer '$2' --load-cookies $3 --save-cookies $3 '$0';" \
" sleep 3;\"", \
d, useragent, r, cookiefile, NULL \
} \
}
/* PLUMB(URI) */
/* This called when some URI which does not begin with "about:",
* "http://" or "https://" should be opened.
*/
#define PLUMB(u) {\
.v = (const char *[]){ "/bin/sh", "-c", \
"xdg-open \"$0\"", u, NULL \
} \
}
/* VIDEOPLAY(URI) */
#define VIDEOPLAY(u) {\
.v = (const char *[]){ "/bin/sh", "-c", \
"mpv --really-quiet \"$0\"", u, NULL \
} \
}
/* BM_ADD(readprop) */
#define BM_ADD(r) {\
.v = (const char *[]){ "/bin/sh", "-c", \
"(echo $(xprop -id $0 $1) | cut -d '\"' -f2 " \
"| sed 's/.*https*:\\/\\/\\(www\\.\\)\\?//' && cat ~/.config/surf/bookmarks) " \
"| awk '!seen[$0]++' > ~/.config/surf/bookmarks.tmp && " \
"mv ~/.config/surf/bookmarks.tmp ~/.config/surf/bookmarks", \
winid, r, NULL \
} \
}
/* styles */
/*
* The iteration will stop at the first match, beginning at the beginning of
* the list.
*/
static SiteSpecific styles[] = {
/* regexp file in $styledir */
{ ".*", "localwiki.css" },
};
/* certificates */
/*
* Provide custom certificate for urls
*/
static SiteSpecific certs[] = {
/* regexp file in $certdir */
{ "://suckless\\.org/", "suckless.org.crt" },
};
#define MODKEY GDK_CONTROL_MASK
static char *linkselect_curwin [] = { "/bin/sh", "-c",
"surf_linkselect.sh $0 'Link' | xargs -r xprop -id $0 -f _SURF_GO 8s -set _SURF_GO",
winid, NULL
};
static char *linkselect_newwin [] = { "/bin/sh", "-c",
"surf_linkselect.sh $0 'Link (new window)' | xargs -r /home/yigit/.scripts/tabbed_surf",
winid, NULL
};
static char *editscreen[] = { "/bin/sh", "-c", "edit_screen.sh", NULL };
#define WATCH {.v = (char *[]){ "/bin/sh", "-c", \
"/home/yigit/.scripts/watch_mpv.sh $(xprop -id $0 _SURF_URI | cut -d \\\" -f 2)", \
winid, NULL } }
#define WALLABAG {.v = (char *[]){ "/bin/sh", "-c", \
"wallabag add $(xprop -id $0 _SURF_URI | cut -d '\"' -f 2) ; echo test > /tmp/aaa", \
winid, NULL }}
/* hotkeys */
/*
* If you use anything else but MODKEY and GDK_SHIFT_MASK, don't forget to
* edit the CLEANMASK() macro.
*/
static Key keys[] = {
/* modifier keyval function arg */
{ 0, GDK_KEY_i, insert, { .i = 1 } },
{ 0, GDK_KEY_Escape, insert, { .i = 0 } },
{ 0, GDK_KEY_o, spawn, SETPROP("_SURF_URI", "_SURF_GO", PROMPT_GO) },
{ MODKEY, GDK_KEY_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND", PROMPT_FIND) },
{ MODKEY, GDK_KEY_b, spawn, BM_ADD("_SURF_URI") },
{ 0, GDK_KEY_Escape, stop, { 0 } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_r, reload, { .i = 1 } },
{ MODKEY, GDK_KEY_r, reload, { .i = 0 } },
{ 0, GDK_KEY_l, navigate, { .i = +1 } },
{ 0, GDK_KEY_h, navigate, { .i = -1 } },
/* vertical and horizontal scrolling, in viewport percentage */
{ 0, GDK_KEY_j, scrollv, { .i = +10 } },
{ 0, GDK_KEY_k, scrollv, { .i = -10 } },
{ 0, GDK_KEY_space, scrollv, { .i = +50 } },
{ 0, GDK_KEY_b, scrollv, { .i = -50 } },
{ 0, GDK_KEY_u, scrollh, { .i = -10 } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_j, zoom, { .i = -1 } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_k, zoom, { .i = +1 } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_q, zoom, { .i = 0 } },
{ MODKEY, GDK_KEY_minus, zoom, { .i = -1 } },
{ MODKEY, GDK_KEY_plus, zoom, { .i = +1 } },
{ 0, GDK_KEY_p, clipboard, { .i = 1 } },
{ 0, GDK_KEY_y, clipboard, { .i = 0 } },
{ 0, GDK_KEY_n, find, { .i = +1 } },
{ GDK_SHIFT_MASK, GDK_KEY_n, find, { .i = -1 } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_p, print, { 0 } },
{ MODKEY, GDK_KEY_t, showcert, { 0 } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_a, togglecookiepolicy, { 0 } },
{ 0, GDK_KEY_F11, togglefullscreen, { 0 } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_o, toggleinspector, { 0 } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_c, toggle, { .i = CaretBrowsing } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_g, toggle, { .i = Geolocation } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_s, toggle, { .i = JavaScript } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_i, toggle, { .i = LoadImages } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_v, toggle, { .i = Plugins } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_b, toggle, { .i = ScrollBars } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_t, toggle, { .i = StrictTLS } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_m, toggle, { .i = Style } },
{ MODKEY, GDK_KEY_d, externalpipe, { .v = linkselect_curwin } },
{ GDK_SHIFT_MASK|MODKEY, GDK_KEY_d, externalpipe, { .v = linkselect_newwin } },
{ MODKEY, GDK_KEY_o, externalpipe, { .v = editscreen } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_w, spawn, WATCH },
{ MODKEY, GDK_KEY_m, spawn, WALLABAG },
{ MODKEY , GDK_KEY_Return, spawn, SETURI("_SURF_GO") },
};
/* button definitions */
/* target can be OnDoc, OnLink, OnImg, OnMedia, OnEdit, OnBar, OnSel, OnAny */
static Button buttons[] = {
/* target event mask button function argument stop event */
{ OnLink, 0, 2, clicknewwindow, { .i = 0 }, 1 },
{ OnLink, MODKEY, 2, clicknewwindow, { .i = 0 }, 1 },
{ OnLink, MODKEY, 1, clicknewwindow, { .i = 0 }, 1 },
{ OnAny, 0, 8, clicknavigate, { .i = -1 }, 1 },
{ OnAny, 0, 9, clicknavigate, { .i = +1 }, 1 },
{ OnMedia, MODKEY, 1, clickexternplayer, { 0 }, 1 },
};
#define HOMEPAGE "http://localhost:9999"

BIN
.ccls-cache/@home@yigit@.dotfiles/suckless@surf@config.h.blob View File


BIN
.gitsecret/keys/random_seed View File


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

@ -4,5 +4,5 @@ config/calcurse/caldav/config:deb0fa27c7b788836034d168b2f5f401caeb9ec35dd9bd5913
config/zsh/secret:6a6b4e0d168adcfbbf31c969598c6897d6637efebc3ed3b34e1e0a5e0afed9af
config/nextcloud/nextcloud:15de37aa910734dd275f2a71fc292f1f84951bc8a57d8b1eee26b2a1dcf66c6d
config/spotifyd/spotifyd.conf:2365689856e64f966846c0e33b5fc31f3a3a1a571e4e2ca65bebfd660f8e83cf
config/wakatime/.wakatime.cfg:e306146d45036c38f15aa9a817fc172bdca3c4c9d9ed3c4f6fe1d8d93d783d78
config/wakatime/.wakatime.cfg:82a89ad69a5440d31054a58e81d21e769c89b2f455172960059478f9639070c4
config/vdirsyncer/config:66055a713d4985c168a40cd1c07debacb76316a45f4b638c1aaf8c61f7515978

+ 1
- 0
arch-setup/chroot.sh View File

@ -238,6 +238,7 @@ if [ -f "/install/artix" ]; then
sudo rc-update add cronie
sudo rc-update add acpi
sudo rc-update add dbus
sudo rc-update add syslog-ng
else
systemctl enable NetworkManager
systemctl enable cronie


+ 5
- 2
arch-setup/packages.base.artix View File

@ -1,4 +1,3 @@
networkmanager-openrc
efibootmgr
refind
python
@ -16,6 +15,10 @@ curl
dash
mksh
acpi
acpi-openrc
dbus
syslog-ng
avahi-openrc
acpi-openrc
dbus-openrc
syslog-ng-openrc
networkmanager-openrc

+ 8
- 0
arch-setup/packages.rice View File

@ -32,3 +32,11 @@ ncmpcpp
cmake
opencv
xmenu
pacman-contrib
clipmenu
clipnotify
polkit-gnome
gnome-keyring
feh
sxiv
udevil

+ 1
- 0
config/.gitignore View File

@ -52,6 +52,7 @@
!readline/**
!spotifyd
!surf
!surf/**
!tmate
!tmate/**
!tmux


+ 5
- 5
config/X11/xinitrc View File

@ -46,11 +46,7 @@ mpd-mpris &
touch ~/.cache/nextcloud-track
xss-lock -- slock &
picom --no-fading-openclose &
if [ "$BROWSER" = "firefox" ]; then
~/.local/bin/firefox-sync
fi
$BROWSER &
bitwarden-desktop &
~/.local/bin/firefox-sync
curl 'http://yeetclock/setcolor?R=136&G=192&B=208' &
dunst &
@ -67,6 +63,10 @@ xset dpms 600 600 600
--exec-on-unmount "/sbin/notify-send '禍 drive unmounted' '%l (%f) from %d '" \
--no-unmount --no-gui &
$BROWSER &
bitwarden-desktop &
touch ~/.cache/dwm-restart
while [ -f /home/yigit/.cache/dwm-restart ];
do


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


BIN
config/isync/mbsyncrc.secret View File


BIN
config/msmtp/config.secret View File


BIN
config/nextcloud/nextcloud.secret View File


BIN
config/spotifyd/spotifyd.conf.secret View File


+ 15
- 0
config/surf/styles/default.css View File

@ -0,0 +1,15 @@
*,div,pre,textarea,body,input,td,tr,p {
background-color: #202020 !important;
background-image: none !important;
color: #bbbbbb !important;
}
h1,h2,h3,h4 {
background-color: #202020 !important;
color: #b8ddea !important;
}
img {
opacity: .5;
}
img:hover {
opacity: 1;
}

BIN
config/zsh/secret.secret View File


+ 9
- 4
install.sh View File

@ -105,10 +105,10 @@ mc cp -r fr1nge-dots/dotfiles/backgrounds/ ~/.local/backgrounds/
if [ ! -f "/var/spool/cron/$username" ]; then
sudo touch "/var/spool/cron/$username"
sudo chown $username:$username "/var/spool/cron/$username"
sudo chmod 755 "/var/spool/cron/$username"
sudo chmod 0644 "/var/spool/cron/$username"
echo "*/8 * * * * /home/$username/.local/bin/mailsync" > /var/spool/cron/$username
echo "*/15 * * * * /home/$username/.local/bin/nextcloud-sync" >> /var/spool/cron/$username
echo "* */1 * * * /home/$username/.local/bin/check-updates" >> /var/spool/cron/$username
echo "0 * * * * /home/$username/.local/bin/check-updates" >> /var/spool/cron/$username
echo "*/30 * * * * /home/$username/.local/bin/firefox-sync" >> /var/spool/cron/$username
echo "*/30 * * * * calcurse-caldav" >> /var/spool/cron/$username
echo "*/30 * * * * vdirsyncer sync" >> /var/spool/cron/$username
@ -119,7 +119,7 @@ else
cp /var/spool/cron/$username ~/.dotfiles_backup/crontab
echo "*/8 * * * * /home/$username/.local/bin/mailsync" > /var/spool/cron/$username
echo "*/15 * * * * /home/$username/.local/bin/nextcloud-sync" >> /var/spool/cron/$username
echo "* */1 * * * /home/$username/.local/bin/check-updates" >> /var/spool/cron/$username
echo "0 * * * * /home/$username/.local/bin/check-updates" >> /var/spool/cron/$username
echo "*/30 * * * * /home/$username/.local/bin/firefox-sync" >> /var/spool/cron/$username
echo "*/30 * * * * calcurse-caldav" >> /var/spool/cron/$username
echo "*/30 * * * * vdirsyncer sync" >> /var/spool/cron/$username
@ -154,7 +154,11 @@ sudo cp ~/.dotfiles/root/dwm.desktop /usr/share/xsessions
sudo cp ~/.dotfiles/root/issue /etc/issue
sudo cp ~/.dotfiles/root/motd /etc/motd
sudo cp ~/.dotfiles/root/nancyj.flf /usr/share/figlet/fonts
sudo cp ~/.dotfiles/root/quark.service /usr/lib/systemd/system
if [ "$(grep artix < $(uname -a))" = "" ]; then
sudo cp ~/.dotfiles/root/quark /etc/init.d
else
sudo cp ~/.dotfiles/root/quark.service /usr/lib/systemd/system
fi
sudo cp ~/.dotfiles/root/kdialog /usr/local/bin/kdialog
sudo cp ~/.dotfiles/root/udevil.conf /etc/udevil/udevil.conf
sudo chmod +x /usr/local/bin/kdialog
@ -182,6 +186,7 @@ echo "Installing Icons"
echo "Setting up start page"
prev=$(pwd)
cd ~/.dotfiles/browser/startpage
sudo npm install -g parcel-bundler
npm install > /dev/null 2> /dev/null
npm run build > /dev/null 2> /dev/null
cd $prev


+ 1
- 1
local/bin/.gitignore View File

@ -59,4 +59,4 @@
!ytfzf_dmenu
!zaread
!texclear
!check-updated
!check-updates

+ 30
- 0
local/bin/check-updates View File

@ -0,0 +1,30 @@
#!/bin/sh
case "$(readlink -f /sbin/init)" in
*systemd*) export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus ;;
esac
ping -q -c 1 example.org > /dev/null || exit
pgrepoutput="$(pgrep -a X\(org\|wayland\))"
displays="$(echo "$pgrepoutput" | grep -wo "[0-9]*:[0-9]\+" | sort -u)"
notify() {
[ -n "$pgrepoutput" ] && for x in ${displays:-:0}; do
export DISPLAY=$x
notify-send --app-name="auto-update" "$1" "$2"
done ;
}
notify " Repository Sync" "Checking for package updates..."
sudo pacman -Syyuw --noconfirm || notify " An error occured" "Error downloading updates.
Check your internet connection, if pacman is already running, or run update manually to see errors."
pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}"
if pacman -Qu | grep -v "\[ignored\]"
then
notify " Repository Sync" "Updates available. Click statusbar icon () for update."
else
notify " Repository Sync" "Sync complete. No new packages for update."
fi

+ 2
- 0
local/bin/firefox-sync View File

@ -1,5 +1,7 @@
#!/bin/bash
source ~/.profile
if [ ! "$BROWSER" = "firefox" ]; then
echo "Default browser is not firefox, exiting..."
exit 0


+ 11
- 11
local/bin/mailsync View File

@ -1,6 +1,5 @@
#!/bin/sh
export XDG_CONFIG_HOME="$HOME"/.config
export MBSYNCRC="$XDG_CONFIG_HOME"/isync/mbsyncrc
@ -18,7 +17,7 @@ export MBSYNCRC="$XDG_CONFIG_HOME"/isync/mbsyncrc
# Run only if user logged in (prevent cron errors)
pgrep -u "${USER:=$LOGNAME}" >/dev/null || { echo "$USER not logged in; sync will not run."; exit ;}
# Run only if not already running in other instance
pgrep -x mbsync >/dev/null && { echo "mbsync is already running." ; exit ;}
pidof -s mbsync >/dev/null && { echo "mbsync is already running." ; exit ;}
# First, we have to get the right variables for the mbsync file, the pass
# archive, notmuch and the GPG home. This is done by searching common profile
@ -26,7 +25,7 @@ pgrep -x mbsync >/dev/null && { echo "mbsync is already running." ; exit ;}
# will work on the maximum number of machines.
eval "$(grep -h -- \
"^\s*\(export \)\?\(MBSYNCRC\|PASSWORD_STORE_DIR\|NOTMUCH_CONFIG\|GNUPGHOME\)=" \
"$HOME/.profile" "$HOME/.bash_profile" "$HOME/.zprofile" "$HOME/.config/zsh/.zprofile" \
"$HOME/.profile" "$HOME/.bash_profile" "$HOME/.zprofile" "$HOME/.config/zsh/.zprofile" "$HOME/.zshenv" \
"$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.config/zsh/.zshrc" "$HOME/.pam_environment" 2>/dev/null)"
case "$(readlink -f /sbin/init)" in
@ -43,14 +42,16 @@ case "$(uname)" in
messageinfo() { osascript -e "display notification with title \"📧 $from\" subtitle \"$subject\"" ;}
;;
*)
displays="$(pgrep -a X\(org\|wayland\) | grep -wo "[0-9]*:[0-9]\+" | sort -u)"
notify() { for x in $displays; do
# remember if a display server is running since `ps` doesn't always contain a display
pgrepoutput="$(pgrep -a X\(org\|wayland\))"
displays="$(echo "$pgrepoutput" | grep -wo "[0-9]*:[0-9]\+" | sort -u)"
notify() { [ -n "$pgrepoutput" ] && for x in ${displays:-:0}; do
export DISPLAY=$x
notify-send --app-name="mutt-wizard" "📧mutt-wizard" "$(echo $2 | xargs) new mail(s) in \`$1\` account."
notify-send --app-name="mutt-wizard" "mutt-wizard" "ﯬ $2 new mail(s) in \`$1\` account."
done ;}
messageinfo() { for x in $displays; do
messageinfo() { [ -n "$pgrepoutput" ] && for x in ${displays:-:0}; do
export DISPLAY=$x
notify-send --app-name="mutt-wizard" "📧$from:" "$subject"
notify-send --app-name="mutt-wizard" " $from:" "$subject"
done ;}
;;
esac
@ -61,10 +62,8 @@ syncandnotify() {
if [ -z "$opts" ]; then mbsync "$acc"; else mbsync "$opts" "$acc"; fi
new=$(find "$HOME/.local/share/mail/$acc/INBOX/new/" "$HOME/.local/share/mail/$acc/Inbox/new/" "$HOME/.local/share/mail/$acc/inbox/new/" -type f -newer "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" 2> /dev/null)
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
echo -n "$newcount" > ~/.cache/mcount
date +"%R" > ~/.cache/msync
if [ "$newcount" -gt "0" ]; then
notify "$acc" "$newcount" &
notify "$acc" "$newcount" &
for file in $new; do
# Extract subject and sender from mail.
from=$(awk '/^From: / && ++n ==1,/^\<.*\>:/' "$file" | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | awk '{ $1=""; if (NF>=3)$NF=""; print $0 }' | sed 's/^[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//')
@ -92,4 +91,5 @@ done
wait
notmuch new 2>/dev/null
kill -57 $(pidof dwmblocks)

+ 12
- 5
local/bin/status-bar/arch View File

@ -1,17 +1,24 @@
#!/bin/sh
icon=
icon=
if ! updates=$(checkupdates 2> /dev/null | wc -l ); then
updates=0
if [ ! -f ~/.cache/pacman_updates ]; then
updates=0
else
updates=$(wc -l < ~/.cache/pacman_updates)
if [ "$updates" = "" ]; then
updates=0
fi
fi
checkupdates 2> /dev/null > ~/.cache/pacman_updates &
case $BLOCK_BUTTON in
1) PATH="/opt/google-cloud-sdk/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" setsid -f "$TERMINAL" -c center -n center -e yay -Syu;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
echo $updates > ~/.cache/pacman_updates
#echo "$ifg $icon $tfg$(cat ~/.cache/pacman_updates)"
echo "^c#a48ead^$icon ^d^ $(cat ~/.cache/pacman_updates)"
echo "^c#a48ead^$icon ^d^ $updates"

+ 1
- 1
notes/firefox.md View File

@ -3,7 +3,7 @@
Here are some `about:config` variables that you might want to set:
| Variable | Value |
--------------------
|----------|-------|
| services.sync.prefs.sync.browser.uiCustomization.state | true |
| extensions.pocket.enabled | false |
| browser.cache.disk.parent_directory | /run/user/*UID*/firefox |

+ 4
- 0
profile View File

@ -73,6 +73,10 @@ export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
case "$(readlink -f /sbin/init)" in
*systemd*) export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus ;;
esac
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
if [ ! "$DBUS_SESSION_BUS_ADDRESS" ] && [ ! $(command -v dbus-launch) ]; then
exec dbus-launch --exit-with-session xinit 2> $XDG_RUNTIME_DIR/xinit.err > $XDG_RUNTIME_DIR/xinit || exit


+ 19
- 0
root/quark View File

@ -0,0 +1,19 @@
#!/usr/bin/openrc-run
depend() {
need net
need localmount
}
start() {
ebegin "Starting quark"
start-stop-daemon --background --start --exec /usr/local/bin/quark -- -p 9999 -d /home/yigit/.dotfiles/browser/startpage/dist -h 127.0.0.1
eend $?
}
stop() {
ebegin "Stopping myApp"
eend $?
}

+ 1
- 1
suckless/surf/config.h View File

@ -140,7 +140,7 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE |
*/
static SiteSpecific styles[] = {
/* regexp file in $styledir */
{ ".*", "localwiki.css" },
{ ".*", "default.css" },
};
/* certificates */


Loading…
Cancel
Save