diff --git a/.env.public b/.env.public new file mode 100644 index 0000000..eea9b2b --- /dev/null +++ b/.env.public @@ -0,0 +1 @@ +dotdrop_warning="This file is managed by dotdrop, only edit it in your dotdrop files!" diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..40914c1 --- /dev/null +++ b/config.yaml @@ -0,0 +1,67 @@ +actions: + oh-my-zsh: if [ ! -d ~/.oh-my-zsh ]; then sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" && if [ -f ~/.zshrc.pre-oh-my-zsh ]; then rm ~/.zshrc && mv ~/.zshrc.pre-oh-my-zsh ~/.zshrc; fi; fi + powerlevel9k-theme: if [ ! -d ~/.oh-my-zsh/custom/themes ]; then mkdir -p ~/.oh-my-zsh/custom/themes; fi && if [ -d ~/.oh-my-zsh/custom/themes/powerlevel9k ];then git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k; fi +config: + backup: true + create: true + dotpath: dotfiles +dotfiles: + d_bspwm: + dst: ~/.config/bspwm + src: config/bspwm + d_fonts: + dst: ~/.local/share/fonts + src: local/share/fonts + d_polybar: + dst: ~/.config/polybar + src: config/polybar + d_sxhkd: + dst: ~/.config/sxhkd + src: config/sxhkd + d_vim: + dst: ~/.vim + src: vim + f_fehbg: + dst: ~/.fehbg + src: fehbg + f_profile: + dst: ~/.profile + src: profile + f_vimrc: + dst: ~/.vimrc + src: vimrc + f_xdefaults: + dst: ~/.Xdefaults + src: Xdefaults + f_xinitrc: + dst: ~/.xinitrc + src: xinitrc + f_xsession: + dst: ~/.xsession + src: xsession + f_zshrc: + dst: ~/.zshrc + src: zshrc + actions: + - oh-my-zsh + f_powerlevel9krc: + dst: ~/.powerlevel9krc + src: powerlevel9krc + actions: + - powerlevel9k-theme +profiles: + yoetunheimr: + dotfiles: + - f_xdefaults + - d_bspwm + - d_polybar + - d_sxhkd + - f_fehbg + - d_fonts + - f_profile + - d_vim + - f_vimrc + - f_xinitrc + - f_xsession + - f_zshrc + - f_powerlevel9krc diff --git a/dotdrop.sh b/dotdrop.sh new file mode 100755 index 0000000..19bc6e5 --- /dev/null +++ b/dotdrop.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# author: deadc0de6 (https://github.com/deadc0de6) +# Copyright (c) 2017, deadc0de6 + +# check for readlink/realpath presence +# https://github.com/deadc0de6/dotdrop/issues/6 +rl="readlink -f" + +if ! ${rl} "${0}" >/dev/null 2>&1; then + rl="realpath" + + if ! hash ${rl}; then + echo "\"${rl}\" not found !" && exit 1 + fi +fi + +# setup variables +args=("$@") +cur=$(dirname "$(${rl} "${0}")") +opwd=$(pwd) +cfg="${cur}/config.yaml" +sub="dotdrop" + +# pivot +cd "${cur}" || { echo "Folder \"${cur}\" doesn't exist, aborting." && exit; } +# init/update the submodule +git submodule update --init --recursive +# launch dotdrop +PYTHONPATH=dotdrop python3 -m dotdrop.dotdrop --cfg="${cfg}" "${args[@]}" +# pivot back +cd "${opwd}" || { echo "Folder \"${opwd}\" doesn't exist, aborting." && exit; } diff --git a/dotfiles/Xdefaults b/dotfiles/Xdefaults new file mode 100644 index 0000000..9bea703 --- /dev/null +++ b/dotfiles/Xdefaults @@ -0,0 +1,86 @@ +/* Set each shell as loginShell */ +URxvt.loginShell: true +/* Set max lines for scrollback */ +URxvt.saveLines: 1000 +/* Set internal Border */ +URxvt.internalBorder: 3 +/* Set linespace to 0px */ +URxvt.lineSpace: 0 +/* + Set URxvt font + DON'T USE TrueType (ttf) FONTS!!!!!!!!!!! They'll kill KeePass! Use OpenType (otf) instead. +*/ +URxvt.font: xft:SourceCodePro+Powerline+Awesome Regular:pixelsize=14,atialias=true +/* Set URxvt transparancy */ +!URxvt.transparent: true +!URxvt.shading: 30 +/* Deactivate scrollbar */ +URxvt.scrollBar: false +URxvt.scrollStyle: rxvt +/* Perl extensions */ +URxvt.perl-ext-common: default,matcher +URxvt.matcher.button: 1 +URxvt.urlLauncher: firefox +/* Cursor */ +URxvt.cursorBlink: true +URxvt.cursorColor: #657b83 +URxvt.cursorUnderline: false +/* Pointer */ +URxvt.pointerBlank: true + +/* Set Colors */ +URxvt.background: rgba:2400/2400/2400/dcdc +URxvt.foreground: #FFFFFF +!*fading: 40 +*fadeColor: #002b36 +*cursorColor: #93a1a1 +*pointerColorBackground: #586e75 +*pointerColorForeground: #93a1a1 + +/* black dark/light */ +*color0: #000000 +!*color0: #073642 +*color8: #5D5D5D +!*color8: #002b36 + +/* red dark/light */ +*color1: #C75646 +!*color1: #dc322f +*color9: #E09690 +!*color9: #cb4b16 + +/* green dark/light */ +*color2: #8EB33B +!*color2: #859900 +*color10: #CDEE69 +!*color10: #586e75 + +/* yellow dark/light */ +*color3: #D0B03C +!*color3: #b58900 +*color11: #FFE377 +!*color11: #657b83 + +/* blue dark/light */ +*color4: #72B3CC +!*color4: #268bd2 +*color12: #9CD9F0 +!*color12: #839496 + +/* magenta dark/light */ +*color5: #C8A0D1 +!*color5: #d33682 +*color13: #FBB1F9 +!*color13: #6c71c4 + +/* cyan dark/light */ +*color6: #218693 +!*color6: #2aa198 +*color14: #77DFD8 +!*color14: #93a1a1 + +/* white dark/light */ +*color7: #B0B0B0 +!*color7: #eee8d5 +*color15: #F7F7F7 +!*color15: #fdf6e3 diff --git a/dotfiles/config/bspwm/bg.png b/dotfiles/config/bspwm/bg.png new file mode 100644 index 0000000..1242abb Binary files /dev/null and b/dotfiles/config/bspwm/bg.png differ diff --git a/dotfiles/config/bspwm/bspwmrc b/dotfiles/config/bspwm/bspwmrc new file mode 100755 index 0000000..23c8142 --- /dev/null +++ b/dotfiles/config/bspwm/bspwmrc @@ -0,0 +1,20 @@ +#! /bin/sh + +bspc config border_width 2 +bspc config window_gap 5 + +bspc config split_ratio 0.5 +bspc config borderless_monocle true +bspc config gapless_monocle true +bspc config click_to_focus true + +bspc monitor -d 0000 0001 0010 0011 0100 0101 0110 0111 + +bspc rule -a Gimp desktop=^8 follow=on floating=on +bspc rule -a Chromium desktop=^2 +bspc rule -a mplayer2 floating=on +bspc rule -a Screenkey manage=off + +# THIS SHOULD BE THE LAST! +# Lauch polybar(s) +$HOME/.config/polybar/launch.sh diff --git a/dotfiles/config/polybar/config b/dotfiles/config/polybar/config new file mode 100644 index 0000000..2d64b7c --- /dev/null +++ b/dotfiles/config/polybar/config @@ -0,0 +1,217 @@ +;======================================= +; +; Polybar configuration for +; Dell XPS 15 9560 +; with bspwm +; +; by Philip "ShokiNN'" Henning +; +; +;======================================= + +[colors] +; Smyck color scheme by hukl +; https://github.com/hukl/Smyck-Color-Scheme +dark-black = #000 +light-black = #5D5D5D +dark-red = #C75646 +light-red = #E09690 +dark-green = #8EB33B +light-green = #CDEE69 +dark-yellow = #D0B03C +light-yellow = #FFE377 +dark-blue = #4E90A7 +light-blue = #9CD9F0 +dark-magenta = #C8A0D1 +light-magenta = #FBB1F9 +dark-cyan = #218693 +light-cyan = #77DFD8 +dark-white = #B0B0B0 +light-white = #F7F7F7 + +[bar/9560-top] +; Define bar monitor +monitor = "eDP-1" + +; Enable support for inter-process messaging +; See the Messaging wiki page for more details. +enable-ipc = true + +; Put the bar at the bottom of the screen +bottom = false + +; Prefer fixed center position for the `modules-center` block +; When false, the center position will be based on the size of the other blocks. +fixed-center = false + +; Set size of the bar +width = 100% +height = 24 + +; Bar offsets +offset-x = 0% +offset-y = 0 + +; Number of spaces to add at the beginning/end of the bar +; Individual side values can be defined using: +; padding-{left,right} +padding = 2 + +; Set Bar Colors +background = ${colors.dark-black} +foreground = ${colors.dark-white} + +; Under-/overline pixel size and argb color +; Individual values can be defined using: +; {overline,underline}-size +; {overline,underline}-color +line-size = 2 + +; Fonts are defined using ; +; Font names are specified using a fontconfig pattern. +; font-0 = NotoSans-Regular:size=8;2 +; font-1 = MaterialIcons:size=10 +; font-2 = Termsynu:size=8;-1 +; font-3 = FontAwesome:size=10 +; See the Fonts wiki page for more details +font-0 = SourceCodePro+Powerline+Awesome Regular-Regular:size=9 +font-1 = Font Awesome 5 Free Regular-Regular:size=9 +font-2 = Font Awesome 5 Free Solid-Solid:size=9 +font-3 = Font Awesome 5 Free Solid-Book:size=9 +font-4 = Font Awesome 5 Brands Regular-Regular:siye=9 + +; The separator will be inserted between the output of each module +separator = + +; Number of spaces to add before/after each module +; Individual side values can be defined using: +; module-margin-{left,right} +module-margin = 1 + +; Modules are added to one of the available blocks +; modules-left = cpu ram +; modules-center = xwindow xbacklight +; modules-right = ipc clock +modules-left = bspwm +modules-center = title +modules-right = cpu memory backlight volume battery date + +; Position of the system tray window +; If empty or undefined, tray support will be disabled +; NOTE: A center aligned tray will cover center aligned modules +; +; Available positions: +; left +; center +; right +tray-position = right + +; If true, the bar will not shift its +; contents when the tray changes +tray-detached = false + +; Tray icon max size +tray-maxsize = 16 + +; Enable pseudo transparency +; Will automatically be enabled if a fully transparent +; background color is defined using `tray-background` +tray-transparent = false + +; Background color for the tray container +; By default the tray container will use the bar +; background color. +; Note: 32 bit alpha blending is not supported. +tray-background = ${root.background} + +; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%) +tray-offset-x = 5 +tray-offset-y = 0 + +; Pad the sides of each tray icon +tray-padding = 1 + +; Scale factor for tray clients +tray-scale = 1.0 + +; Locale used to localize various module data (e.g. date) +; Expects a valid libc locale, for example: sv_SE.UTF-8 +locale = de_DE.UTF-8 + +[bar/9560-bottom] +; Define bar monitor +monitor = "eDP-1" + +; Enable support for inter-process messaging +; See the Messaging wiki page for more details. +enable-ipc = true + +; Put the bar at the bottom of the screen +bottom = true + +; Prefer fixed center position for the `modules-center` block +; When false, the center position will be based on the size of the other blocks. +fixed-center = false + +; Set size of the bar +width = 100% +height = 24 + +; Bar offsets +offset-x = 0% +offset-y = 0 + +; Number of spaces to add at the beginning/end of the bar +; Individual side values can be defined using: +; padding-{left,right} +padding = 2 + +; Set Bar Colors +background = ${colors.dark-black} +foreground = ${colors.dark-white} + +; Under-/overline pixel size and argb color +; Individual values can be defined using: +; {overline,underline}-size +; {overline,underline}-color +line-size = 2 + +; Fonts are defined using ; +; Font names are specified using a fontconfig pattern. +; font-0 = NotoSans-Regular:size=8;2 +; font-1 = MaterialIcons:size=10 +; font-2 = Termsynu:size=8;-1 +; font-3 = FontAwesome:size=10 +; See the Fonts wiki page for more details +font-0 = SourceCodePro+Powerline+Awesome Regular-Regular:size=9 +font-1 = Font Awesome 5 Free Regular-Regular:size=9 +font-2 = Font Awesome 5 Free Solid-Solid:size=9 +font-3 = Font Awesome 5 Free Solid-Book:size=9 +font-4 = Font Awesome 5 Brands Regular-Regular:siye=9 + +; The separator will be inserted between the output of each module +separator = + +; Number of spaces to add before/after each module +; Individual side values can be defined using: +; module-margin-{left,right} +module-margin = 1 + +; Modules are added to one of the available blocks +; modules-left = cpu ram +; modules-center = xwindow xbacklight +; modules-right = ipc clock +modules-left = filesystem +modules-center = +modules-right = wired-network-usb-right wired-network-usb-left wifi powermenu + +; Locale used to localize various module data (e.g. date) +; Expects a valid libc locale, for example: sv_SE.UTF-8 +locale = de_DE.UTF-8 + + +; +; +; include modules configuration +include-file = $HOME/.config/polybar/mod_config + diff --git a/dotfiles/config/polybar/cpuload.sh b/dotfiles/config/polybar/cpuload.sh new file mode 100755 index 0000000..ad5bad2 --- /dev/null +++ b/dotfiles/config/polybar/cpuload.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +load=$(uptime | grep -ohe 'load average[s:][: ].*' | sed 's/,//g' | awk '{print $3" "$4" "$5}') + +echo -n $load diff --git a/dotfiles/config/polybar/launch.sh b/dotfiles/config/polybar/launch.sh new file mode 100755 index 0000000..e1a3429 --- /dev/null +++ b/dotfiles/config/polybar/launch.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +# Terminate already running bar instances +killall -q polybar +killall -q refresh_bar_usb_nic.sh + +# Wait until the processes have been shut down +while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + +# Launch bar1 and bar2 +polybar -r -q 9560-top & +polybar -r -q 9560-bottom & +$HOME/.config/polybar/refresh_bar_usb_nic.sh & diff --git a/dotfiles/config/polybar/mod_config b/dotfiles/config/polybar/mod_config new file mode 100644 index 0000000..1070d98 --- /dev/null +++ b/dotfiles/config/polybar/mod_config @@ -0,0 +1,355 @@ +; +; Modules LEFT +; BSPWM +[module/bspwm] +type = internal/bspwm + +; Only show workspaces defined on the same output as the bar +; NOTE: The bspwm and XRandR monitor names must match, which they do by default. +; Default: true +pin-workspaces = true + +; Create click handler used to focus workspace +; Default: true +enable-click = true + +; Create scroll handlers used to cycle workspaces +; Default: true +enable-scroll = false + +; Set the scroll cycle direction +; Default: true +reverse-scroll = false + +; Label for focused workspaces +label-focused = %name% +label-focused-foreground = ${colors.light-white} +label-focused-background = ${colors.light-black} +label-focused-underline= ${colors.dark-yellow} +label-focused-padding = 1 + +; Label for occupied workspaces +label-occupied = %name% +label-occupied-foreground = ${colors.dark-yellow} +label-occupied-padding = 1 + +; Label for urgend workspaces +label-urgent = %name%! +label-urgent-background = ${colors.light-red} +label-urgent-padding = 1 + +; Label for empty workspaces +label-empty = %name% +label-empty-foreground = ${colors.dark-white} +label-empty-padding = 1 + +; filesystem +[module/filesystem] +type = internal/fs +interval = 25 + +mount-0 = / +mount-1 = /home +mount-2 = /boot +mount-3 = /esp +mount-4 = /tmp + +label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %used% (%percentage_used%%)/%free% +label-unmounted = %mountpoint% not mounted +label-unmounted-foreground = ${colors.dark-white} + +; Spacing between entries +; Default: 2 +spacing = 1 + + +; +; Modules CENTER +[module/title] +type = internal/xwindow + +format-foreground = ${colors.dark-white} +format-padding = 1 + +; Available tokens: +; %title% +; Default: %title% +label = %title% +label-maxlen = 100 + +; +; Modules RIGHT +; backlight - uses ACPI +; (DEPRECAED!) - xbacklight does not work with modesetting driver +[module/backlight] +type = internal/backlight + +card = intel_backlight +format =