Browse Source

added basic files for working configuration.

master
Jeffrey Martin 4 years ago
commit
36a6cd0fbb

+ 123
- 0
i3/.config/i3/config View File

@@ -0,0 +1,123 @@
# Constants
set $mod Mod1

set $utxt #101218
set $focused #1f222d
set $unfocused #252936
set $utext #7780a1
set $ftext #ffffff
set $ubg #ee829f
set $indicator #fcc09e
set $bg-color #2f343f
set $inactive-bg-color #2f343f
set $text-color #f3f4f5
set $inactive-text-color #676E7D
set $urgent-bg-color #E53935

# General Configuration
font pango:FontAwesome 11, System San Francisco Display 8
floating_modifier $mod
hide_edge_borders both
new_window pixel 4
smart_borders on
gaps inner 10
exec_always feh --bg-scale /home/drecx/media/images/tree.jpg
exec_always compton
exec_always mopidy

# Window-Related Bindings
bindsym $mod+w kill
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
bindsym $mod+space floating toggle
bindsym $mod+f fullscreen toggle
bindsym $mod+v layout toggle split
bindsym $mod+g split h
bindsym $mod+o gaps outer current minus 5
bindsym $mod+Shift+o gaps outer current plus 5
bindsym $mod+Shift+space focus mode_toggle
bindsym $mod+r mode "  "
mode "  " {
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
bindsym Escape mode "default"
}

# Restart-Related Bindings
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart

# Program-Related Bindings
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+e exec thunar
bindsym $mod+d exec rofi -show run 1300 -location 0 -lines 5 -bw 0 -font "Hack 10" -separator-style none -hide-scrollbar
bindsym $mod+Shift+x exec i3lock --color 222222

# Volume & Media Bindings
bindsym XF86AudioRaiseVolume exec amixer set Master 5%+
bindsym XF86AudioLowerVolume exec amixer set Master 5%-
bindsym XF86AudioMute exec amixer set Master toggle

# Workspace-Related Bindings
bindsym $mod+1 workspace $workspace1
bindsym $mod+2 workspace $workspace2
bindsym $mod+3 workspace $workspace3
bindsym $mod+4 workspace $workspace4
bindsym $mod+5 workspace $workspace5
bindsym $mod+6 workspace $workspace6
bindsym $mod+7 workspace $workspace7
bindsym $mod+8 workspace $workspace8
bindsym $mod+9 workspace $workspace9
bindsym $mod+0 workspace $workspace10

bindsym $mod+Shift+1 move container to workspace $workspace1
bindsym $mod+Shift+2 move container to workspace $workspace2
bindsym $mod+Shift+3 move container to workspace $workspace3
bindsym $mod+Shift+4 move container to workspace $workspace4
bindsym $mod+Shift+5 move container to workspace $workspace5
bindsym $mod+Shift+6 move container to workspace $workspace6
bindsym $mod+Shift+7 move container to workspace $workspace7
bindsym $mod+Shift+8 move container to workspace $workspace8
bindsym $mod+Shift+9 move container to workspace $workspace9
bindsym $mod+Shift+0 move container to workspace $workspace10
set $workspace1 "1: "
set $workspace2 "2: "
set $workspace3 "3: "
set $workspace4 "4: "
set $workspace5 "5: "
set $workspace6 "6: "
set $workspace7 "7: "
set $workspace8 "8: "
set $workspace9 "9: "
set $workspace10 "10: "

# Window Colors
# border background text indicator
client.focused $focused $focused $ftext $indicator
client.focused_inactive $unfocused $unfocused $utext $indicator
client.unfocused $unfocused $unfocused $utext $indicator
client.urgent $unfocused $ubg $utxt $indicator

# bar
bar {
status_command i3blocks -c /home/drecx/.config/i3/i3blocks.conf
position top
height 17
strip_workspace_numbers yes
colors {
background $bg-color
separator #757575
# border background text
focused_workspace $bg-color $bg-color $text-color
inactive_workspace $inactive-bg-color $inactive-bg-color $inactive-text-color
urgent_workspace $urgent-bg-color $urgent-bg-color $text-color
}
}

+ 22
- 0
i3/.config/i3/i3blocks.conf View File

@@ -0,0 +1,22 @@
command=$SCRIPT_DIR/$BLOCK_NAME
color=#E0E0E0

[load]
command=/home/drecx/.config/i3/scripts/load_average
interval=1
label=

[disk]
command=/home/drecx/.config/i3/scripts/disk
interval=1
label=

[volume]
command=/home/drecx/.config/i3/scripts/volume 2
label=
interval=1

[date]
command=date '+%b %d %H:%M'
interval=1
label=

+ 37
- 0
i3/.config/i3/scripts/disk View File

@@ -0,0 +1,37 @@
#!/bin/sh
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

DIR="${BLOCK_INSTANCE:-$HOME}"
ALERT_LOW="${1:-10}" # color will turn red under this value (default: 10%)

df -h -P -l "$DIR" | awk -v alert_low=$ALERT_LOW '
/\/.*/ {
# full text
print $4
# short text
print $4
use=$5
# no need to continue parsing
exit 0
}
END {
gsub(/%$/,"",use)
if (100 - use < alert_low) {
# color
print "#FF0000"
}
}
'

+ 7
- 0
i3/.config/i3/scripts/exit_menu View File

@@ -0,0 +1,7 @@
#!/bin/bash
while [ "$select" != "NO" -a "$select" != "YES" ]; do
select=$(echo -e 'NO\nYES' | dmenu -nb '#2f343f' -nf '#f3f4f5' -sb '#9575cd' -sf '#f3f4f5' -fn '-*-*-medium-r-normal-*-*-*-*-*-*-100-*-*' -i -p "Are you sure you want to logout?")
[ -z "$select" ] && exit 0
done
[ "$select" = "NO" ] && exit 0
i3-msg exit

+ 34
- 0
i3/.config/i3/scripts/load_average View File

@@ -0,0 +1,34 @@
#!/bin/sh
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

load="$(cut -d ' ' -f1 /proc/loadavg)"
cpus="$(nproc)"

# full text
echo "$load"

# short text
echo "$load"

# color if load is too high
awk -v cpus=$cpus -v cpuload=$load '
BEGIN {
if (cpus <= cpuload) {
print "#FF0000";
exit 33;
}
}
'

+ 46
- 0
i3/.config/i3/scripts/volume View File

@@ -0,0 +1,46 @@
#!/usr/bin/env perl

## The sink we are interested in should be given as the
## 1st argument to the script.
my $sink=$ARGV[0] || die("Need a sink number as the first argument\n");

## If the script has been run with a second argument,
## that argument will be the volume threshold we are checking
my $volume_limit=$ARGV[1]||undef;

## Run the pactl command and save the output in
## ther filehandle $fh
open(my $fh, '-|', 'pactl list sinks');

## Set the record separator to consecutive newlines (same as -000)
## this means we read the info for each sink as a single "line".
$/="\n\n";

## Go through the pactl output
while (<$fh>) {
## If this is the sink we are interested in
if (/#$sink/) {
## Extract the current colume of this sink
/Volume:.*?(\d+)%/;
my $volume=$1;
## If the script has been run with a second argument,
## check whether the volume is above or below that
if ($volume_limit) {
## If the volume os greater than or equal to the
## value passed, print "y"
if ($volume >= $volume_limit) {
print "y\n";
exit 0;
}
else {
print "n\n";
exit 1;
}
}
## Else, if the script has been run with just one argument,
## print the current volume.
else {
print "$volume%\n";
}
}#
}

+ 56
- 0
urxvt/.Xresources View File

@@ -0,0 +1,56 @@
! c o l o r s
URxvt*color0: #101218
URxvt*color1: #ee829f
URxvt*color2: #a5ffe1
URxvt*color3: #ffefcc
URxvt*color4: #97bbf7
URxvt*color5: #c0b7f9
URxvt*color6: #97e0ff
URxvt*color7: #d1d4e0
URxvt*color8: #7780a1
URxvt*color9: #ee829f
URxvt*color10: #a5ffe1
URxvt*color11: #ffefcc
URxvt*color12: #97bbf7
URxvt*color13: #c0b7f9
URxvt*color14: #97e0ff
URxvt*color15: #ffffff
URxvt*color16: #f99170
URxvt*color17: #fcc09e
URxvt*color18: #1f222d
URxvt*color19: #252936
URxvt*color20: #C0C5CE
URxvt*color21: #C9CCDB
URxvt*background: #101218
URxvt*foreground: #E6EFF7
URxvt*cursorColor: #E6EFF7


! bg fg (b) bgalt hlbg hlfg
rofi.color-normal: #2f343f, #f3f4f5, #2f343f, #757575, #f3f4f5
rofi.color-window: #2f343f, #2f343f

! f o n t s

URxvt.font: xft:Tamsyn:pixelsize=14
URxvt.boldFont: xft:Tamsyn:pixelsize=14:bold
URxvt.italicFont: xft:Tamsyn:pixelsize=14:italic
URxvt.boldItalicFont: xft:Tamsyn:pixelsize=14:bold:italic
URxvt.letterSpace: -1.5

! i n t e r f a c e
URxvt.internalBorder: 5
URxvt.externalBorder: 0

URxvt.scrollBar: false

URxvt*fading: 30



! e x t e n s i o n s
URxvt.perl-ext-common: matcher

URxvt.url-launcher: /usr/bin/qutebrowser
URxvt.keysym.M-Delete: perl:matcher:list
URxvt.colorUL: #7780a1

+ 4
- 0
xfiles/.xinitrc View File

@@ -0,0 +1,4 @@
setxkbmap -option caps:escape
xrdb .Xresources

exec i3

Loading…
Cancel
Save