Skip to content

Commit

Permalink
update work
Browse files Browse the repository at this point in the history
  • Loading branch information
beaussan committed Jan 21, 2020
1 parent 267f8e2 commit ef8798b
Show file tree
Hide file tree
Showing 11 changed files with 176 additions and 27 deletions.
3 changes: 3 additions & 0 deletions general/compton.conf
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ blur-background-exclude = [
opacity-rule = [
"99:class_g = 'Firefox'",
"99:class_g = 'Google-chrome'",
"99:class_g = 'factorio'",
"99:class_g = 'Vivaldi-stable'",
"99:class_g ~= 'notion-nativefier.*'",

"99:class_g = 'Vlc'"
];

Expand Down
12 changes: 10 additions & 2 deletions general/i3config
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ assign [class="jetbrains-webstorm"] $workspace4
assign [class="Google-chrome"] $workspace2
assign [class="Slack"] $workspace5
assign [class="Spotify"] $workspace5
assign [title="Spotify"] $workspace5
assign [class="GitKraken"] $workspace1
assign [class="TelegramDesktop"] $workspace1
assign [class="notion-nativefier"] $workspace1


# HIDE EDGE BORDERS
Expand All @@ -88,6 +88,9 @@ bindsym $mod+d exec i3-dmenu-desktop --dmenu='rofi -dmenu -show run -location 1
# lock screen
bindsym $mod+L exec ~/scripts/lock.sh

# Screenshoot
bindsym $mod+s exec flameshot gui

bindsym $mod+Tab focus right
bindsym $mod+Tab+a focus left

Expand All @@ -106,6 +109,10 @@ bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# audio with bose keys + spofify
bindsym XF86AudioPlay exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
bindsym XF86AudioPrev exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
bindsym XF86AudioNext exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next

# move to monitor
bindsym $mod+Shift+Left move workspace to output left
Expand Down Expand Up @@ -134,7 +141,7 @@ bindsym $mod+q kill
bindsym $mod+f fullscreen

# change container layout (stacked, tabbed, default)
bindsym $mod+s layout stacking
#bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout default

Expand Down Expand Up @@ -210,6 +217,7 @@ exec --no-startup-id feh --bg-scale ~/.dotfiles/wall.jpg
exec --no-startup-id xautolock -time 10 -locker ~/scripts/lock.sh -secure
exec --no-startup-id exec compton -cb --config .compton.conf
exec --no-startup-id exec compton -cb --config .compton.conf
exec --no-startup-id flameshot
exec --no-startup-id jetbrains-toolbox --minimize --disable-seccomp-filter-sandbox
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
exec xrdb ~/.Xresources
Expand Down
21 changes: 13 additions & 8 deletions general/polybar.config
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ padding-left = 2
padding-right = 2

module-margin-left = 1
module-margin-right = 2
module-margin-right = 1

font-0 = Monoid Nerd Font:size=9;1

modules-left = spotify vpncheck vpn-nordvpn-status
modules-left = bluetooth-controll spotify vpncheck vpn-nordvpn-status
modules-center =
modules-right = xbacklight wlan battery cpu memory voltage temperature
modules-right = wlan xbacklight battery cpu memory voltage temperature

tray-detached = false
tray-position = right
Expand All @@ -80,17 +80,14 @@ padding-left = 0
padding-right = 2

module-margin-left = 1
module-margin-right = 2
module-margin-right = 1
;Monoisome 11
font-0 = Monoid Nerd Font:size=9;1

modules-left = i3
modules-center = xwindow
modules-right = volume pkg date background Shutdown

tray-detached = false
tray-position = right

[module/vpncheck]
type = custom/script
exec = pgrep openvpn
Expand Down Expand Up @@ -153,6 +150,14 @@ label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}

[module/bluetooth-controll]
type = custom/script
exec = ~/scripts/bluetooth.sh
tail = true
click-left = ~/scripts/bluetooth.sh --toggle &
; format-foreground = #f2777a
format-underline = #258df5


[module/filesystem]
type = internal/fs
Expand Down Expand Up @@ -270,7 +275,7 @@ label = %percentage_used%%

[module/wlan]
type = internal/network
interface = wlp59s0
interface = ${env:WIFI_CARD:}
interval = 3.0

format-connected =  <label-connected>
Expand Down
5 changes: 3 additions & 2 deletions general/polybar.launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ killall -q polybar
# Wait until the processes have been shut down
while pgrep -x polybar >/dev/null; do sleep 1; done

WIFI_CARD=$(iw dev | awk '$1=="Interface"{print $2}')
# Launch bar1 and bar2
if type "xrandr"; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar downbar &
MONITOR=$m polybar default &
MONITOR=$m WIFI_CARD=$WIFI_CARD polybar downbar &
MONITOR=$m WIFI_CARD=$WIFI_CARD polybar default &
done
else
polybar downbar &
Expand Down
4 changes: 2 additions & 2 deletions general/polybar.pkg.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# https://github.com/jaagr/polybar/wiki/User-contributed-modules#archlinux-updates
pac=$(checkupdates | wc -l)
aur=$(checkupdates-aur | wc -l)
pac=$(checkupdates 2>/dev/null | wc -l)
aur=$(checkupdates-aur 2>/dev/null | wc -l)

check=$((pac + aur))
if [[ "$check" != "0" ]]
Expand Down
70 changes: 70 additions & 0 deletions general/scripts/bluetooth.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/bin/sh

bluetooth_print() {
bluetoothctl | while read -r; do
if [ "$(systemctl is-active "bluetooth.service")" = "active" -a "$(bluetoothctl show | grep "Powered:" | cut -d ':' -f 2 | cut -d ' ' -f 2)" = "yes" ]; then
# printf '#1'

devices_paired=$(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
counter=0
devices=""

echo "$devices_paired" | while read -r line; do
device_info=$(bluetoothctl info "$line")

if echo "$device_info" | grep -q "Connected: yes"; then
device_alias=$(echo "$device_info" | grep "Alias" | cut -d ' ' -f 2-)

if [ $counter -gt 0 ]; then
devices="${devices}, $device_alias"
#printf ", %s" "$device_alias"
else
devices="$device_alias"
#printf " %s" "$device_alias"
fi

counter=$((counter + 1))
fi

if [ $counter -eq 0 ]; then
echo "%{F#ffffff}"
else
echo "%{F#258df5} %{F#ffffff}$devices"
fi

# printf '\n'
# printf "\%\{F#ffffff\} \%\{F#f0f0f0\}%s" "$devices"
done
else
echo "%{F#787878}"
fi
done
}

bluetooth_toggle() {
if bluetoothctl show | grep -q "Powered: no"; then
bluetoothctl power on >> /dev/null
sleep 1

devices_paired=$(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
echo "$devices_paired" | while read -r line; do
bluetoothctl connect "$line" >> /dev/null
done
else
devices_paired=$(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
echo "$devices_paired" | while read -r line; do
bluetoothctl disconnect "$line" >> /dev/null
done

bluetoothctl power off >> /dev/null
fi
}

case "$1" in
--toggle)
bluetooth_toggle
;;
*)
bluetooth_print
;;
esac
8 changes: 5 additions & 3 deletions general/scripts/init_workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ workspace7="7:"

# App you want to start :
apps=(
#if you're using urxvt then replace st with that
"termite"
#if you're using urxvt then replace st with that
"notion"
"telegram-desktop"
"google-chrome-stable"
"termite"
Expand All @@ -50,10 +50,12 @@ workspaces=(
# counter of opened windows
owNB=-1

nativefier=$HOME/nativefier/bins

# add paths of apps to array
arr=()
arr+=(
'/usr/bin/'
$nativefier
'/usr/bin/'
'/usr/bin/'
'/usr/bin/'
Expand Down
45 changes: 37 additions & 8 deletions general/tmux.conf.local
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,24 @@ tmux_conf_theme_status_fg='#8a8a8a' # light gray
tmux_conf_theme_status_bg='#080808' # dark gray
tmux_conf_theme_status_attr='none'

# terminal title
# - built-in variables are:
# - #{circled_window_index}
# - #{circled_session_name}
# - #{hostname}
# - #{hostname_ssh}
# - #{username}
# - #{username_ssh}
tmux_conf_theme_terminal_title='#h ❐ #S ● #I #W'

# window status style
# - built-in variables are:
# - #{circled_window_index}
# - #{circled_session_name}
# - #{hostname}
# - #{hostname_ssh}
# - #{username}
# - #{username_ssh}
tmux_conf_theme_window_status_fg='#8a8a8a' # light gray
tmux_conf_theme_window_status_bg='#080808' # dark gray
tmux_conf_theme_window_status_attr='none'
Expand All @@ -103,6 +118,11 @@ tmux_conf_theme_window_status_format='#I #W'
# window current status style
# - built-in variables are:
# - #{circled_window_index}
# - #{circled_session_name}
# - #{hostname}
# - #{hostname_ssh}
# - #{username}
# - #{username_ssh}
tmux_conf_theme_window_status_current_fg='#000000' # black
tmux_conf_theme_window_status_current_bg='#00afff' # light blue
tmux_conf_theme_window_status_current_attr='bold'
Expand Down Expand Up @@ -130,10 +150,10 @@ tmux_conf_theme_left_separator_main=''
tmux_conf_theme_left_separator_sub='|'
tmux_conf_theme_right_separator_main=''
tmux_conf_theme_right_separator_sub='|'
#tmux_conf_theme_left_separator_main='' # /!\ you don't need to install Powerline
#tmux_conf_theme_left_separator_sub='' # you only need fonts patched with
#tmux_conf_theme_right_separator_main='' # Powerline symbols or the standalone
#tmux_conf_theme_right_separator_sub='' # PowerlineSymbols.otf font
#tmux_conf_theme_left_separator_main='\uE0B0' # /!\ you don't need to install Powerline
#tmux_conf_theme_left_separator_sub='\uE0B1' # you only need fonts patched with
#tmux_conf_theme_right_separator_main='\uE0B2' # Powerline symbols or the standalone
#tmux_conf_theme_right_separator_sub='\uE0B3' # PowerlineSymbols.otf font, see README.md

# status left/right content:
# - separate main sections with '|'
Expand All @@ -151,14 +171,16 @@ tmux_conf_theme_right_separator_sub='|'
# - #{pairing}
# - #{prefix}
# - #{root}
# - #{uptime_d}
# - #{synchronized}
# - #{uptime_y}
# - #{uptime_d} (modulo 365 when #{uptime_y} is used)
# - #{uptime_h}
# - #{uptime_m}
# - #{uptime_s}
# - #{username}
# - #{username_ssh}
tmux_conf_theme_status_left=' ❐ #S | ↑#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} '
tmux_conf_theme_status_right='#{prefix}#{pairing} #{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} '
tmux_conf_theme_status_left=' ❐ #S | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} '
tmux_conf_theme_status_right='#{prefix}#{pairing}#{synchronized} #{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} '

# status left style
tmux_conf_theme_status_left_fg='#000000,#e4e4e4,#e4e4e4' # black, white , white
Expand Down Expand Up @@ -188,6 +210,12 @@ tmux_conf_theme_root_fg='none'
tmux_conf_theme_root_bg='none'
tmux_conf_theme_root_attr='bold,blink'

# synchronized indicator
tmux_conf_theme_synchronized='🔒' # U+1F512
tmux_conf_theme_synchronized_fg='none'
tmux_conf_theme_synchronized_bg='none'
tmux_conf_theme_synchronized_attr='none'

# battery bar symbols
tmux_conf_battery_bar_symbol_full='◼'
tmux_conf_battery_bar_symbol_empty='◻'
Expand Down Expand Up @@ -227,7 +255,8 @@ tmux_conf_battery_status_discharging='↓' # U+2193
#tmux_conf_battery_status_charging='🔌 ' # U+1F50C
#tmux_conf_battery_status_discharging='🔋 ' # U+1F50B

# clock style
# clock style (when you hit <prefix> + t)
# you may want to use %I:%M %p in place of %R in tmux_conf_theme_status_right
tmux_conf_theme_clock_colour='#00afff' # light blue
tmux_conf_theme_clock_style='24'

Expand Down
9 changes: 7 additions & 2 deletions general/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"


###### Completion
ENABLE_CORRECTION="true"
ENABLE_CORRECTION="false"
COMPLETION_WAITING_DOTS="true"
autoload -U bashcompinit
autoload -U incremental-complete-word
Expand All @@ -22,7 +22,9 @@ plugins=(git common-aliases gradle alias-tips gitignore zsh-autosuggestions yarn


###### Exports
export PATH="~/scripts:~/bin:~/.npm-global/bin:$PATH:/usr/lib/jvm/default/bin/:~/bin/"
# export PATH="~/scripts:~/bin:~/.npm-global/bin:$PATH:/usr/lib/jvm/default/bin/:~/bin/"
export PATH=/home/${USER}/scripts:${PATH}
export PATH=/home/${USER}/bin:${PATH}

#LS_COLORS='no=00:fi=00:di=00;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:';

Expand All @@ -33,11 +35,14 @@ export VISUAL="nvim"
export ZSH_PLUGINS_ALIAS_TIPS_EXCLUDES="_"
export ZSH_PLUGINS_ALIAS_TIPS_EXPAND=1
export ANDROID_HOME=/home/${USER}/Android/Sdk
export GOPATH=/home/${USER}/go

export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
export PATH=${PATH}:~/.yarn/bin:~/.config/yarn/global/node_modules/.bin/
export PATH=${PATH}:~/.local/bin
export PATH=${PATH}:~/nativefier/bins
export PATH=${PATH}:${GOPATH}/bin

export BROWSER=/usr/bin/google-chrome-stable

Expand Down
26 changes: 26 additions & 0 deletions nativifier.conf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- defaults:
link:
relink: true
create: true
force: true


- shell:
-
command : mkdir -p ~/nativefier/bins
description: create folder for nativefier bins
stdin: true
stdout: true
stderr: true
-
command : yarn global add nativefier@latest
description: Install nativefier
stdin: true
stdout: true
stderr: true
-
command : cd ~/nativefier && nativefier --name Notion -p linux -a x64 https://www.notion.so/ && ln -s ~/nativefier/notion-linux-x64/notion ~/nativefier/bins/notion
description: Install notion as nativefier app
stdin: true
stdout: true
stderr: true
Binary file modified wall.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ef8798b

Please sign in to comment.