diff options
| author | bozo.kopic <bozo.kopic@gmail.com> | 2020-07-16 04:29:34 +0200 |
|---|---|---|
| committer | bozo.kopic <bozo.kopic@gmail.com> | 2020-07-16 04:29:34 +0200 |
| commit | f61d921fd24c24da4258217510c809825cdbf8f8 (patch) | |
| tree | 46d8e48963b8b2bced3b130ac5f9b54aa703a9aa | |
| parent | 5179366de4375c49e6906ca2b879a064ddb9639c (diff) | |
.
| -rwxr-xr-x | bspwm/bspwmrc | 20 | ||||
| -rw-r--r-- | i3/config | 12 | ||||
| -rwxr-xr-x | install.sh | 14 | ||||
| -rw-r--r-- | mbsync/.mbsyncrc | 22 | ||||
| -rw-r--r-- | offlineimap/.offlineimap.py | 8 | ||||
| -rw-r--r-- | offlineimap/.offlineimaprc | 18 | ||||
| -rw-r--r-- | polybar/config | 94 | ||||
| -rwxr-xr-x | polybar/launch.sh | 5 | ||||
| -rw-r--r-- | subl3/Package Control.sublime-settings | 2 | ||||
| -rw-r--r-- | subl3/Preferences.sublime-settings | 3 | ||||
| -rw-r--r-- | sxhkd/sxhkdrc.bspwm | 54 | ||||
| -rw-r--r-- | sxhkd/sxhkdrc.i3 (renamed from sxhkd/sxhkdrc) | 34 | ||||
| -rw-r--r-- | sxhkd/terminal_bspwm.py | 46 | ||||
| -rw-r--r-- | sxhkd/terminal_i3.py (renamed from terminal.py) | 0 | ||||
| -rwxr-xr-x | xorg/.xsession | 8 | ||||
| -rw-r--r-- | yabar/yabar.conf | 34 |
16 files changed, 305 insertions, 69 deletions
diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc new file mode 100755 index 0000000..6afcdb6 --- /dev/null +++ b/bspwm/bspwmrc @@ -0,0 +1,20 @@ +#!/bin/bash + +sxhkd -c ~/.config/sxhkd/sxhkdrc.bspwm & +~/.config/polybar/launch.sh & + +bspc monitor primary -d 1 2 3 4 term +bspc monitor ^2 -d a s d f + +bspc config border_width 4 +bspc config window_gap 5 + +bspc config focus_follows_pointer true +bspc config pointer_follows_monitor true + +bspc config split_ratio 0.52 +bspc config borderless_monocle true +bspc config gapless_monocle true + +bspc rule -a *:tmux_term desktop=term + @@ -41,15 +41,7 @@ bindsym $mod+Shift+s move container to workspace $wss bindsym $mod+Shift+d move container to workspace $wsd bindsym $mod+Shift+f move container to workspace $wsf -bar { - status_command py3status - tray_output primary - strip_workspace_numbers yes - workspace_min_width 40 - font pango:Font Awesome 5 Free, Font Awesome 5 Brands, Droid Sans Mono 12 -} - -exec_always --no-startup-id feh --bg-scale ~/.dotfiles/pictures/bg1.jpg \ - ~/.dotfiles/pictures/bg2.jpg +exec --no-startup-id sxhkd -c ~/.config/sxhkd/sxhkdrc.i3 +exec --no-startup-id ~/.config/polybar/launch.sh for_window [instance="scratchpad_term"] move container to workspace $wst @@ -22,10 +22,9 @@ ln -sf ~/.profile ~/.bash_profile # git ln -sf $DOTFILES/git/.gitconfig ~/.gitconfig -# offlineimap +# mbsync (isync) mkdir -p ~/mail/ket -ln -sf $DOTFILES/offlineimap/.offlineimaprc ~/.offlineimaprc -ln -sf $DOTFILES/offlineimap/.offlineimap.py ~/.offlineimap.py +ln -sf $DOTFILES/mbsync/.mbsyncrc ~/.mbsyncrc # qtile ln -sf -T $DOTFILES/qtile ~/.config/qtile @@ -33,6 +32,9 @@ ln -sf -T $DOTFILES/qtile ~/.config/qtile # i3 ln -sf -T $DOTFILES/i3 ~/.config/i3 +# bspwm +ln -sf -T $DOTFILES/bspwm ~/.config/bspwm + # sxhkd ln -sf -T $DOTFILES/sxhkd ~/.config/sxhkd @@ -45,6 +47,12 @@ ln -sf -T $DOTFILES/waybar ~/.config/waybar # py3status ln -sf -T $DOTFILES/py3status ~/.config/py3status +# polybar +ln -sf -T $DOTFILES/polybar ~/.config/polybar + +# polybar +ln -sf -T $DOTFILES/yabar ~/.config/yabar + # qutebrowser mkdir -p ~/.config/qutebrowser ln -sf $DOTFILES/qutebrowser/autoconfig.yml ~/.config/qutebrowser/autoconfig.yml diff --git a/mbsync/.mbsyncrc b/mbsync/.mbsyncrc new file mode 100644 index 0000000..e98a624 --- /dev/null +++ b/mbsync/.mbsyncrc @@ -0,0 +1,22 @@ +IMAPAccount ket +Host outlook.office365.com +User bozo.kopic@koncar-ket.hr +PassCmd "pass office.com/bozo.kopic" +SSLType STARTTLS +CertificateFile /etc/ssl/certs/ca-certificates.crt +AuthMech PLAIN + +IMAPStore ket-remote +Account ket + +MaildirStore ket-local +SubFolders Verbatim +Path ~/mail/ket +Inbox ~/mail/ket/INBOX + +Channel ket +Master :ket-remote: +Slave :ket-local: +Patterns * +Create Both +SyncState * diff --git a/offlineimap/.offlineimap.py b/offlineimap/.offlineimap.py deleted file mode 100644 index 0b0ec8f..0000000 --- a/offlineimap/.offlineimap.py +++ /dev/null @@ -1,8 +0,0 @@ -import subprocess - - -def get_password(name): - p = subprocess.Popen(['pass', name], stdout=subprocess.PIPE) - p.wait() - password = p.stdout.read().strip() - return password diff --git a/offlineimap/.offlineimaprc b/offlineimap/.offlineimaprc deleted file mode 100644 index 40e8608..0000000 --- a/offlineimap/.offlineimaprc +++ /dev/null @@ -1,18 +0,0 @@ -[general] -accounts = Ket -pythonfile = ~/.offlineimap.py - -[Account Ket] -localrepository = KetLocal -remoterepository = KetRemote - -[Repository KetLocal] -type = Maildir -localfolders = ~/mail/ket - -[Repository KetRemote] -type = IMAP -cert_fingerprint = 7f0804b4d0a6c83e46a3a00ec98f8343d7308566 -remotehost = outlook.office365.com -remoteuser = bozo.kopic@koncar-ket.hr -remotepasseval = get_password('office.com/bozo.kopic') diff --git a/polybar/config b/polybar/config new file mode 100644 index 0000000..9d1c82c --- /dev/null +++ b/polybar/config @@ -0,0 +1,94 @@ +[bar/base] +monitor-strict = false +monitor-exact = true +override-redirect = false +bottom = false +height = 30 +padding = 2 +background = #000000 +foreground = #ffffff +font-0 = "RobotoMono Nerd Font:size=12" +font-1 = "Roboto Nerd Font:size=12" +module-margin = 1 +separator = | +separator-foreground = #919191 +modules-left = bspwm title +modules-center = +modules-right = wlan0 eth0 pulseaudio battery date + +[bar/bar1] +inherit = bar/base +monitor = +tray-position = right + +[bar/bar2] +inherit = bar/base +monitor = DP1-2 +tray-position = none + +[module/bspwm] +type = internal/bspwm +pin-workspaces = true +format = <label-state> +label-dimmed-focused-background = ${bar/base.background} +label-focused = [ %name% ] +label-focused-foreground = ${bar/base.foreground} +label-focused-background = #3f3f3f +label-occupied = %name% +label-urgent = %name% +label-urgent-foreground = ${bar/base.foreground} +label-urgent-background = #bd2c40 +label-empty = %name% +label-empty-foreground = #555555 +label-separator = | +label-separator-padding = 2 +label-separator-foreground = ${bar/base.separator-foreground} + +[module/title] +type = internal/xwindow +label = %{T2}%title% + +[module/wlan0] +type = internal/network +interface = wlan0 +label-connected = 直 %essid% %local_ip% +label-connected-foreground = ${bar/base.foreground} +label-disconnected = 睊 +label-disconnected-foreground = #66ffffff +click-right = connman-gtk & + +[module/eth0] +type = internal/network +interface = eth0 +label-connected = ﯱ %local_ip% +label-connected-foreground = ${bar/base.foreground} +label-disconnected = +label-disconnected-foreground = #66ffffff +click-left = connman-gtk & + +[module/pulseaudio] +type = internal/pulseaudio +use-ui-max = false +format-volume = <ramp-volume> <label-volume> +label-volume = %percentage:3%% +label-muted = 婢 muted +label-muted-foreground = #666 +ramp-volume-0 = 奄 +ramp-volume-1 = 奔 +ramp-volume-2 = 墳 +click-right = pavucontrol & + +[module/battery] +type = internal/battery +label-charging = %percentage:3% +label-discharging = %percentage:3% +label-full = %percentage:3% +ramp-capacity-0 = +ramp-capacity-1 = +ramp-capacity-2 = +ramp-capacity-3 = +ramp-capacity-4 = + +[module/date] +type = internal/date +date = %Y-%m-%d %H:%M diff --git a/polybar/launch.sh b/polybar/launch.sh new file mode 100755 index 0000000..14c2eee --- /dev/null +++ b/polybar/launch.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +killall -q polybar +polybar -q bar1 & +polybar -q bar2 & diff --git a/subl3/Package Control.sublime-settings b/subl3/Package Control.sublime-settings index 4051f26..d4fb5c0 100644 --- a/subl3/Package Control.sublime-settings +++ b/subl3/Package Control.sublime-settings @@ -7,11 +7,11 @@ [ "A File Icon", "Compare Side-By-Side", + "MagicPython", "Material Theme", "Origami", "Package Control", "PackageResourceViewer", - "Python Improved", "Sass", "SideBarEnhancements", "SublimeLinter", diff --git a/subl3/Preferences.sublime-settings b/subl3/Preferences.sublime-settings index cd002df..dfc3087 100644 --- a/subl3/Preferences.sublime-settings +++ b/subl3/Preferences.sublime-settings @@ -43,11 +43,12 @@ [ ], "font_face": "Droid Sans Mono", - "font_size": 11, + "font_size": 10, "highlight_line": true, "highlight_modified_tabs": true, "ignored_packages": [ + "Python", "Vintage" ], "line_padding_bottom": 1, diff --git a/sxhkd/sxhkdrc.bspwm b/sxhkd/sxhkdrc.bspwm new file mode 100644 index 0000000..aaeb018 --- /dev/null +++ b/sxhkd/sxhkdrc.bspwm @@ -0,0 +1,54 @@ +F12 + python ~/.config/sxhkd/terminal_bspwm.py + +mod4 + Return + alacritty +mod4 + space + rofi -show drun +#mod4 + backslash +# i3-msg "split h" +#mod4 + minus +# i3-msg "split v" +#mod4 + Tab +# i3-msg "layout toggle split" +#mod4 + p +# i3-msg "focus parent" +#mod4 + r +# i3-msg "mode resize" + + +mod4 + {1, 2, 3, 4, a, s, d, f} + bspc desktop -f {1, 2, 3, 4, a, s, d, f} + +mod4 + shift + {1, 2, 3, 4, a, s, d, f} + bspc node -d {1, 2, 3, 4, a, s, d, f} + + +mod4 + shift + r + bspc wm -r +mod4 + shift + e + bspc quit +mod4 + shift + q + bspc node -c +mod4 + shift + space + bspc node -t ~floating +mod4 + shift + Return + bspc node -t ~fullscreen + +mod4 + {h, Left} + bspc node -f west +mod4 + {j, Down} + bspc node -f south +mod4 + {k, Up} + bspc node -f north +mod4 + {l, Right} + bspc node -f east + +mod4 + shift + {h, Left} + bspc node -s west +mod4 + shift + {j, Down} + bspc node -s west +mod4 + shift + {k, Up} + bspc node -s west +mod4 + shift + {l, Right} + bspc node -s west diff --git a/sxhkd/sxhkdrc b/sxhkd/sxhkdrc.i3 index fa91ced..ec9af48 100644 --- a/sxhkd/sxhkdrc +++ b/sxhkd/sxhkdrc.i3 @@ -1,5 +1,5 @@ F12 - python ~/.dotfiles/terminal.py + python ~/.config/sxhkd/terminal_i3.py mod4 + Return alacritty @@ -27,36 +27,20 @@ mod4 + shift + space mod4 + shift + Return i3-msg "fullscreen toggle" -mod4 + h +mod4 + {h, Left} i3-msg "focus left" -mod4 + Left - i3-msg "focus left" -mod4 + j - i3-msg "focus down" -mod4 + Down +mod4 + {j, Down} i3-msg "focus down" -mod4 + k +mod4 + {k, Up} i3-msg "focus up" -mod4 + Up - i3-msg "focus up" -mod4 + l - i3-msg "focus right" -mod4 + Right +mod4 + {l, Right} i3-msg "focus right" -mod4 + shift + h +mod4 + shift + {h, Left} i3-msg "move left" -mod4 + shift + Left - i3-msg "move left" -mod4 + shift + j - i3-msg "move down" -mod4 + shift + Down +mod4 + shift + {j, Down} i3-msg "move down" -mod4 + shift + k +mod4 + shift + {k, Up} i3-msg "move up" -mod4 + shift + Up - i3-msg "move up" -mod4 + shift + l - i3-msg "move right" -mod4 + shift + Right +mod4 + shift + {l, Right} i3-msg "move right" diff --git a/sxhkd/terminal_bspwm.py b/sxhkd/terminal_bspwm.py new file mode 100644 index 0000000..eee7875 --- /dev/null +++ b/sxhkd/terminal_bspwm.py @@ -0,0 +1,46 @@ +import subprocess + + +desktop_name = 'term' +instance_name = 'tmux_term' + + +def is_term_running(): + p = subprocess.run(['xdo', 'id', '-n', instance_name]) + return p.returncode == 0 + + +def run_term(): + subprocess.Popen(['alacritty', '--class', instance_name, + '-e', 'tmux', 'new-session', '-A', '-s', 'default']) + + +def get_focused_desktop(): + p = subprocess.run(['bspc', 'query', '-D', '--names', '-d', 'focused'], + capture_output=True, + check=True) + return p.stdout.decode('utf-8').strip() + + +def hide_term(): + subprocess.run(['bspc', 'desktop', '-f', 'last.local'], check=True) + + +def show_term(): + subprocess.run(['bspc', 'desktop', 'term', '-m', 'focused']) + subprocess.run(['bspc', 'desktop', '-f', 'term'], check=True) + + +def main(): + if not is_term_running(): + run_term() + + focused_desktop = get_focused_desktop() + if focused_desktop == desktop_name: + hide_term() + else: + show_term() + + +if __name__ == '__main__': + main() diff --git a/terminal.py b/sxhkd/terminal_i3.py index c53ff53..c53ff53 100644 --- a/terminal.py +++ b/sxhkd/terminal_i3.py diff --git a/xorg/.xsession b/xorg/.xsession index f29c7ae..02b0e52 100755 --- a/xorg/.xsession +++ b/xorg/.xsession @@ -4,7 +4,9 @@ xset -b autorandr --change [[ -n $(xrandr | grep "connected 3840x2160") ]] && xrandr --dpi 120 [[ -n $(xrandr | grep "connected 3840x2160") ]] && echo "Xft.dpi: 120" | xrdb -override -sxhkd & + +feh --bg-scale ~/.dotfiles/pictures/bg1.jpg \ + ~/.dotfiles/pictures/bg2.jpg + picom & -gajim & -zeal & +#gajim & diff --git a/yabar/yabar.conf b/yabar/yabar.conf new file mode 100644 index 0000000..634acdc --- /dev/null +++ b/yabar/yabar.conf @@ -0,0 +1,34 @@ +bar-list: ["base"]; + +base: { + monitor: ""; + position: "top"; + height: 40; + font: "Droid Sans, FontAwesome Bold 10"; + + block-list: ["workspace", "title"]; + workspace: { + exec: "YABAR_WORKSPACE"; + align: "left"; + fixed-size: 40; + } + title: { + exec: "YABAR_TITLE"; + align: "left"; + justify: "left"; + fixed-size: 300; + } + +} + + +bar1: { + inherit-all: "base"; + monitor: "eDP1"; +} + + +bar2: { + inherit-all: "base"; + monitor: "DP1-2"; +} |
