Skip to content

Commit

Permalink
Add pywal/wal and Termite support. Optimize polybar
Browse files Browse the repository at this point in the history
  • Loading branch information
kimond committed Apr 26, 2019
1 parent 31ebeee commit e513c8c
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 38 deletions.
2 changes: 2 additions & 0 deletions bin/reload-dunst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pkill dunst
dunst -config ~/.config/dunst/dunstrc &
2 changes: 2 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ config_files="
i3
compton.conf
rofi
termite
wal
"
# create dotfiles_old in homedir
echo "Creating $olddir for backup of any existing dotfiles in ~"
Expand Down
6 changes: 5 additions & 1 deletion compton.conf
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
opacity-rule = [ "85:class_g= 'Xfce4-terminal'" ];
opacity-rule = [
"85:class_g= 'Xfce4-terminal'",
"85:class_g= 'Termite'",
"85:class_g= 'Rofi'"
];
2 changes: 1 addition & 1 deletion rofi/config.rasi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configuration {
font: "Hack Bold 12";
theme: "arkdark";
theme: "~/.cache/wal/colors-rofi-dark.rasi";
}
3 changes: 3 additions & 0 deletions termite/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[options]
allow_bold = true
font = Hack 10
54 changes: 54 additions & 0 deletions wal/templates/dunstrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[global]
font = "Hack 10"
allow_markup = yes
format = "<b>%s %p</b>\n%b"
sort = yes
indicate_hidden = true
# geometry = "x5"
idle_threshold = 0
geometry = "300x5-30+50"
transparency = 20
alignment = left
show_age_threshold = 60
sticky_history = no
follow = mouse
word_wrap = yes
separator_height = 2
padding = 8
horizontal_padding = 8
separator_color = frame
startup_notification = false
show_indicators = yes
dmenu = /usr/bin/dmenu -p dunst:
browser = /usr/bin/google-chrome-stable
icon_position = left
max_icon_size = 32
icon_folders = /usr/share/icons/Arc/status/16/:/usr/share/icons/Arc/devices/16/


[frame]
width = 1
color = "{background}"

[shortcuts]
close = ctrl+space
close_all = ctrl+shift+space
history = ctrl+grave
context = ctrl+shift+period

[urgency_low]
background = "{background}"
foreground = "{foreground}"
timeout = 15

[urgency_normal]
background = "{background}"
foreground = "{foreground}"
timeout = 25

[urgency_critical]
background = "#ff9999"
foreground = "#000000"
timeout = 0

# vim: ft=cfg
4 changes: 2 additions & 2 deletions xmonad/polybar-launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ killall -q polybar
while pgrep -x polybar >/dev/null; do sleep 1; done

# Launch bar1 and bar2
MONITOR=eDP-1 polybar mybar -c ~/.xmonad/polybar.conf &
MONITOR=HDMI-2 polybar mybar -c ~/.xmonad/polybar.conf &
MONITOR=eDP1 polybar mybar -c ~/.xmonad/polybar.conf &
MONITOR=HDMI2 polybar mybartwo -c ~/.xmonad/polybar.conf &

echo "Bars launched..."
52 changes: 21 additions & 31 deletions xmonad/polybar.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,22 @@
;=====================================================

[colors]
background = #282a2e
background-alt = #444
foreground = #c5c8c6
foreground-alt = #777
primary = #9b739c
secondary = #e60053
extra = #634b73
alert = #bd2c40
background = ${xrdb:color0:#222}
background-alt = ${xrdb:color1:#222}
foreground = ${xrdb:color7:#222}
foreground-alt = ${xrdb:color7:#222}
primary = ${xrdb:color1:#222}
secondary = ${xrdb:color2:#222}
alert = ${xrdb:color3:#222}
extra = ${xrdb:color4:#222}
; background = #282a2e
; background-alt = #444
; foreground = #c5c8c6
; foreground-alt = #777
; primary = #9b739c
; secondary = #e60053
; extra = #634b73
; alert = #bd2c40

[global/wm]
margin-top = 0
Expand Down Expand Up @@ -50,7 +58,7 @@ font-2 = FontAwesome5brands:size=9

modules-left = ewmh
modules-center =
modules-right = xbacklight volume cpu memory temperature filesystem wlan battery battery2 pacman aur date xkeyboard
modules-right = xbacklight volume cpu memory temperature filesystem battery battery2 pacman aur date xkeyboard

tray-position = right
tray-padding = 2
Expand All @@ -61,6 +69,10 @@ tray-padding = 2

;override-redirect = true

[bar/mybartwo]
inherit = bar/mybar
modules-right = xbacklight volume cpu memory temperature filesystem battery battery2 date xkeyboard

[module/ewmh]
type = internal/xworkspaces

Expand Down Expand Up @@ -156,28 +168,6 @@ ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}

[module/wlan]
type = internal/network
interface = wlp4s0
interval = 25.0

format-connected = <ramp-signal> <label-connected>
format-connected-underline = ${colors.extra}
label-connected = %essid%

format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}

ramp-signal-0 = ▁
ramp-signal-1 = ▃
ramp-signal-2 = ▅
ramp-signal-3 = ▇
ramp-signal-4 = █
ramp-signal-foreground = ${colors.foreground-alt}

[module/date]
type = custom/script
exec = date +'%Y-%m-%d %H:%M'
Expand Down
8 changes: 5 additions & 3 deletions xmonad/xmonad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ myWorkspaces = [wsDev, wsBrowser, wsSocial, wsMusic, wsFile, wsMisc, wsGame, wsM
-- Applications
----------------

myTerminal = "xfce4-terminal"
myTerminal = "termite"
myBrowser = "google-chrome-stable"
myBrowserClass = "Google-chrome-stable"
myStatusBar = "~/.xmonad/polybar-launch.sh"
Expand Down Expand Up @@ -130,6 +130,7 @@ tabConfig = def {
----------

myLayoutHook = avoidStruts
$ spacingRaw True (Border 0 5 5 5) True (Border 5 5 5 5) True
$ mouseResizableTile{draggerType = BordersDragger} ||| (
tabbed shrinkText tabConfig |||
Full
Expand Down Expand Up @@ -190,6 +191,7 @@ myKeys conf = let
, ("M-<Return>" , addName "Terminal" $ spawn myTerminal)
, ("M-S-n", addName "Nautilus" $ spawn "nautilus")
, ("<Print>", addName "Screenshot" $ spawn "flameshot full -p ~/Pictures/screenshots")
, ("S-<Print>", addName "Screenshot selection" $ spawn "flameshot gui -p ~/Pictures/screenshots")
, ("C-<Print>", addName "Screenshot selection" $ spawn "flameshot gui -p ~/Pictures/screenshots")
]

Expand All @@ -204,8 +206,8 @@ myStartupHook = do
spawnOnce "nm-applet"
spawnOnce "google-chrome-stable"
spawnOnce "slack"
spawnOnce "dunst -config ~/.config/i3/dunstrc"
spawnOnce "nitrogen --restore"
spawnOnce "dunst -config ~/.config/dunst/dunstrc"
spawnOnce "wal -R"
-- spawn "/usr/lib/gsd-xsettings"
spawn myStatusBar
setDefaultCursor xC_left_ptr
Expand Down
18 changes: 18 additions & 0 deletions zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ fi
if [[ -d "$HOME/.anaconda3" ]]; then
export PATH=$PATH:"$HOME/.anaconda3/bin"
fi
if [[ -d "$HOME/.poetry/bin" ]]; then
export PATH=$PATH:"$HOME/.poetry/bin"
fi

# Cuda
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/cuda/lib64"
Expand Down Expand Up @@ -101,3 +104,18 @@ if [ -f "$HOME/local/google-cloud-sdk/path.zsh.inc" ]; then source "$HOME/local/

# The next line enables shell command completion for gcloud.
if [ -f "$HOME/local/google-cloud-sdk/completion.zsh.inc" ]; then source "$HOME/local/google-cloud-sdk/completion.zsh.inc"; fi

if [ $commands[kubectl] ]; then
source <(kubectl completion zsh)
fi

# Import colorscheme from wal
ps -o 'cmd=' -p $(ps -o 'ppid=' -p $$) | grep -v 'idea' &> /dev/null
if [ $? -eq 0 ]; then
if [[ -f ~/.cache/wal/sequences ]]; then
(cat ~/.cache/wal/sequences &)
fi
if [[ -f ~/.cache/wal/colors-tty.sh ]]; then
source ~/.cache/wal/colors-tty.sh
fi
fi

0 comments on commit e513c8c

Please sign in to comment.