From cdc0fdd9c3733378d1488a007e5dac3fd89a0cc7 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 2 Jun 2022 12:03:38 +0200 Subject: Better organized startup process and scripts --- .bashrc | 2 +- .config/X11/.Xresources | 2 -- .config/X11/Xresources | 2 ++ .config/X11/xinitrc | 45 +++++++++++++++++++++++++++++++++++++++++++++ .config/i3/after | 5 ----- .config/i3/config | 11 ++++------- .config/i3/init | 13 ------------- .local/bin/rate | 5 +++++ 8 files changed, 57 insertions(+), 28 deletions(-) delete mode 100644 .config/X11/.Xresources create mode 100644 .config/X11/Xresources create mode 100755 .config/X11/xinitrc delete mode 100755 .config/i3/after delete mode 100644 .config/i3/init create mode 100755 .local/bin/rate diff --git a/.bashrc b/.bashrc index 0902233..7ce4dc3 100644 --- a/.bashrc +++ b/.bashrc @@ -44,7 +44,7 @@ alias bashrc='vim ~/.bashrc' 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' eval "$(starship init bash)" eval "$(zoxide init bash)" diff --git a/.config/X11/.Xresources b/.config/X11/.Xresources deleted file mode 100644 index 37d7396..0000000 --- a/.config/X11/.Xresources +++ /dev/null @@ -1,2 +0,0 @@ -Xcursor.size: 32 -Xcursor.theme: phinger-cursors-light diff --git a/.config/X11/Xresources b/.config/X11/Xresources new file mode 100644 index 0000000..37d7396 --- /dev/null +++ b/.config/X11/Xresources @@ -0,0 +1,2 @@ +Xcursor.size: 32 +Xcursor.theme: phinger-cursors-light diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc new file mode 100755 index 0000000..61c9173 --- /dev/null +++ b/.config/X11/xinitrc @@ -0,0 +1,45 @@ +#!/bin/sh + +userresources=$XDG_CONFIG_HOME/X11/Xresources +usermodmap=$XDG_CONFIG_HOME/X11/Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +# merge in defaults and keymaps + +if [ -f $sysresources ]; then + xrdb -merge $sysresources +fi + +if [ -f $sysmodmap ]; then + xmodmap $sysmodmap +fi + +if [ -f "$userresources" ]; then + xrdb -merge "$userresources" +fi + +if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" +fi + +# start some nice programs + +if [ -d /etc/X11/xinit/xinitrc.d ] ; then + for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do + [ -x "$f" ] && . "$f" + done + unset f +fi + +clipdel -d ".*" & +clipmenud & +playerctld daemon & +nitrogen --restore & +redshift -l 56:10 & +nm-applet & +unclutter -b & +nextcloud --background & +~/.local/bin/picom-toggle & +~/.local/bin/rate & +exec i3 diff --git a/.config/i3/after b/.config/i3/after deleted file mode 100755 index 061830c..0000000 --- a/.config/i3/after +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -xset dpms 300 300 300 -xset r rate 300 25 -setxkbmap -option grp:win_space_toggle us,dk diff --git a/.config/i3/config b/.config/i3/config index 54f9539..758deb5 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -14,9 +14,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} @@ -190,7 +190,4 @@ for_window [class="^Steam$" title="^Steam Guard - Computer Authorization Require 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 4d12c38..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/.local/bin/rate b/.local/bin/rate new file mode 100755 index 0000000..061830c --- /dev/null +++ b/.local/bin/rate @@ -0,0 +1,5 @@ +#!/bin/sh + +xset dpms 300 300 300 +xset r rate 300 25 +setxkbmap -option grp:win_space_toggle us,dk -- cgit v1.2.3-70-g09d2