From a1825f264dacd78a7d428acb36218994c12a3b42 Mon Sep 17 00:00:00 2001 From: overflowerror Date: Mon, 6 Jan 2014 20:54:17 +0100 Subject: [PATCH] second commit --- home/overflow/.config/openbox/autostart | 40 + home/overflow/.config/openbox/menu.xml | 6 + home/overflow/.config/openbox/rc.xml | 864 ++++++++++++++++++ home/overflow/.conkyrc | 71 ++ home/overflow/.messagerc | 11 + home/overflow/.zshrc | 48 + usr/local/bin/battery-percentage | 12 + usr/local/bin/battery-status | 9 + usr/local/bin/cpu-temp | 3 + .../functions/Prompts/prompt_overflow_setup | 37 + 10 files changed, 1101 insertions(+) create mode 100755 home/overflow/.config/openbox/autostart create mode 100644 home/overflow/.config/openbox/menu.xml create mode 100644 home/overflow/.config/openbox/rc.xml create mode 100644 home/overflow/.conkyrc create mode 100755 home/overflow/.messagerc create mode 100644 home/overflow/.zshrc create mode 100755 usr/local/bin/battery-percentage create mode 100755 usr/local/bin/battery-status create mode 100755 usr/local/bin/cpu-temp create mode 100644 usr/share/zsh/functions/Prompts/prompt_overflow_setup diff --git a/home/overflow/.config/openbox/autostart b/home/overflow/.config/openbox/autostart new file mode 100755 index 0000000..ed3c04e --- /dev/null +++ b/home/overflow/.config/openbox/autostart @@ -0,0 +1,40 @@ +## ManjaroBox Autostart File +## +## Written by Carl Duff +## +## Note that global autostart .desktop files will also be in +## /etc/xdg/openbox/autostart. These will include applications +## such as the Network Manager and Parcellite +## + +## DPMS - Display Power Management Signaling +## This is disabled by default to prevent auto-actions when +## the system is idle, such as screen blanking (10 mins) or +## suspending (1 hour). +xset -dpms; xset s off & + +## Basic compositing effects +compton -CGb & + +## Background +nitrogen --restore & + +## Panel +(sleep 1s && tint2) & + +## Startup +#(sleep 1s && pnmixer) & +#(sleep 1s && pa-applet) & +(sleep 3s && conky) & +#u expos window switcher +skippy-xd --start-daemon & +easystroke & + +## Optionally enable file manager in daemon mode for automounting +(sleep 1s && thunar --daemon) & + +## Optionally enable screensaver +#(sleep 1s && xautolock -time 15 -locker 'xlock -mode blank') & + +## Optionally disable touchpad +#/usr/bin/synclient TouchpadOff=1 & diff --git a/home/overflow/.config/openbox/menu.xml b/home/overflow/.config/openbox/menu.xml new file mode 100644 index 0000000..a0583f5 --- /dev/null +++ b/home/overflow/.config/openbox/menu.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/home/overflow/.config/openbox/rc.xml b/home/overflow/.config/openbox/rc.xml new file mode 100644 index 0000000..c3e57f3 --- /dev/null +++ b/home/overflow/.config/openbox/rc.xml @@ -0,0 +1,864 @@ + + + + + 10 + 20 + + + yes + + no + + yes + + no + + 200 + + no + + + + Smart + +
yes
+ + Active + + + +
+ + Mire_v2_pink + CIMLS + + yes + no + + sans + 8 + + bold + + normal + + + + sans + 8 + + bold + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + bold + + normal + + + + sans + 9 + + bold + + normal + + + + + + 4 + 1 + + + + 875 + + + + yes + Nonpixel + + Center + + + + 10 + + 10 + + + + + + 1 + 0 + 0 + 0 + + + TopLeft + + 0 + 0 + no + Above + + Vertical + + no + 300 + + 300 + + Middle + + + + C-g + + + + left + no + + + + + right + no + + + + + up + no + + + + + down + no + + + + + left + no + + + + + right + no + + + + + up + no + + + + + down + no + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + + + + + + + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + yes + yes + + + + + + + + + + + right + + + + + left + + + + + up + + + + + down + + + + + + + true + lxterminal + + lxterminal + + + + + + true + thunar + + thunar + + + + + + true + synapse + + synapse + + + + + + true + dmenu + + dmenu_run -fn -misc-fixed-*-*-*-*-20-200-*-*-*-*-*-* -i -nf 'gray' -sb 'dark green' -nb 'dim gray' + + + + + + true + oblogout + + oblogout + + + + + + true + gnome-screenshot + + gnome-screenshot + + + + + xbacklight +10 + + + + + xbacklight -10 + + + + + + + + + + + + skippy-xd --activate-window-picker + + + + + + + + + + + + + 0 + 0 + 666 + 768 + + + + + + 666 + 0 + 666 + 768 + + + + + 1 + + 200 + + 400 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + + + + + + + + + no + + + + + + + + + + + yes + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + + top + + + + + + + left + + + + + + + right + + + + + + + bottom + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + vertical + + + + + horizontal + + + + + + + + + + + + + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + + + + + + + + + + + + client-list-combined-menu + + + + + root-menu + + + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + menu.xml200no100400 + if this is a negative value, then the delay is infinite and the + submenu will not be hidden until a different submenu is opened --> + yes + + yes + + + + + +
diff --git a/home/overflow/.conkyrc b/home/overflow/.conkyrc new file mode 100644 index 0000000..983ed94 --- /dev/null +++ b/home/overflow/.conkyrc @@ -0,0 +1,71 @@ +## ManjaroBox Conky Configuration Script +## +## Written by Carl Duff & Ugo Yak +## Website: www.manjaro.org - Forum: http://forum.manjaro.org/ +## + +# Basic Settings + +background yes +use_xft yes +xftfont sans:size=11 +xftalpha 1 +update_interval 1.0 +total_run_times 0 +own_window yes +own_window_transparent yes +own_window_type override #desktop +own_window_hints below,sticky,skip_taskbar,skip_pager +double_buffer yes +minimum_size 450 1 +maximum_width 600 +draw_shades no +draw_outline no +draw_borders no +draw_graph_borders no +default_color Black +default_shade_color 000000 +default_outline_color d9d7d6 +alignment tr +gap_x 5 +gap_y 20 +no_buffers yes +uppercase no +cpu_avg_samples 2 +override_utf8_locale yes + +## ManjaroBang Conky Display +## +## Note - if internet connection speeds do not show, then enter 'ip addr' into the terminal +## to identify your correct Wireless and Ethernet connection names (e.g. wlo1, eno1) +## +TEXT +${font sans:bold:size=18}${alignr}${color #35BF5C}${time %e} ${color #BEBEBE}${time %B}${color #35BF5C} ${time %Y}${color #BEBEBE} ${time %l:%M}${font sans:bold:size=15}${time %p}${voffset -8} +${color #BEBEBE}${hr 1}${voffset -4}{voffset 3} +${font sans:bold:size=9}${alignr}${color #35BF5C}RAM ${color #BEBEBE}$mem ${color #B22222} / ${color #BEBEBE}$memmax - ${color #35BF5C}HD ${color #BEBEBE}$fs_used ${color #B22222} / ${color #BEBEBE} $fs_size${voffset 2} +${font sans:bold:size=9}${alignr}${color #35BF5C}CPU ${color #BEBEBE}${cpu cpu1} %, ${cpu cpu2} %, ${cpu cpu3} %, ${cpu cpu4} %${voffset 3} +${font sans:bold:size=9}${alignr}${color #35BF5C}Uptime ${color #BEBEBE}$uptime_short - ${color #35BF5C}Desktop ${color #BEBEBE}$desktop${voffset 3} +${font sans:bold:size=9}${alignr}${color #35BF5C}Temperature ${color #BEBEBE}${execi 8 /usr/local/bin/cpu-temp} °C - ${color #35BF5C}Battery ${color #BEBEBE}$battery_percent % ${voffset 3} +${hr 1}${voffset 6} +#${font sans:bold:size=9}${alignr}${color #35BF5C}Shift + Left-Mouse +#${alignr}${color #BEBEBE}Drag Window${voffset -5} + +${font sans:bold:size=9}${alignr}${color #35BF5C}d, f, m, s, t, x, y + +#${font sans:bold:size=9}${alignr}${color #35BF5C}Super + d +#${alignr}${color #BEBEBE}Toggle Desktop${voffset -5} + +#${font sans:bold:size=9}${alignr}${color #35BF5C}Super + f +#${alignr}${color #BEBEBE}File Manager${voffset -5} + +#${font sans:bold:size=9}${alignr}${color #35BF5C}Super + m +#${alignr}${color #BEBEBE}DMenu${voffset -5} + +#${font sans:bold:size=9}${alignr}${color #35BF5C}Super + s +#${alignr}${color #BEBEBE}Synapse${voffset -5} + +#${font sans:bold:size=9}${alignr}${color #35BF5C}Super + t +#${alignr}${color #BEBEBE}Terminal${voffset -5} + +#${font sans:bold:size=9}${alignr}${color #35BF5C}Super + x +#${alignr}${color #BEBEBE}Logout... diff --git a/home/overflow/.messagerc b/home/overflow/.messagerc new file mode 100755 index 0000000..f69e910 --- /dev/null +++ b/home/overflow/.messagerc @@ -0,0 +1,11 @@ +#!/bin/zsh +echo -n "\033[36m" +echo " (-.(-.(-.-).-).-)" +echo " You and which army?" +echo + +echo -n "\033[33m" +cal | awk '{ print " " $0}' +echo "\033[7A\033[39C\033[34m`date +%T`\n\033[36C\033[31m`whoami`\033[33m@\033[35m`hostname`\n\033[30C\033[32m`cat /proc/loadavg`\n\033[30C\033[0m\033[34m\u26A3 & \u26A4 Problem, bitch?\033[0m\n\n\n\n" +#fortune -s +echo " " diff --git a/home/overflow/.zshrc b/home/overflow/.zshrc new file mode 100644 index 0000000..be58dea --- /dev/null +++ b/home/overflow/.zshrc @@ -0,0 +1,48 @@ +# Set up the prompt + +#autoload -Uz promptinit +#promptinit +#prompt adam1 + +setopt histignorealldups sharehistory + +# Use emacs keybindings even if our EDITOR is set to vi +bindkey -e + +# Keep 1000 lines of history within the shell and save it to ~/.zsh_history: +HISTSIZE=1000 +SAVEHIST=1000 +HISTFILE=~/.zsh_history + +# Use modern completion system +autoload -Uz compinit +compinit + +zstyle ':completion:*' auto-description 'specify: %d' +zstyle ':completion:*' completer _expand _complete _correct _approximate +zstyle ':completion:*' format 'Completing %d' +zstyle ':completion:*' group-name '' +zstyle ':completion:*' menu select=2 +eval "$(dircolors -b)" +zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} +zstyle ':completion:*' list-colors '' +zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s +zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*' +zstyle ':completion:*' menu select=long +zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s +zstyle ':completion:*' use-compctl false +zstyle ':completion:*' verbose true + +zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' +zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' + +# my lines + +#PROMPT="%F{red}%(?..%U%?%b%u)%F{cyan}%~ %B%#%b%f " +#RPROMPT="%F{magenta}[%l]%f" + +autoload promptinit +promptinit +prompt overflow + +./.messagerc diff --git a/usr/local/bin/battery-percentage b/usr/local/bin/battery-percentage new file mode 100755 index 0000000..622258a --- /dev/null +++ b/usr/local/bin/battery-percentage @@ -0,0 +1,12 @@ +#!/bin/bash + +pushd /sys/class/power_supply/BAT0 > /dev/null + +now=`cat charge_now` +full=`cat charge_full` + +percentage=`python -c "print (int($now.0/$full*100 + 0.5))"` + +echo $percentage + +popd > /dev/null diff --git a/usr/local/bin/battery-status b/usr/local/bin/battery-status new file mode 100755 index 0000000..5c81045 --- /dev/null +++ b/usr/local/bin/battery-status @@ -0,0 +1,9 @@ +#!/bin/bash + +if grep -i discharging /sys/class/power_supply/BAT0/status > /dev/null; then + status="↓" +else + status="↑" +fi + +echo $status diff --git a/usr/local/bin/cpu-temp b/usr/local/bin/cpu-temp new file mode 100755 index 0000000..3edcc3a --- /dev/null +++ b/usr/local/bin/cpu-temp @@ -0,0 +1,3 @@ +#!/bin/bash + +python -c "print (int(`sensors | grep Physical | awk '{ print $4 }' | awk -F "°" '{ print $1 }'`))" diff --git a/usr/share/zsh/functions/Prompts/prompt_overflow_setup b/usr/share/zsh/functions/Prompts/prompt_overflow_setup new file mode 100644 index 0000000..6b1c9fd --- /dev/null +++ b/usr/share/zsh/functions/Prompts/prompt_overflow_setup @@ -0,0 +1,37 @@ +# Very overflow prompt +prompt_overflow_setup () { + + PROMPT="%K{blue}%F{red}%(?.. %B%U%?%u%b%K{blue})%F{white} %B%T%b%K{blue} %F{blue}%(!.%K{magenta}.%K{cyan})⮀ %F{black}%~ %k%(!.%F{magenta}.%F{cyan})⮀%f " + RPROMPT="%(4V.%F{red}.%(5V.%F{yellow}.%F{green}))%1v%2v%%%f %(6V.%F{red}.%(7V.%F{yellow}.%F{green}))%3v°C%f" + + prompt_opts=( cr percent ) + +} + +function precmd () { + + val=`battery-percentage` + batstatus=`battery-status` + temp=`cpu-temp` + + psvar=("$batstatus" "$val" "$temp") + + if [ $val -le 20 ]; then + # red + psvar[4]=1 + elif [ $val -le 30 ]; then + # yellow + psvar[5]=1 + fi + + if [ $temp -ge 90 ]; then + # red + psvar[6]=1 + elif [ $temp -ge 80 ]; then + # yellow + psvar[7]=1 + fi + +} + +prompt_overflow_setup "$@"