1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00

Compare commits

...

11 Commits

Author SHA1 Message Date
Ryan Kes
9e8355833d feat(zsh,fish): implemented starship prompt 2020-12-06 10:50:25 +01:00
Ryan Kes
08b87963d5 docs(install): auto install xbanish & unclutter 2020-12-06 10:38:13 +01:00
Ryan Kes
10741cbc9b feat(install): auto install xbanish & unclutter 2020-12-06 10:35:45 +01:00
Ryan Kes
5baa3532b8 feat(dwm): auto start xbanish & dwmblocks 2020-12-06 10:34:25 +01:00
Ryan Kes
03ddbc57bf feat(newsboat): updated color scheme and setup podboat 2020-12-06 10:34:03 +01:00
Ryan Kes
dd011e3170 feat(bspwm): auto start xbanish 2020-12-06 10:33:29 +01:00
Ryan Kes
5034caf4a6 fix(sxiv): wallaper setting works again 2020-12-06 10:33:05 +01:00
Ryan Kes
6f1ad766cc feat(dunst): split thinkpad & desktop configs 2020-12-06 10:32:16 +01:00
Ryan Kes
03451b6f07 feat(dunst): split thinkpad & desktop configs 2020-12-06 10:31:36 +01:00
Ryan Kes
a78e687a06 feat(dunst): split thinkpad & desktop configs 2020-12-06 10:31:05 +01:00
Ryan Kes
e221286483 fix: this seems to fix sporadic wrong resolution bug 2020-12-02 21:16:11 +01:00
15 changed files with 234 additions and 67 deletions

View File

@ -82,6 +82,8 @@ A repository of my personal configuration files.
- [[https://github.com/tldr-pages/tldr][tldr]]
- [[https://github.com/sargon/trayer-srg][trayer-srg]]
- [[https://www.freedesktop.org/wiki/Software/udisks/][udisks]]
- unclutter
- [[https://github.com/jcs/xbanish][xbanish]]
- [[https://www.x.org/releases/X11R7.5/doc/man/man1/xprop.1.html][xprop]]
- [[https://github.com/stoeckmann/xwallpaper][xwallpaper]]
- [[https://yarnpkg.com/][yarn]]
@ -143,7 +145,7 @@ A repository of my personal configuration files.
* Fish
*** Theme
- [[https://github.com/matchai/spacefish][spacefish]]
- [[https://starship.rs/][starship]]
*** Package Manager
- [[https://github.com/oh-my-fish/oh-my-fish][oh-my-fish]]
*** Packages
@ -199,7 +201,7 @@ A repository of my personal configuration files.
* Zsh
** Theme
- [[https://github.com/denysdovhan/spaceship-prompt][spaceship zsh]]
- [[https://starship.rs/][starship]]
** Plugin Manager
- [[https://github.com/zplug/zplug][zplug]]
** Plugins

View File

@ -115,6 +115,7 @@ bspc rule -a scratchmacs sticky=on state=floating
###---Autostart---###
start_if_not_running dunst
start_if_not_running unclutter
start_if_not_running xbanish
start_if_not_running nm-applet
start_if_not_running pasystray
start_if_not_running redshift-gtk

1
dunst/.config/dunst/dunstrc Symbolic link
View File

@ -0,0 +1 @@
/home/alrayyes/.config/dunst/dunstrc.thinkpad

View File

@ -24,7 +24,7 @@
sort = yes
idle_threshold = 120
font = Hack Nerd Font Medium 10
font = JoyPixels 10, Hack Nerd Font Mono 10
line_height = 0
markup = full

View File

@ -0,0 +1,148 @@
[global]
monitor = 0
follow = keyboard
geometry = "0x0-30+20"
indicate_hidden = yes
shrink = no
transparency = 0
notification_height = 0
separator_height = 2
padding = 0
horizontal_padding = 8
frame_width = 3
frame_color = "#aaaaaa"
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = frame
# Sort messages by urgency.
sort = yes
idle_threshold = 120
font = JoyPixels 12, Hack Nerd Font Mono 12
line_height = 0
markup = full
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
format = "<b>%s</b>\n%b"
alignment = center
show_age_threshold = 60
word_wrap = yes
ellipsize = middle
ignore_newline = no
stack_duplicates = true
hide_duplicate_count = false
show_indicators = yes
icon_position = left
max_icon_size = 32
icon_path = /usr/share/icons/Papirus-Dark/24x24/panel/:/usr/share/icons/Papirus-Dark/24x24/devices/:/usr/share/icons/Papirus-Dark/24x24/apps/:/usr/share/icons/Papirus-Dark/24x24/actions/
sticky_history = yes
history_length = 20
dmenu = dmenu -p dunst:
browser = /usr/local/bin/brave
# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true
title = Dunst
class = Dunst
startup_notification = false
corner_radius = 5
force_xinerama = false
[experimental]
per_monitor_dpi = false
[shortcuts]
close = ctrl+space
close_all = ctrl+shift+space
history = ctrl+grave
context = ctrl+shift+period
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
# Messages can be matched by "appname", "summary", "body", "icon", "category",
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
# "background", "new_icon" and "format".
# Shell-like globbing will get expanded.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: if you don't want a notification
# to be displayed, set the format
# to "".
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# format = ""
#[history-ignore]
# # This notification will not be saved in history
# summary = "foobar"
# history_ignore = yes
#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#
# vim: ft=cfg
[urgency_low]
background = "#2b2b2b"
foreground = "#ffffff"
[urgency_normal]
background = "#2b2b2b"
foreground = "#ffffff"
[urgency_critical]
background = "#900000"
foreground = "#ffffff"
frame_color = "#ff0000"

View File

@ -35,7 +35,7 @@ if [ "$SCREENCOUNT" -eq 2 ]; then
if [ -f "$HOME/.local/bin/screen_desktop" ]; then
screen_desktop &
# Make sure mouse is on main screen so windows are launched there
xdotool mousemove 3360 1080 &
#xdotool mousemove 3360 1080 &
fi
else
if [ -f "$HOME/.local/bin/screen" ]; then
@ -69,11 +69,13 @@ amixer -c 3 set Mic nocap &
###---Autostart---###
start_if_not_running dunst
start_if_not_running unclutter
start_if_not_running xbanish
start_if_not_running nm-applet
start_if_not_running pasystray
start_if_not_running redshift-gtk
start_if_not_running syncthing-gtk
start_if_not_running caffeine
start_if_not_running dwmblocks
start_if_not_running brave
start_if_not_running iceweasel

View File

@ -42,17 +42,17 @@ set GPG_TTY (tty)
# Set default browser
if [ -e "/usr/bin/brave" ]
set -g BROWSER "brave"
set -xg BROWSER "brave"
else
if [ -e "/usr/bin/firefox" ]
set -g BROWSER "firefox"
set -xg BROWSER "firefox"
else if [ -e "/usr/bin/iceweasel" ]
set -g BROWSER "iceweasel"
set -xg BROWSER "iceweasel"
end
end
# Set default terminal
set -g TERMINAL "alacritty"
set -xg TERMINAL "st"
# pkg editor
set -xg VISUAL "nvim"
@ -336,3 +336,6 @@ if type rg &> /dev/null
export FZF_DEFAULT_COMMAND='rg --files'
export FZF_DEFAULT_OPTS='-m --height 50% --border'
end
# Enable starfish prompt
starship init fish | source

View File

@ -1,7 +1,7 @@
#!/usr/bin/env fish
# Prerequisite & inistalled apps
set prerequisiteApps bat broot brave caffeine-ng exa fslint fzf graphviz isync imagemagick lightdm-gtk-greeter mailcap neofetch npm pandoc-bin pamixer playerctl pulseaudio pulsemixer python pywal ripgrep stow sxiv tldr trayer udisks2 xwallpaper yarn xprop zathura
set prerequisiteApps bat broot brave caffeine-ng exa fslint fzf graphviz isync imagemagick lightdm-gtk-greeter mailcap neofetch npm pandoc-bin pamixer playerctl pulseaudio pulsemixer python pywal ripgrep stow sxiv tldr trayer udisks2 unclutter xbanish xwallpaper yarn xprop zathura
set prerequisiteFonts ttf-linux-libertine noto-fonts noto-fonts-emoji ttf-liberation nerd-fonts-hack
set prerequisiteLibraries libxft-bgra
set prerequisiteLsp bash-language-server ccls php-language-server python-language-server typescript-language-server-bin vscode-css-languageserver-bin vscode-html-languageserver-bin nodejs-intelephense

View File

@ -75,6 +75,13 @@
set cmdheight=2 " Better display for messages
" }
" AutoRestart {
autocmd BufWritePost ~/devel/personal/dwmblocks/blocks.h !cd ~/devel/personal/dwmblocks/; sudo make install && killall -q dwmblocks && setsid dwmblocks &
autocmd BufWritePost ~/dotfiles/public/dunst/.config/dunst/dunstrc.thinkpad !killall -q dunst && setsid dunst &
autocmd BufWritePost ~/dotfiles/public/dunst/.config/dunst/dunstrc.desktop !killall -q dunst && setsid dunst &
" }
" Vim UI {
set cursorline " show cursor line

View File

@ -26,7 +26,7 @@ bind-key d pagedown
bind-key u pageup
bind-key l open
bind-key h quit
bind-key a toggle-article-read
bind-key m toggle-article-read
bind-key n next-unread
bind-key N prev-unread
bind-key D pb-download
@ -34,13 +34,7 @@ bind-key U show-urls
bind-key x pb-delete
bind-key ^t next-unread
color background default default
color listnormal default default
color listnormal_unread default default
color listfocus black yellow
color listfocus_unread black yellow
color info default black
color article default default
include /usr/share/doc/newsboat/contrib/colorschemes/solarized-dark
# highlights
highlight article "^(Title):.*$" blue default
@ -48,3 +42,8 @@ highlight article "https?://[^ ]+" red default
highlight article "\\[image\\ [0-9]+\\]" green default
browser linkhandler
# podboat
download-path "~/Downloads/podcasts/%h/%n"
max-downloads 5
player "linkhandler"

View File

@ -1,9 +1,12 @@
#!/usr/bin/env sh
# Exit if newsboat is already running
pgrep -f newsboat > /dev/null && exit
# Needed for notify-send to work
#!/bin/sh
export DISPLAY=":0.0"
ping -q -c 1 example.org >/dev/null || exit
/usr/bin/notify-send "📰 Updating RSS feeds..."
pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit
echo 🔃 >/tmp/newsupdate
pkill -RTMIN+4 "${STATUSBAR:-dwmblocks}"
/usr/bin/newsboat -x reload
rm -f /tmp/newsupdate
pkill -RTMIN+4 "${STATUSBAR:-dwmblocks}"
/usr/bin/notify-send "📰 RSS feed update complete."

View File

@ -1,3 +1,4 @@
#!/usr/bin/env sh
pkill -RTMIN+4 "${STATUSBAR:-dwmblocks}"
notify-send.py -a Newsboat -i rssowl Rss "$1" &

View File

@ -1,50 +1,43 @@
#!/usr/bin/env bash
function generateWallpaper() {
notify-send.py --hint string:image-path:"$2" --replaces-process setwallpaper -a sxiv "Setting wallpaper" &
notify-send.py --hint string:image-path:"$2" --replaces-process setwallpaper -a sxiv "Setting wallpaper" &
# Only generate wal color schemes for main monitor
if [ "$1" == 0 ]; then
OUTPUT_IMAGE="$HOME/.cache/wall1.png"
# Use tail -n 1 to get last monitor so this works with laptop as well
WIDTH=$(xrandr | grep '\*' | tail -n 1 | awk -F 'x' '{print $1}' | sed 's/ //g')
HEIGHT=$(xrandr | grep '\*' | tail -n 1 | awk -F 'x' '{print $2}' | awk '{print $1}' | sed 's/ //g')
elif [ "$1" == 1 ]; then
OUTPUT_IMAGE="$HOME/.cache/wall2.png"
WIDTH=$(xrandr | grep '\*' | sed -n '1p' | awk -F 'x' '{print $2}' | awk -F '_' '{print $1}' | sed 's/ //g')
HEIGHT=$(xrandr | grep '\*' | sed -n '1p' | awk -F 'x' '{print $1}' | sed 's/ //g')
fi
# Only generate wal color schemes for main monitor
if [ "$1" == 0 ]; then
OUTPUT_IMAGE="$HOME/.cache/wall1.png"
# Use tail -n 1 to get last monitor so this works with laptop as well
WIDTH=$(xrandr | grep '\*' | tail -n 1 | awk -F 'x' '{print $1}' | sed 's/ //g')
HEIGHT=$(xrandr | grep '\*' | tail -n 1 | awk -F 'x' '{print $2}' | awk '{print $1}' | sed 's/ //g')
elif [ "$1" == 1 ]; then
OUTPUT_IMAGE="$HOME/.cache/wall2.png"
WIDTH=$(xrandr | grep '\*' | sed -n '1p' | awk -F 'x' '{print $2}' | awk -F '_' '{print $1}' | sed 's/ //g')
HEIGHT=$(xrandr | grep '\*' | sed -n '1p' | awk -F 'x' '{print $1}' | sed 's/ //g')
fi
notify-send.py --hint string:image-path:"$2" --replaces-process setwallpaper -a sxiv "Converting wallpaper" &
convert "${2}" "${OUTPUT_IMAGE}"
notify-send.py --hint string:image-path:"$2" --replaces-process setwallpaper -a sxiv "Generating wal color scheme" &
~/.local/bin/generatewal
notify-send.py --hint string:image-path:"$2" --replaces-process setwallpaper -a sxiv "Generating LightDM wallpaper" &
doas convert "$2" /usr/share/pixmaps/wallpaper.png
notify-send.py --hint string:image-path:"$2" --replaces-process setwallpaper -a sxiv "Setting wallpaper" &
~/.local/bin/wallpaper
notify-send.py --hint string:image-path:"$2" --replaces-process setwallpaper -a sxiv "Wallpaper set" &
notify-send.py --hint string:image-path:"$2" --replaces-process setwallpaper -a sxiv "Converting wallpaper" &
convert "${2}" "${OUTPUT_IMAGE}"
notify-send.py --hint string:image-path:"$2" --replaces-process setwallpaper -a sxiv "Generating wal color scheme" &
~/.local/bin/generatewal
notify-send.py --hint string:image-path:"$2" --replaces-process setwallpaper -a sxiv "Setting wallpaper" &
~/.local/bin/wallpaper
notify-send.py --hint string:image-path:"$1" --replaces-process setwallpaper -a sxiv "Wallpaper set" &
}
while read -r file; do
case "$1" in
"C-c")
echo -n "$file" | xclip -selection clipboard
notify-send.py --hint string:image-path:"$file" -a sxiv "Added to clipboard" &
;;
"C-l")
notify-send.py --hint string:image-path:"$file" -a sxiv "Generating lock image" &
generate-lock-image "$file"
notify-send.py --hint string:image-path:"$file" -a sxiv "Lock image generated" &
;;
"C-w")
generateWallpaper 0 "$file"
;;
"C-1")
generateWallpaper 0 "$file"
;;
"C-2")
generateWallpaper 1 "$file"
;;
esac
case "$1" in
"C-c")
echo -n "$file" | xclip -selection clipboard
notify-send.py --hint string:image-path:"$file" -a sxiv "Added to clipboard" &
;;
"C-w")
generateWallpaper 0 "$file"
;;
"C-1")
generateWallpaper 0 "$file"
;;
"C-2")
generateWallpaper 1 "$file"
;;
esac
done

View File

@ -0,0 +1,7 @@
! dwm colors
dwm.normbordercolor: {color8}
dwm.normbgcolor: {color0}
dwm.normfgcolor: {color15}
dwm.selbordercolor: {color15}
dwm.selbgcolor: {color2}
dwm.selfgcolor: {color15}

View File

@ -10,9 +10,6 @@ if [[ ! -d ~/.zplug ]]; then
fi
source ~/.zplug/init.zsh
# Spaceship theme
zplug "denysdovhan/spaceship-prompt", use:spaceship.zsh, from:github, as:theme
# Oh my zsh lugins
# sudo must start after vi-mode for it to work properly
zplug "plugins/archlinux", from:oh-my-zsh
@ -108,4 +105,7 @@ gpg-connect-agent updatestartuptty /bye >/dev/null
# Needed for broot
source /home/alrayyes/.config/broot/launcher/bash/br
# Enable starfish prompt
eval "$(starship init zsh)"
neofetch