This commit is contained in:
2018-12-16 13:06:16 +01:00
parent 68f8e15b94
commit 6b730ce230
6 changed files with 83 additions and 42 deletions

View File

@@ -1,8 +1,9 @@
Config { Config {
maxHistoryLength = 10000, maxHistoryLength = 100000,
historyPath = "~/.cache/greenclip.history", historyPath = "~/.cache/greenclip.history",
staticHistoryPath = "~/.cache/greenclip.staticHistory", staticHistoryPath = "~/.cache/greenclip.staticHistory",
imageCachePath = "/tmp/", imageCachePath = "/tmp/",
usePrimarySelectionAsInput = False, usePrimarySelectionAsInput = False,
blacklistedApps = [] blacklistedApps = [],
trimSpaceFromSelection = True
} }

View File

@@ -29,7 +29,7 @@ client.urgent $urgent-bg-color $urgent-bg-color $text-color
# is used in the bar {} block below. # is used in the bar {} block below.
#font pango:monospace 8 #font pango:monospace 8
#font pango:Liberation Sans 10 #font pango:Liberation Sans 10
font pango:System San Francisco Display 8 font pango:System San Francisco Display 10
# This font is widely installed, provides lots of unicode glyphs, right-to-left # This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango). # text rendering and scalability on retina/hidpi displays (thanks to pango).
@@ -124,7 +124,8 @@ set $ws10 "10"
# Define monitor outputs # Define monitor outputs
set $internal eDP1 set $internal eDP1
set $external_1 DP2-1 set $external_1 DP2-2
set $external_tv DP2-1
# switch to workspace # switch to workspace
bindsym $mod+1 workspace $ws1 bindsym $mod+1 workspace $ws1
@@ -150,12 +151,13 @@ bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9 bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10 bindsym $mod+Shift+0 move container to workspace $ws10
# asssign workspace to apps #assign workspaces to monitors
assign [class="Google-chrome-unstable"] $ws1
assign [class="Rambox"] $ws2
workspace $ws1 output $external_1 workspace $ws1 output $external_1
workspace $ws2 output $internal workspace $ws2 output $internal
workspace $ws3 output $external_tv
# asssign workspace to apps
assign [class="google-chrome"] $ws1
# reload the configuration file # reload the configuration file
bindsym $mod+Shift+c reload bindsym $mod+Shift+c reload
@@ -202,9 +204,11 @@ bindsym $mod+r mode "resize"
## Manual management of external displays ## Manual management of external displays
# Set the shortcuts and what they do # Set the shortcuts and what they do
for_window [class="Yad"] floating enable
set $mode_display ext1->int (2), External (x), Internal (i) set $mode_display ext1->int->tv (3), ext1->int (2), External (x), Internal (i)
mode "$mode_display" { mode "$mode_display" {
bindsym 3 exec --no-startup-id xrandr --output $internal --mode 1920x1080 --pos 1920x0 --rotate normal --output $external_tv --mode 1920x1080 --pos 3840x0 --rotate normal -- output $external_1 --primary --mode 1920x1080 --pos 0x0 --rotate normal, mode "default"
bindsym 2 exec --no-startup-id xrandr --output $external_1 --primary --auto --left-of $internal, mode "default" bindsym 2 exec --no-startup-id xrandr --output $external_1 --primary --auto --left-of $internal, mode "default"
bindsym x exec --no-startup-id xrandr --output $external_1 --primary --auto, mode "default" bindsym x exec --no-startup-id xrandr --output $external_1 --primary --auto, mode "default"
bindsym i exec --no-startup-id xrandr --output $internal --primary --auto, mode "default" bindsym i exec --no-startup-id xrandr --output $internal --primary --auto, mode "default"
@@ -263,13 +267,15 @@ exec i3-msg workspace $ws1
# Start default applications # Start default applications
exec_always --no-startup-id $HOME/.config/polybar/launch.sh exec_always --no-startup-id $HOME/.config/polybar/launch.sh
exec greenclip daemon exec_always --no-startup-id numlockx on
exec blueman-applet exec_always --no-startup-id sudo tlp start
exec --no-startup-id greenclip daemon
exec --no-startup-id blueman-applet
exec --no-startup-id nm-applet
exec libinput-gestures-setup start exec libinput-gestures-setup start
exec clipit exec --no-startup-id clipit
exec insync start exec insync start
# auto started by browser # auto started by browser
#exec keepassxc #exec keepassxc
exec rambox exec google-chrome-stable
exec google-chrome-unstable
exec synclient TouchpadOff=1 exec synclient TouchpadOff=1

View File

@@ -1,5 +1,5 @@
[bar/top] [bar/top]
monitor = DP2-1 monitor = ${env:MONITOR:}
width = 100% width = 100%
height = 27 height = 27
@@ -19,11 +19,11 @@ font-2 = "Symbola:style=Regular"
# todo mpd? or spotify? # todo mpd? or spotify?
modules-left = powermenu player-mpris modules-left = powermenu player-mpris
modules-center = date modules-center = popup-calendar
modules-right = pulseaudio backlight touchpad-indicator openvpn-indicator wireless-network wired-network battery modules-right = pulseaudio backlight touchpad-indicator openvpn-indicator tethering wireless-network wired-network battery-combined-udev
[bar/bottom] [bar/bottom]
monitor = DP2-1 monitor = ${env:MONITOR:}
bottom = true bottom = true
width = 100% width = 100%
height = 27 height = 27
@@ -45,7 +45,7 @@ font-2 = "Symbola:style=Regular"
modules-left = modules-left =
modules-center = i3 modules-center = i3
modules-right = cpu memory modules-right = cpu system-cpu-temppercore memory
tray-position = left tray-position = left
tray-padding = 2 tray-padding = 2
@@ -53,7 +53,6 @@ tray-transparent = true
tray-background = #0063ff tray-background = #0063ff
;tray-detached = false ;tray-detached = false
[module/pulseaudio] [module/pulseaudio]
type = internal/pulseaudio type = internal/pulseaudio
@@ -201,7 +200,7 @@ ping-interval = 10
format-connected = <label-connected> <ramp-signal> format-connected = <label-connected> <ramp-signal>
label-connected = 直 %essid% label-connected = 直 %essid%
label-disconnected = 睊 not connected label-disconnected = 睊
label-disconnected-foreground = #66 label-disconnected-foreground = #66
format-packetloss = <animation-packetloss> <label-connected> format-packetloss = <animation-packetloss> <label-connected>
@@ -218,12 +217,33 @@ animation-packetloss-1 = 
animation-packetloss-1-foreground = ${bar/top.foreground} animation-packetloss-1-foreground = ${bar/top.foreground}
animation-packetloss-framerate = 500 animation-packetloss-framerate = 500
[module/wired-network]
type = internal/network
interface = enp0s31f6
interval = 3.0
label-connected =  %local_ip%
label-disconnected = 
label-disconnected-foreground = #66
format-packetloss = <animation-packetloss> <label-connected>
animation-packetloss-0 = 
animation-packetloss-0-foreground = #ffa64c
animation-packetloss-1 = 
animation-packetloss-1-foreground = ${bar/top.foreground}
animation-packetloss-framerate = 500
[module/tethering]
type = internal/network
interface = enp0s20f0u4
interval = 3.0
label-connected =  %local_ip%
label-disconnected-foreground = #66
[module/cpu] [module/cpu]
type = internal/cpu type = internal/cpu
interval = 0.5 interval = 0.5
format = <label> <ramp-coreload> format = <label> <ramp-coreload>
label = CPU label = CPU
ramp-coreload-0 = ▁ ramp-coreload-0 = ▁
#ramp-coreload-0-font = 2 #ramp-coreload-0-font = 2
ramp-coreload-0-foreground = #aaff77 ramp-coreload-0-foreground = #aaff77
@@ -249,19 +269,22 @@ ramp-coreload-7 = █
#ramp-coreload-7-font = 2 #ramp-coreload-7-font = 2
ramp-coreload-7-foreground = #ff5555 ramp-coreload-7-foreground = #ff5555
[module/wired-network] [module/system-cpu-temppercore]
type = internal/network type = custom/script
interface = enp0s31f6 exec = ~/.config/polybar/system-cpu-temppercore.sh
interval = 3.0 interval = 60
label-connected =  %{T3}%local_ip%%{T-}
label-disconnected-foreground = #66
[module/date] [module/date]
type = internal/date type = internal/date
date =  %%{F#99}%d.%m.%Y%%{F-}  %%{F#fff}%H:%M%%{F-} date =  %%{F#99}%d.%m.%Y%%{F-}  %%{F#fff}%H:%M%%{F-}
date-alt = %%{F#fff}%A, %d %B %Y %%{F#fff}%H:%M%%{F#666}:%%{F#fba922}%S%%{F-} date-alt = %%{F#fff}%A, %d %B %Y %%{F#fff}%H:%M%%{F#666}:%%{F#fba922}%S%%{F-}
[module/popup-calendar]
type = custom/script
exec = ~/.config/polybar/popup-calendar.sh
interval = 5
click-left = ~/.config/polybar/popup-calendar.sh --popup
[module/memory] [module/memory]
type = internal/memory type = internal/memory
format = <label> <bar-used> format = <label> <bar-used>

View File

@@ -6,8 +6,15 @@ killall -q polybar
# Wait until the processes have been shut down # Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch bar1 and bar2 # Launch bars on all monitors
polybar bottom & if type "xrandr"; then
polybar top & for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar --reload bottom &
MONITOR=$m polybar --reload top &
done
else
polybar --reload bottom &
polybar --reload top &
fi
echo "Bars launched..." echo "Bars launched..."

View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
if [ "$(nmcli | grep 'Dahoam VPN connection')" ]; then if [ "$(nmcli | grep 'VPN connection')" ]; then
echo "%{A1:nmcli con down Dahoam:}旅%{A}" echo "%{A1:nmcli con down $(nmcli | grep "VPN connection" | cut -d " " -f1):}旅%{A}"
else else
echo "%{A1:nmcli con up Dahoam:}%{F#404040}旅%{F-} %{A}" echo "%{A1:~/bin/vpnup:}%{F#404040}旅%{F-} %{A}"
fi fi

16
.zshrc
View File

@@ -1,12 +1,16 @@
##### ENVIRONMENT ##### ENVIRONMENT
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/felix/bin:/opt/android-sdk/platform-tools:/opt/android-sdk/tools export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/felix/bin
export LANG=en_US.UTF-8 export LANG=en_US.UTF-8
export EDITOR='code' export EDITOR='code'
export GIT_EDITOR='code' export GIT_EDITOR='code'
export PAGER='most' export PAGER='most'
export SHELL="/bin/zsh" export SHELL="/bin/zsh"
export BROWSER='google-chrome-unstable' export TERM=xterm
export BROWSER='google-chrome-stable'
export ANDROID_SDK_ROOT=/opt/android-sdk
export PATH=$PATH:/opt/android-sdk/platform-tools:/opt/android-sdk/tools
# colors for less without compiled termcap files (curses feature) # colors for less without compiled termcap files (curses feature)
export LESS_TERMCAP_mb=$'\e[01;31m' export LESS_TERMCAP_mb=$'\e[01;31m'
@@ -208,12 +212,12 @@ alias :q='exit'
source ~/.zsh/git-prompt/loader.sh source ~/.zsh/git-prompt/loader.sh
#PROMPT='%* %B%{%}%n%{%}@%m %{%}%~%b $(git_super_status) %# ' #PROMPT='%* %B%{%}%n%{%}@%m %{%}%~%b $(git_super_status) %# '
# underline hostname
PROMPT='%* %B%{%}%n%{%}@%U%m%u %{%}%~%b $(git_super_status) %# '
# stuff for development (e.g. nvm) # stuff for development (e.g. nvm)
if [ "$(hostname)" = "x230" ]; then if [ "$(hostname)" = "t480" ]; then
source ~/.zsh/dev-machine.zsh # source ~/.zsh/dev-machine.zsh
# underline hostname
PROMPT='%* %B%{%}%n%{%}@%U%m%u %{%}%~%b $(git_super_status) %# '
fi fi
numlockx on numlockx on