diff --git a/arch_linux_init/utils.bash b/arch_linux_init/utils.bash index e923daa..5f6d7b4 100755 --- a/arch_linux_init/utils.bash +++ b/arch_linux_init/utils.bash @@ -1,4 +1,22 @@ #!/usr/bin/env bash -sudo pacman -S the_silver_searcher --noconfirm +DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd) +source $DIR/variables.bash + +sudo pacman -S \ + rofi \ + slock \ + the_silver_searcher \ + thunar \ + luakit \ + --noconfirm + +pacaur -S \ + gtk-theme-arc \ + firefox-developer \ + google-chrome-dev \ + --noconfirm --noedit + +sudo ln -s /usr/bin/firefox-developer /usr/bin/firefox +sudo ln -s /usr/bin/google-chrome-unstable /usr/bin/chrome diff --git a/colors/link.bash b/colors/link.bash index 729ae55..1b95b7a 100755 --- a/colors/link.bash +++ b/colors/link.bash @@ -8,5 +8,5 @@ rm -f "$DOTFILES_PATH/vim/config/colors/current.vim" ln -s "$DOTFILES_PATH/colors/xresources" "$HOME/.Xresources.colors" ln -s "$DOTFILES_PATH/colors/vim" "$DOTFILES_PATH/vim/config/colors/current.vim" -xrdb ~/.Xresources +source "$DOTFILES_PATH/x/xloadresources" diff --git a/scripts/get_x_fonts.sh b/scripts/get_x_fonts.sh new file mode 100644 index 0000000..6439c5b --- /dev/null +++ b/scripts/get_x_fonts.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env sh + +XRES_FILE="$HOME/.Xresources" +if [ -a "$HOME/.Xresources.env" ]; then + XRES_FILE="$HOME/.Xresources.env" +fi + +PRIMARY_FONT_XRESOURCES=$(grep "#define primaryfont xft:" "$XRES_FILE" | grep -v "/\*" | head -n 1) +export PRIMARY_FONT_FAMILY_WITH_SIZE=${PRIMARY_FONT_XRESOURCES:24} +export PRIMARY_FONT_FAMILY=$(echo $PRIMARY_FONT_FAMILY_WITH_SIZE | sed 's/\-.*//') +export PRIMARY_FONT_SIZE=$(echo $PRIMARY_FONT_FAMILY_WITH_SIZE | sed 's/.*\-//') + +SECONDARY_FONT_XRESOURCES=$(grep "#define secondaryfont xft:" "$XRES_FILE" | grep -v "/\*" | head -n 1) +export SECONDARY_FONT_FAMILY_WITH_SIZE=${SECONDARY_FONT_XRESOURCES:26} +export SECONDARY_FONT_FAMILY=$(echo $SECONDARY_FONT_FAMILY_WITH_SIZE | sed 's/\-.*//') +export SECONDARY_FONT_SIZE=$(echo $SECONDARY_FONT_FAMILY_WITH_SIZE | sed 's/.*\-//') + +ICON_FONT_XRESOURCES=$(grep "#define iconfont xft:" "$XRES_FILE" | grep -v "/\*" | head -n 1) +export ICON_FONT_FAMILY_WITH_SIZE=${ICON_FONT_XRESOURCES:21} +export ICON_FONT_FAMILY=$(echo $ICON_FONT_FAMILY_WITH_SIZE | sed 's/\-.*//') +export ICON_FONT_SIZE=$(echo $ICON_FONT_FAMILY_WITH_SIZE | sed 's/.*\-//') + diff --git a/wm/sxhkdrc b/wm/sxhkdrc index 7525795..354e8f9 100755 --- a/wm/sxhkdrc +++ b/wm/sxhkdrc @@ -18,7 +18,10 @@ super + b # toggle floating/fullscreen modes for current node super + {s,f} - bspc node -t {floating,fullscreen} + bspc node -t {tiled,floating} + +super + shift + {s,f} + bspc node -t {pseudo_tiled,fullscreen} # focus the last node/desktop super + {grave,Tab} @@ -134,7 +137,8 @@ super + Return # spawn the app launcher super + space - dmenu_run -fn "$PRIMARY_FONT_FAMILY_WITH_SIZE" -i -nb "#$(get_color 00)" -sb "#$(get_color 00)" -sf "#$(get_color 0A)" -nf "#$(get_color 04)" -h "$BAR_HEIGHT" + rofi -show run -font "Monaco 9" -fuzzy -bw $BORDER_WIDTH -bg "#$(get_color 00)" -fg "#$(get_color 0A)" -hlfg "#$(get_color 0D)" -hlbg "#$(get_color 01)" + # dmenu_run -fn "$PRIMARY_FONT_FAMILY_WITH_SIZE" -i -nb "#$(get_color 00)" -sb "#$(get_color 00)" -sf "#$(get_color 0A)" -nf "#$(get_color 04)" -h "$BAR_HEIGHT" # make sxhkd reload its configuration files: super + Escape @@ -146,7 +150,7 @@ super + ctrl + shift + l # spawn gui file explorer super + e - thunar + thunar # volumes controls and media navigation for media keys {_,shift + }XF86AudioLowerVolume diff --git a/x/gtk2rc b/x/gtk2rc new file mode 100644 index 0000000..9276c7a --- /dev/null +++ b/x/gtk2rc @@ -0,0 +1,3 @@ +gtk-icon-theme-name = "Adwaita" +gtk-theme-name = "Raleigh" +gtk-font-name = "Monaco 9" diff --git a/x/gtk3settings.ini b/x/gtk3settings.ini new file mode 100644 index 0000000..42523f7 --- /dev/null +++ b/x/gtk3settings.ini @@ -0,0 +1,4 @@ +[Settings] +gtk-icon-theme-name = Adwaita +gtk-theme-name = Adwaita +gtk-font-name = Monaco 9 diff --git a/x/link.bash b/x/link.bash index e408c3a..429553f 100755 --- a/x/link.bash +++ b/x/link.bash @@ -3,18 +3,24 @@ DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd) source "$DIR/variables.bash" -rm "$HOME/.xinitrc" -rm "$HOME/.Xresources" -ln -s "$HOME/.dotfiles/x/xinitrc" "$HOME/.xinitrc" -ln -s "$HOME/.dotfiles/x/xresources" "$HOME/.Xresources" +mkdir -p "$HOME/.config/gtk-3.0" +rm -f "$HOME/.xinitrc" +rm -f "$HOME/.Xresources" +rm -f "$HOME/.config/gtkrc-2.0" +rm -f "$HOME/.config/gtk-3.0/settings.ini" +ln -s "$DOTFILES_PATH/x/xinitrc" "$HOME/.xinitrc" +ln -s "$DOTFILES_PATH/x/xresources" "$HOME/.Xresources" +ln -s "$DOTFILES_PATH/x/gtk3settings.ini" "$HOME/.config/gtk-3.0/settings.ini" +ln -s "$DOTFILES_PATH/x/gtk2rc" "$HOME/.config/gtkrc-2.0" -xrdb "$HOME/.Xresources" >/dev/null 2>&1 +sudo mkdir -p /root/.gtk-3.0/ +sudo mkdir -p /root/.config/gtk-3.0/ +sudo rm -f "/root/.gtkrc-2.0" +sudo rm -f "/root/.gtk-3.0/settings.ini" +sudo rm -f "/root/.config/gtk-3.0/settings.ini" +sudo ln -s "$DOTFILES_PATH/x/gtk2rc" "/root/.gtkrc-2.0" +sudo ln -s "$DOTFILES_PATH/x/gtk3settings.ini" "/root/.gtk-3.0/settings.ini" +sudo ln -s "$DOTFILES_PATH/x/gtk3settings.ini" "/root/.config/gtk-3.0/settings.ini" -if [ -f "$HOME/.Xresources.colors" ]; then - xrdb -merge "$HOME/.Xresources.colors" >/dev/null 2>&1 -fi - -if [ -f "$HOME/.Xresources.env" ]; then - xrdb -merge "$HOME/.Xresources.env" >/dev/null 2>&1 -fi +source "$DOTFILES_PATH/x/xloadresources" diff --git a/x/xloadresources b/x/xloadresources index ba04e16..56c6f79 100644 --- a/x/xloadresources +++ b/x/xloadresources @@ -8,27 +8,27 @@ sysresources=/etc/X11/xinit/.Xresources sysmodmap=/etc/X11/xinit/.Xmodmap if [ -f $sysresources ]; then - xrdb -merge $sysresources + xrdb -merge $sysresources >/dev/null 2>&1 fi if [ -f $sysmodmap ]; then - xmodmap $sysmodmap + xmodmap $sysmodmap >/dev/null 2>&1 fi if [ -f "$userresources" ]; then - xrdb -merge "$userresources" + xrdb -merge "$userresources" >/dev/null 2>&1 fi if [ -f "$usercolors" ]; then - xrdb -merge "$usercolors" + xrdb -merge "$usercolors" >/dev/null 2>&1 fi if [ -f "$userenv" ]; then - xrdb -merge "$userenv" + xrdb -merge "$userenv" >/dev/null 2>&1 fi if [ -f "$usermodmap" ]; then - xmodmap "$usermodmap" + xmodmap "$usermodmap" >/dev/null 2>&1 fi if [ -d /etc/X11/xinit/xinitrc.d ] ; then