From 7482f70769f6dd0084757bde3a3b4d5eef58b28b Mon Sep 17 00:00:00 2001 From: Adam <56338480+adastx@users.noreply.github.com> Date: Tue, 31 May 2022 18:02:39 +0200 Subject: Better organized startup process and scripts --- .config/X11/xinitrc | 13 ++++++++++++- .config/i3/after | 5 ----- .config/i3/config | 12 ++++-------- .config/i3/init | 13 ------------- .config/zsh/.zshrc | 2 +- .local/bin/key | 4 ++++ .local/bin/polybar-launch | 6 +++--- .local/bin/rate | 5 +++++ 8 files changed, 29 insertions(+), 31 deletions(-) delete mode 100755 .config/i3/after delete mode 100644 .config/i3/init create mode 100755 .local/bin/key create mode 100755 .local/bin/rate diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc index c4b828a..b9029c8 100755 --- a/.config/X11/xinitrc +++ b/.config/X11/xinitrc @@ -32,4 +32,15 @@ if [ -d /etc/X11/xinit/xinitrc.d ] ; then unset f fi -source $HOME/.config/i3/init +clipdel -d ".*" & +clipmenud & +playerctld daemon & +nitrogen --restore & +redshift -l 56:10 & +nm-applet & +unclutter -b & +nextcloud --background & +~/.local/bin/picom-toggle & +~/.local/bin/no-rgb & +~/.local/bin/rate & +exec i3 diff --git a/.config/i3/after b/.config/i3/after deleted file mode 100755 index a2433be..0000000 --- a/.config/i3/after +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -~/.local/bin/no-rgb -xset r rate 300 25 -setxkbmap -option grp:win_space_toggle us,dk diff --git a/.config/i3/config b/.config/i3/config index 3b78957..46e46af 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -16,9 +16,9 @@ bindsym $mod+b exec firefox bindsym $mod+e exec pcmanfm bindsym $mod+f fullscreen toggle bindsym $mod+i exec --no-startup-id polybar-msg cmd toggle -bindsym $mod+Shift+s exec --no-startup-id ~/.local/bin/screenshot -s -bindsym Print exec --no-startup-id ~/.local/bin/screenshot -bindsym $mod+Shift+c exec --no-startup-id ~/.local/bin/picom-toggle +bindsym $mod+Shift+s exec --no-startup-id $HOME/.local/bin/screenshot -s +bindsym Print exec --no-startup-id $HOME/.local/bin/screenshot +bindsym $mod+Shift+c exec --no-startup-id $HOME/.local/bin/picom-toggle bindsym $mod+d exec --no-startup-id rofi -show drun -show-icons -drun-display-format {name} bindsym $alt+Tab exec --no-startup-id rofi -show window -show-icons -drun-display-format {name} @@ -193,8 +193,4 @@ for_window [title="Steam Guard - Computer Authorization Required"] floating enab for_window [class="^Steam$" title="^Steam Guard - Computer Authorization Required$"] floating enable for_window [title="^Steam Keyboard$"] floating enable -##### Exec -exec --no-startup-id /usr/bin/unclutter -b -exec --no-startup-id ~/.local/bin/polybar-launch -exec --no-startup-id ~/.local/bin/picom-toggle -exec --no-startup-id nextcloud --background +exec_always --no-startup-id $HOME/.local/bin/polybar-launch diff --git a/.config/i3/init b/.config/i3/init deleted file mode 100644 index c65e76b..0000000 --- a/.config/i3/init +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -clipdel -d ".*" -clipmenud & -playerctld daemon & -nitrogen --restore & -redshift -l 56:10 & -nm-applet & -exec i3 & wmpid=$! - -sleep 5 -source $HOME/.config/i3/after -wait $wmpid diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 4dd7d88..51fbf48 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -44,7 +44,7 @@ alias zshrc='vim $XDG_CONFIG_HOME/zsh/.zshrc' alias vimrc='vim $XDG_CONFIG_HOME/vim/vimrc' alias nvimrc='cd $XDG_CONFIG_HOME/nvim;nvim' alias i3config='vim $XDG_CONFIG_HOME/i3/config' -alias startup='vim $XDG_CONFIG_HOME/i3/init' +alias startup='vim $XDG_CONFIG_HOME/X11/xinitrc' function zvm_after_init() { source '/usr/share/fzf/key-bindings.zsh' diff --git a/.local/bin/key b/.local/bin/key new file mode 100755 index 0000000..d37c407 --- /dev/null +++ b/.local/bin/key @@ -0,0 +1,4 @@ +#!/bin/sh + +systemctl restart keyd.service +rate & diff --git a/.local/bin/polybar-launch b/.local/bin/polybar-launch index d425d48..b72556d 100755 --- a/.local/bin/polybar-launch +++ b/.local/bin/polybar-launch @@ -1,10 +1,10 @@ -#!/usr/bin/env bash +#!/bin/sh # Terminate already running bar instances killall -q polybar echo "---" | tee -a /tmp/polybar1.log /tmp/polybar2.log -polybar bar1 -r 2>&1 | tee -a /tmp/polybar1.log & disown -polybar bar2 -r 2>&1 | tee -a /tmp/polybar2.log & disown +polybar bar1 -r 2>&1 | tee -a /tmp/polybar1.log & +polybar bar2 -r 2>&1 | tee -a /tmp/polybar2.log & echo "Bars launched..." diff --git a/.local/bin/rate b/.local/bin/rate new file mode 100755 index 0000000..fe8ccf3 --- /dev/null +++ b/.local/bin/rate @@ -0,0 +1,5 @@ +#!/bin/sh + +sleep 2 +xset r rate 300 25 +setxkbmap -option grp:win_space_toggle us,dk -- cgit v1.2.3-70-g09d2