This commit is contained in:
Marcin Wozniak 2019-09-04 20:21:44 +02:00
parent 91b3c89fc2
commit c8e905fa96
7 changed files with 31 additions and 394 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 KiB

44
Xinitrc
View File

@ -1,44 +0,0 @@
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
#xterm*faceSize: 20
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
exec ck-launch-session dbus-launch dwm
#exec ck-launch-session dbus-launch i3

View File

@ -1,6 +1,6 @@
/* appearance */
static const unsigned int borderpx = 3; /* border pixel of windows */
static const unsigned int gappx = 10; /* gaps between windows */
static const unsigned int borderpx = 2; /* border pixel of windows */
static const unsigned int gappx = 0; /* gaps between windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
@ -27,13 +27,13 @@ static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const Rule rules[] = {
{ "Opera", NULL, NULL, 1 << 1, False, 0 },
{ "Mozilla Firefox", NULL, NULL, 1 << 1, False, 0 },
{ "Firefox", NULL, NULL, 1 << 1, False, 0 },
{ "Thunderbird", NULL, NULL, 1 << 2, False, 0 },
{ "Steam", NULL, NULL, 1 << 3, False, 0 },
{ "Lutris", NULL, NULL, 1 << 3, False, 0 },
{ "League of Legends", NULL, NULL, 1 << 3, True, 0 },
{ "TeamSpeak 3", NULL, NULL, 1 << 3, False, 0 },
{ "discord", NULL, NULL, 1 << 4, False, 0 },
{ "keepassxc", NULL, NULL, 1 << 7, False, 0 },
{ "Kodi", NULL, NULL, 1 << 7, False, 0 },
{ "TeamViewer", NULL, NULL, 1 << 8, False, 0 },
@ -66,7 +66,7 @@ static const Layout layouts[] = {
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", NULL };
static const char *termcmd[] = { "st","-ce", "/bin/zsh" , NULL };
static const char *termcmd[] = { "st","-ce", "/bin/fish" , NULL };
static const char *print_screen_cmd[] = { "scrot", "%Y-%m-%d-%H%M%S.png", "-e", "mv $f ~/Screenshots", NULL };
static const char *cmdlock[] = { "slock", NULL };
static const char *dwmkill[] = { "dwm-kill", NULL };
@ -79,7 +79,6 @@ static const char *cmusnext[] = { "cmus-remote", "-n", NULL };
static const char *cmusprev[] = { "cmus-remote", "-r", NULL };
static const char *shutdownpress[] = {"shut-sup-rest", "NULL" };
static const char *pavucontrol[] = {"pavucontrol", "NULL" };
static const char *qalculategtk[] = { "qalculate-gtk", "NULL" };
static const char *screenswitcher[] = { "screen-switcher", "NULL" };
static Key keys[] = {

5
copy
View File

@ -1,10 +1,11 @@
!/bin/bash
#!/bin/bash
mkdir -p ~/.config/ranger/
mkdir -p ~/.config/fish
cp rangerrc.conf ~/.config/ranger/rc.conf
cp rifle.conf ~/.config/ranger/rifle.conf
cp tmux.conf ~/.tmux.conf
cp Xinitrc ~/.xinitrc
cp scope.sh ~/.config/ranger/scope.sh
#cp scope.sh ~/.config/ranger/scope.sh
#ln -s /home/yorune/MEGA/Systems/Gentoo/configs/config.fish ~/.config.fish
#ln -s /home/yorune/MEGA/Systems/Gentoo/configs/config.fish /home/yorune/.config/fish/config.fish
#curl -L https://get.oh-my.fish | fish

View File

@ -1,4 +1,25 @@
#!/bin/bash
feh --bg-fill $HOME/.wall.jpg &
xset s off -dpms&
xset b off&
xset s off&
xset -dpms&
redshift -l 52.2327:18.3036 -t 6500:3200&
#compton&
nm-applet --sm-disable&
#/usr/local/bin/st -e "/bin/fish"&
/usr/local/bin/st -e /bin/sh -c "tmux new-session -s BASE -n HOME '/bin/zsh'\; new-window -n GOTOP 'gotop'\; new-window -n MUSIC 'cmus'\; new-window -n SERVER 'ssh root@jaqu3.ddns.net -p 2222'"&
firefox&
thunderbird&
"/mnt/mega/Systems/Linux/apps/KeePass.AppImage"&
megasync&
dunst -config&
#/usr/bin/ibus-daemon -d&
#sh /home/yorune/.xsessionrc&
transmission-daemon&
pl&
#getforecast&
testweather() {
[ "$(stat -c %y "/tmp/weatherreport" 2>/dev/null | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ] && ping -q -c 1 1.1.1.1 >/dev/null && curl -s "wttr.in/$location" > "/tmp/weatherreport" && notify-send "🌞 Weather" "New weather forecast for today."
@ -15,14 +36,6 @@ printf "%s%%\\n" " $vol"
print_wifi()
{
# ESSID="`iw dev wlan0 link | grep SSID| sed -r 's/SSID://' | sed -e 's/^[ \t]*//'`"
# if test -z "$ESSID"
# then
# echo -e ""
# else
# echo -e " $ESSID"
# fi
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="📡"
[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "", int($3 * 100 / 70) "%" }')
@ -36,9 +49,9 @@ print_temp(){
}
print_date(){
echo -e " $(date +"%m-%d %H:%M")"
echo -e " $(date +"%a %H:%M")"
#echo -e " $(date +"%m-%d %H:%M")"
}
print_mail(){
RESULT=$(echo "$(du -a ~/.mailbox/*/inbox/new/* 2>/dev/null | sed -n '$=')$(cat /tmp/imapsyncicon_$USER 2>/dev/null)")
if [ -z $RESULT ]; then
@ -109,29 +122,9 @@ case "$cmus" in
esac
}
echo AUTOSTART
feh --bg-fill $HOME/.wall.jpg &
xset s off -dpms&
xset b off&
xset s off&
xset -dpms&
redshift -l 52.2327:18.3036 -t 6500:3200&
#compton&
nm-applet --sm-disable&
/usr/local/bin/st -e "tmux"&
firefox-bin&
thunderbird-bin&
"/mnt/mega/Systems/Gentoo/apps/KeePass.AppImage"&
megasync&
dunst -config&
/usr/bin/ibus-daemon -d&
sh /home/yorune/.xsessionrc&
transmission-daemon&
getforecast&
while true
do
xsetroot -name "$(print_temp) | $(usageData) | $(testweather) | $(print_wifi) | $(batLevel) | $(print_volume) | $(print_date)"
#xsetroot -name "$(print_wifi) | $(batLevel) | $(print_volume) | $(print_date)"
sleep 2
done

View File

@ -1,210 +0,0 @@
ext jpg = feh --scale-down "$@"
#ext doc = openoffice4 "$@"
#ext odt = openoffice4 "$@"
#-------------------------------------------
# Websites
#-------------------------------------------
# Rarely installed browsers get higher priority; It is assumed that if you
# install a rare browser, you probably use it. Firefox/konqueror/w3m on the
# other hand are often only installed as fallback browsers.
ext x?html?, has surf, X, flag f = surf -- file://"$1"
ext x?html?, has vimprobable, X, flag f = vimprobable -- "$@"
ext x?html?, has vimprobable2, X, flag f = vimprobable2 -- "$@"
ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@"
ext x?html?, has dwb, X, flag f = dwb -- "$@"
ext x?html?, has jumanji, X, flag f = jumanji -- "$@"
ext x?html?, has luakit, X, flag f = luakit -- "$@"
ext x?html?, has uzbl, X, flag f = uzbl -- "$@"
ext x?html?, has uzbl-tabbed, X, flag f = uzbl-tabbed -- "$@"
ext x?html?, has uzbl-browser, X, flag f = uzbl-browser -- "$@"
ext x?html?, has uzbl-core, X, flag f = uzbl-core -- "$@"
ext x?html?, has midori, X, flag f = midori -- "$@"
ext x?html?, has chromium-browser, X, flag f = chromium-browser -- "$@"
ext x?html?, has chromium, X, flag f = chromium -- "$@"
ext x?html?, has google-chrome, X, flag f = google-chrome -- "$@"
ext x?html?, has opera, X, flag f = opera -- "$@"
ext x?html?, has firefox, X, flag f = firefox -- "$@"
ext x?html?, has seamonkey, X, flag f = seamonkey -- "$@"
ext x?html?, has iceweasel, X, flag f = iceweasel -- "$@"
ext x?html?, has epiphany, X, flag f = epiphany -- "$@"
ext x?html?, has konqueror, X, flag f = konqueror -- "$@"
ext x?html?, has elinks, terminal = elinks "$@"
ext x?html?, has links2, terminal = links2 "$@"
ext x?html?, has links, terminal = links "$@"
ext x?html?, has lynx, terminal = lynx -- "$@"
ext x?html?, has w3m, terminal = w3m "$@"
#-------------------------------------------
# Misc
#-------------------------------------------
# Define the "editor" for text files as first action
mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@"
mime ^text, label pager = "$PAGER" -- "$@"
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
ext 1 = man "$1"
ext s[wmf]c, has zsnes, X = zsnes "$1"
ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1"
ext nes, has fceux, X = fceux "$1"
ext exe = wine "$1"
name ^[mM]akefile$ = make
#--------------------------------------------
# Code
#-------------------------------------------
ext py = python -- "$1"
ext pl = perl -- "$1"
ext rb = ruby -- "$1"
ext js = node -- "$1"
ext sh = sh -- "$1"
ext php = php -- "$1"
#--------------------------------------------
# Audio without X
#-------------------------------------------
mime ^audio|ogg$, terminal, has mpv = mpv -- "$@"
mime ^audio|ogg$, terminal, has mplayer2 = mplayer2 -- "$@"
mime ^audio|ogg$, terminal, has mplayer = mplayer -- "$@"
ext midi?, terminal, has wildmidi = wildmidi -- "$@"
#--------------------------------------------
# Video/Audio with a GUI
#-------------------------------------------
mime ^video|audio, has gmplayer, X, flag f = gmplayer -- "$@"
mime ^video|audio, has smplayer, X, flag f = smplayer "$@"
mime ^video, has mpv, X, flag f = mpv -- "$@"
mime ^video, has mpv, X, flag f = mpv --fs -- "$@"
mime ^video, has mplayer2, X, flag f = mplayer2 -- "$@"
mime ^video, has mplayer2, X, flag f = mplayer2 -fs -- "$@"
mime ^video, has mplayer, X, flag f = mplayer -- "$@"
mime ^video, has mplayer, X, flag f = mplayer -fs -- "$@"
mime ^video|audio, has vlc, X, flag f = vlc -- "$@"
mime ^video|audio, has totem, X, flag f = totem -- "$@"
mime ^video|audio, has totem, X, flag f = totem --fullscreen -- "$@"
#--------------------------------------------
# Video without X:
#-------------------------------------------
mime ^video, terminal, !X, has mpv = mpv -- "$@"
mime ^video, terminal, !X, has mplayer2 = mplayer2 -- "$@"
mime ^video, terminal, !X, has mplayer = mplayer -- "$@"
#-------------------------------------------
# Documents
#-------------------------------------------
ext pdf, has llpp, X, flag f = llpp "$@"
ext pdf, has zathura, X, flag f = zathura -- "$@"
ext pdf, has mupdf, X, flag f = mupdf "$@"
ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"
ext pdf, has apvlv, X, flag f = apvlv -- "$@"
ext pdf, has xpdf, X, flag f = xpdf -- "$@"
ext pdf, has evince, X, flag f = evince -- "$@"
ext pdf, has atril, X, flag f = atril -- "$@"
ext pdf, has okular, X, flag f = okular -- "$@"
ext pdf, has epdfview, X, flag f = epdfview -- "$@"
ext pdf, has qpdfview, X, flag f = qpdfview "$@"
ext pdf, has open, X, flag f = open "$@"
ext docx?, has catdoc, terminal = catdoc -- "$@" | "$PAGER"
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@"
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread, X, flag f = kspread -- "$@"
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f = soffice "$@"
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice, X, flag f = ooffice "$@"
ext djvu, has zathura,X, flag f = zathura -- "$@"
ext djvu, has evince, X, flag f = evince -- "$@"
ext djvu, has atril, X, flag f = atril -- "$@"
ext djvu, has djview, X, flag f = djview -- "$@"
ext epub, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
ext mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
#-------------------------------------------
# Image Viewing:
#-------------------------------------------
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
mime ^image/svg, has display, X, flag f = display -- "$@"
mime ^image, has pqiv, X, flag f = pqiv -- "$@"
mime ^image, has sxiv, X, flag f = sxiv -- "$@"
mime ^image, has feh, X, flag f = feh -- "$@"
mime ^image, has mirage, X, flag f = mirage -- "$@"
mime ^image, has ristretto, X, flag f = ristretto "$@"
mime ^image, has eog, X, flag f = eog -- "$@"
mime ^image, has eom, X, flag f = eom -- "$@"
mime ^image, has nomacs, X, flag f = nomacs -- "$@"
mime ^image, has geeqie, X, flag f = geeqie -- "$@"
mime ^image, has gwenview, X, flag f = gwenview -- "$@"
mime ^image, has gimp, X, flag f = gimp -- "$@"
ext xcf, X, flag f = gimp -- "$@"
#-------------------------------------------
# Archives
#-------------------------------------------
# avoid password prompt by providing empty password
ext 7z, has 7z = 7z -p l "$@" | "$PAGER"
# This requires atool
ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --list --each -- "$@" | "$PAGER"
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list --each -- "$@" | "$PAGER"
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --extract --each -- "$@"
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@"
# Listing and extracting archives without atool:
ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | "$PAGER"
ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done
ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done
ext zip, has unzip = unzip -l "$1" | less
ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done
ext ace, has unace = unace l "$1" | less
ext ace, has unace = for file in "$@"; do unace e "$file"; done
ext rar, has unrar = unrar l "$1" | less
ext rar, has unrar = for file in "$@"; do unrar x "$file"; done
#-------------------------------------------
# Flag t fallback terminals
#-------------------------------------------
# Rarely installed terminal emulators get higher priority; It is assumed that
# if you install a rare terminal emulator, you probably use it.
# gnome-terminal/konsole/xterm on the other hand are often installed as part of
# a desktop environment or as fallback terminal emulators.
mime ^ranger/x-terminal-emulator, has terminology = terminology -e "$@"
mime ^ranger/x-terminal-emulator, has kitty = kitty -- "$@"
mime ^ranger/x-terminal-emulator, has alacritty = alacritty -e "$@"
mime ^ranger/x-terminal-emulator, has sakura = sakura -e "$@"
mime ^ranger/x-terminal-emulator, has lilyterm = lilyterm -e "$@"
#mime ^ranger/x-terminal-emulator, has cool-retro-term = cool-retro-term -e "$@"
mime ^ranger/x-terminal-emulator, has termite = termite -x '"$@"'
#mime ^ranger/x-terminal-emulator, has yakuake = yakuake -e "$@"
mime ^ranger/x-terminal-emulator, has guake = guake -ne "$@"
mime ^ranger/x-terminal-emulator, has tilda = tilda -c "$@"
mime ^ranger/x-terminal-emulator, has st = st -e "$@"
mime ^ranger/x-terminal-emulator, has terminator = terminator -x "$@"
mime ^ranger/x-terminal-emulator, has urxvt = urxvt -e "$@"
mime ^ranger/x-terminal-emulator, has pantheon-terminal = pantheon-terminal -e "$@"
mime ^ranger/x-terminal-emulator, has lxterminal = lxterminal -e "$@"
mime ^ranger/x-terminal-emulator, has mate-terminal = mate-terminal -x "$@"
mime ^ranger/x-terminal-emulator, has xfce4-terminal = xfce4-terminal -x "$@"
mime ^ranger/x-terminal-emulator, has konsole = konsole -e "$@"
mime ^ranger/x-terminal-emulator, has gnome-terminal = gnome-terminal -- "$@"
mime ^ranger/x-terminal-emulator, has xterm = xterm -e "$@"
#-------------------------------------------
# Misc
#-------------------------------------------
label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1"
label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1"
label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"
label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
# Define the editor for non-text files + pager as last action
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
# The very last action, so that it's never triggered accidentally, is to execute a program:
mime application/x-executable = "$1"

102
tmux.conf
View File

@ -1,102 +0,0 @@
set -g prefix C-a
set-option -g default-shell /bin/zsh
unbind C-b
bind-key C-a send-prefix
unbind q
bind q confirm kill-window
set -g exit-unattached on
set -g destroy-unattached on
set -g status on
bind-key -n C-f copy-mode \; send-key ?
set -g default-terminal "st-256color"
set -g history-limit 20000
set-option -sg escape-time 0
set -g base-index 1 # start windows numbering at 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
set -g display-panes-time 800 # slightly longer pane indicators display time
set -g display-time 1000 # slightly longer status messages display time
set -g status-interval 10 # redraw status line every 10 seconds
# clear both screen and history
bind -n C-l send-keys C-l \; run 'sleep 0.1' \; clear-history
# activity
set -g monitor-activity on
set -g visual-activity off
# create session
bind C-c new-session
# find session
bind C-f command-prompt -p find-session 'switch-client -t %%'
# split current window horizontally
bind - split-window -v
# split current window vertically
bind _ split-window -h
# pane navigation
bind -r h select-pane -L # move left
bind -r j select-pane -D # move down
bind -r k select-pane -U # move up
bind -r l select-pane -R # move right
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
# maximize current pane
bind + run 'cut -c3- ~/.tmux.conf | sh -s _maximize_pane "#{session_name}" #D'
# pane resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# window navigation
unbind n
unbind p
bind -r C-h previous-window # select previous window
bind -r C-l next-window # select next window
bind Tab last-window # move to last active window
# toggle mouse
bind m run "cut -c3- ~/.tmux.conf | sh -s _toggle_mouse"
# -- urlview -------------------------------------------------------------------
bind U run "cut -c3- ~/.tmux.conf | sh -s _urlview #{pane_id}"
# -- copy mode -----------------------------------------------------------------
bind Enter copy-mode # enter copy mode
run -b 'tmux bind -t vi-copy v begin-selection 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi v send -X begin-selection 2> /dev/null || true'
run -b 'tmux bind -t vi-copy C-v rectangle-toggle 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi C-v send -X rectangle-toggle 2> /dev/null || true'
run -b 'tmux bind -t vi-copy y copy-selection 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi y send -X copy-selection-and-cancel 2> /dev/null || true'
run -b 'tmux bind -t vi-copy Escape cancel 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi Escape send -X cancel 2> /dev/null || true'
run -b 'tmux bind -t vi-copy H start-of-line 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi H send -X start-of-line 2> /dev/null || true'
run -b 'tmux bind -t vi-copy L end-of-line 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi L send -X end-of-line 2> /dev/null || true'
# copy to X11 clipboard
if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xsel -i -b"'
if -b '! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1"'
# -- buffers -------------------------------------------------------------------
bind b list-buffers # list paste buffers
bind p paste-buffer # paste from the top paste buffer
bind P choose-buffer # choose which buffer to paste from
# -- user defined overrides ----------------------------------------------------
if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'