From d1e8f727620479a98ad568e8e3dc98e84bef45b2 Mon Sep 17 00:00:00 2001 From: Suleyman Farajli Date: Sun, 18 Feb 2024 17:36:51 +0400 Subject: version 0.2 --- build.sh | 93 +++++++++++++++++++++++++++++++++++ src/distros/arch-linux/pacman.conf | 87 +++----------------------------- src/dotfiles/Xresources | 34 +++++++++++++ src/dotfiles/alacritty/alacritty.toml | 43 ++++++++++++++++ src/dotfiles/alacritty/alacritty.yml | 45 ----------------- src/dotfiles/bspwm/bspwmrc | 44 +++++++---------- src/dotfiles/dunst/dunstrc | 33 +++++++++++++ src/dotfiles/i3/config | 3 +- src/dotfiles/kitty/kitty.conf | 2 + src/dotfiles/lf/lfrc | 44 +++++++++++++++++ src/dotfiles/mimeapps.list | 13 ++++- src/dotfiles/nsxiv/exec/key-handler | 43 ++++++++++++++++ src/dotfiles/nvim/init.lua | 1 + src/dotfiles/picom/picom.conf | 26 +++++++++- src/dotfiles/polybar/config.ini | 46 ++++++++--------- src/dotfiles/sxhkd/sxhkdrc | 35 ++++++------- src/dotfiles/zathura/zathurarc | 2 + src/dotfiles/zsh/user_profile | 19 +++++++ src/dotfiles/zsh/zshrc | 70 ++++++++++++++++++++++++++ src/dotfiles/zshrc | 89 --------------------------------- src/etc/profile | 10 ++++ src/etc/profile.d/theion.sh | 43 ++++++++++++++++ src/scripts/border | 1 - src/scripts/linkbuds | 1 - src/scripts/nocomment | 3 ++ src/scripts/nospac | 2 + src/scripts/sBrightness | 13 +++++ src/scripts/sScreenshot | 7 +++ src/scripts/sTouchpad | 15 ++++++ src/scripts/sVolume | 11 +++++ src/scripts/setwp | 18 +++++++ src/scripts/touchOn | 3 -- src/scripts/wal | 11 ----- 33 files changed, 603 insertions(+), 307 deletions(-) create mode 100644 build.sh create mode 100644 src/dotfiles/Xresources create mode 100644 src/dotfiles/alacritty/alacritty.toml delete mode 100755 src/dotfiles/alacritty/alacritty.yml create mode 100644 src/dotfiles/dunst/dunstrc create mode 100644 src/dotfiles/lf/lfrc create mode 100755 src/dotfiles/nsxiv/exec/key-handler create mode 100644 src/dotfiles/zsh/user_profile create mode 100755 src/dotfiles/zsh/zshrc delete mode 100755 src/dotfiles/zshrc create mode 100644 src/etc/profile create mode 100644 src/etc/profile.d/theion.sh delete mode 100755 src/scripts/linkbuds create mode 100755 src/scripts/sBrightness create mode 100755 src/scripts/sScreenshot create mode 100755 src/scripts/sTouchpad create mode 100755 src/scripts/sVolume create mode 100755 src/scripts/setwp delete mode 100755 src/scripts/touchOn delete mode 100755 src/scripts/wal diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..8ab088c --- /dev/null +++ b/build.sh @@ -0,0 +1,93 @@ +#!/bin/sh + +as_sudo(){ + SUDO=sudo + $@ + SUDO="" +} + +config_dir="${XDG_CONFIG_HOME:-$HOME/.config}" +home_dir="${XDG_DATA_HOME:-$HOME}" + +dotfiles_install() { + [ -d $config_dir ] || mkdir -v $config_dir + COPY ./src/dotfiles/* "$config_dir" + COPY ./src/dotfiles/zsh/zshrc "$home_dir" + COPY ./src/dotfiles/Xresources "$home_dir"/.Xresources +} + +scripts_install() { + [ -d /usr/local/bin ] || sudo mkdir -v /usr/local/bin + as_sudo COPY ./src/scripts/* /usr/local/bin/ +} + +archlinux_install() { + as_sudo COPY ./src/distros/arch-linux/pacman.conf /etc +} + +profile_install() { + COPY ./src/dotfiles/zsh/user_profile "$home_dir/.profile" + LINK "$home_dir/.profile" "$home_dir/.zprofile" || echo "WARNING: Couldn't link .zprofile to .profile" + LINK "$home_dir/.profile" "$home_dir/.bash_profile" || echo "WARNING: Couldn't link .bash_profile to .profile" + + [ -d /etc/profile.d ] || { sudo mkdir /etc/profile.d && printf "/etc/profile.d directory created" ; } + as_sudo COPY ./src/etc/profile.d/theion.sh /etc/profile.d || echo "Couldn't install to /etc/profile.d" +} + +help() { + cat < /dev/null || sxhkd & @@ -11,8 +16,8 @@ bspc monitor eDP-1 -d 1 2 3 4 5 6 7 8 9 #borders and colors -bspc config normal_border_color "#262626" -bspc config focused_border_color "#4E3524" +bspc config normal_border_color $XDG_COLOR_INACTIVE_TRANSFORM +bspc config focused_border_color $XDG_COLOR_TRANSFORM bspc config border_width 10 bspc config window_gap 3 bspc config single_monocle true @@ -20,34 +25,19 @@ bspc config borderless_monocle true bspc config gapless_monocle true -#to switch caps with escape -setxkbmap -option "caps:escape" - - -: ' -Uncomment the following line to make the Caps Lock button -work as Escape when pressed alone, and as Ctrl when pressed -with another key. -' -#xcape -e 'Caps_Lock=Escape' -#setxkbmap -option "caps:ctrl_modifier" +# setxkbmap -option "caps:escape" #to switch caps with escape -#increase cursor speed -xset r rate 300 50 +# Uncomment the following 2 lines to make the Caps Lock button +# work as Escape when pressed alone, and as Ctrl when pressed +# with another key. -#disable screen blackening -xset s off && xset -dpms - -#hide mouse cursor if it is inactive -unclutter & - -#turns touchpad off -synclient TouchpadOff=1 - -#turn keyboard layout to United States -setxkbmap us +# xcape -e 'Caps_Lock=Escape' +setxkbmap -option "caps:ctrl_modifier" +xset r rate 300 50 #increase cursor speed +xset s off && xset -dpms #disable screen blackening +unclutter & #hide mouse cursor if it is inactive +setxkbmap us #turn keyboard layout to United States xgamma -gamma 0.8 picom & - diff --git a/src/dotfiles/dunst/dunstrc b/src/dotfiles/dunst/dunstrc new file mode 100644 index 0000000..19c55b4 --- /dev/null +++ b/src/dotfiles/dunst/dunstrc @@ -0,0 +1,33 @@ +# Very minimal dunst config + +[global] + width = 300 + height = 300 + origin = bottom-right + offset = 10x10 + scale = 0 + notification_limit = 6 + separator_height = 2 + alignment = left + stack_duplicates = true + frame_width = 3 + frame_color = "#4E3524" + gap_size = 6 + separator_color = frame + font = JetBrainsMono Nerd Font 10 + line_height = 3 + +[urgency_normal] + foreground = "#a89984" + background = "#282828" + timeout = 5 + +[urgency_low] + foreground = "#a89984" + background = "#282828" + timeout = 3 + +[urgency_critical] + foreground = "#a89984" + background = "#282828" + timeout = 8 diff --git a/src/dotfiles/i3/config b/src/dotfiles/i3/config index b7f5ccd..61db90b 100755 --- a/src/dotfiles/i3/config +++ b/src/dotfiles/i3/config @@ -1,4 +1,4 @@ -#Theion's i3-wm config +# Theion's i3-wm config font pango: JetBrainsMono Nerd Font 0 set $bg #282828 @@ -213,4 +213,3 @@ bindsym $mod+Shift+m exec killall kitty bindsym $mod+Shift+n exec --no-startup-id kitty --class=floating bindsym $mod+Shift+p exec ~/.config/polybar/launch.sh - diff --git a/src/dotfiles/kitty/kitty.conf b/src/dotfiles/kitty/kitty.conf index bba1e35..07c905b 100644 --- a/src/dotfiles/kitty/kitty.conf +++ b/src/dotfiles/kitty/kitty.conf @@ -1,7 +1,9 @@ +enable_audio_bell no remember_window_size no initial_window_width 840 initial_window_height 600 + background_opacity 0.75 font_size 14 diff --git a/src/dotfiles/lf/lfrc b/src/dotfiles/lf/lfrc new file mode 100644 index 0000000..ebfffa3 --- /dev/null +++ b/src/dotfiles/lf/lfrc @@ -0,0 +1,44 @@ +# Suleyman's gruvbox themed lf config at "https://github.com/thei0n/slcf" +# Due to the facts that ueberzug is no longer maintained and adds extra complexity it is not included in the config + +# Options +set incsearch +set scrolloff 4 #smooth scrolling + +# Key-maps +map shell +map m push $mkdir +map t push $touch +map D trash +map gf $lf -remote "send $id select $(fzf --layout=reverse --height=10)" +map x $$f # execute current file (must be executable) + +map zb :{{ set sortby natural; set info size; set preview; set ratios 5:2; }} +map zz :{{ set preview; set ratios 1:2:3; }} + +# Directory change +map gp cd ~/proj +map gt cd ~/testProj +map gc cd ~/.config +map gh cd ~ +map gu cd /usr/local/bin + +# Colors +set cursoractivefmt "\033[0;1;7m" #white +# set cursoractivefmt "\033[32;1;7m" #yellowish green +# set cursoractivefmt "\033[33;1;7m" #orange +# set cursoractivefmt "\033[36;1;7m" #green + +set cursorparentfmt "\033[0;1;7m" +set tagfmt "\033[32;1;7m" +set rulerfmt "\033[32;1;7m" + +set promptfmt "\033[48;1;234m %w/%f" + + +cmd trash !{{ + [ ! -d ~/.trash ] && mkdir -p ~/.trash + set -f + printf "\nItems to be trashed:\n$fx\n\nTrash? [y/N]" && read ans + [ $ans == "y" ] && mv $fx ~/.trash && echo "Trash complete!" || echo "Failed! Use y to trash." +}} diff --git a/src/dotfiles/mimeapps.list b/src/dotfiles/mimeapps.list index a000b00..5efa139 100644 --- a/src/dotfiles/mimeapps.list +++ b/src/dotfiles/mimeapps.list @@ -1,6 +1,17 @@ [Default Applications] application/pdf=org.pwmt.zathura.desktop + [Default Applications] -image/jpeg=sxiv.desktop +image/jpeg=nsxiv.desktop +image/png=nsxiv.desktop +image/jpg=nsxiv.desktop + [Default Applications] text/plain=nvim.desktop + +[Default Applications] +text/html=org.qutebrowser.qutebrowser.desktop + +[Default Application] +x-scheme-handler/http=org.qutebrowser.qutebrowser.desktop +x-scheme-handler/https=org.qutebrowser.qutebrowser.desktop diff --git a/src/dotfiles/nsxiv/exec/key-handler b/src/dotfiles/nsxiv/exec/key-handler new file mode 100755 index 0000000..a3880e4 --- /dev/null +++ b/src/dotfiles/nsxiv/exec/key-handler @@ -0,0 +1,43 @@ +#!/bin/sh + +# For theme to be applied ~/.Xresource file must be present + +while read -r file +do + case "$1" in + + "m") + [ -z $destdir ] && destdir="$(echo "$HOME/Pictures" | dmenu -p "Move directory: " | sed "s|~|$HOME|g")" + + [ ! -d $destdir ] && { nsend "Not a directory" ; exit 2 ;} + + mv "$file" "$destdir" && nsend "$file moved to $destdir" & + ;; + + "c") + + [ -z $destdir ] && destdir="$(echo "$HOME/Pictures" | dmenu -p "Copy directory: " | sed "s|~|$HOME|g")" + + [ ! -d $destdir ] && { nsend "Not a directory" ; exit 2 ;} + + cp "$file" "$destdir" && nsend "$file copied to $destdir" & + ;; + + "w") + setwp "$file" && nsend "Wallpaper changed to $file" ;; + "d") + [ ! -d ~/.trash ] && { mkdir ~/.trash && nsend "~/.trash created";} + mv "$file" ~/.trash && nsend "$file is moved to ~/.trash" ;; + "r") + convert -rotate 90 "$file" "$file" ;; + "R") + convert -rotate -90 "$file" "$file" ;; + "f") + convert -flop "$file" "$file" ;; + "y") + echo -n "$file" | xclip -selection clipboard && nsend "Copied to clipboard" & ;; + "Y") + readlink -f "$file" | tr -d '\n' | xclip -selection clipboard && nsend "Copied to clipboard" & ;; + + esac + done diff --git a/src/dotfiles/nvim/init.lua b/src/dotfiles/nvim/init.lua index d74eada..1f4b737 100644 --- a/src/dotfiles/nvim/init.lua +++ b/src/dotfiles/nvim/init.lua @@ -1 +1,2 @@ +-- Suleyman's gruvbox themed neovim config at "https://github.com/thei0n/slcf" require("master") diff --git a/src/dotfiles/picom/picom.conf b/src/dotfiles/picom/picom.conf index f3815b2..9f942af 100644 --- a/src/dotfiles/picom/picom.conf +++ b/src/dotfiles/picom/picom.conf @@ -1,3 +1,25 @@ +# Minimal picom config + +backend = "glx"; + +#Shadows +shadow = true; +shadow-radius = 7; +shadow-offset-x = -7; +shadow-offset-y = -7; + +#Fadings fading = true; -fade-out-step = 0.05; -fade-in-step = 0.05; +fade-in-step = 0.03; +fade-out-step = 0.03; + +vsync = true; + + wintypes: + { + tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; + dock = { shadow = false; clip-shadow-above = true; } + dnd = { shadow = false; } + popup_menu = { opacity = 0.8; } + dropdown_menu = { opacity = 0.8; } + }; diff --git a/src/dotfiles/polybar/config.ini b/src/dotfiles/polybar/config.ini index fb996e9..14c4852 100755 --- a/src/dotfiles/polybar/config.ini +++ b/src/dotfiles/polybar/config.ini @@ -1,15 +1,12 @@ +# Compatiable with environmental color variables, fallback theme is set to be gruvbox + [colors] -grayish = #928374 -background = #282828 -foreground = #ebdbb2 -red = #fb4934 -green = #b8bb26 -yellow = #fcf55f -blue = #83a598 -purple = #d3869b -teal = #8ec07c -orange = #fe8019 -gray = #a89984 +background_inactive = ${env:XDG_COLOR_INACTIVE_FOREGROUND:#a89984} +background = ${env:XDG_COLOR_BACKGROUND:#282828} +foreground = ${env:XDG_COLOR_FOREGROUND:#ebdbb2} +warning = ${env:XDG_COLOR_WARNING:#cc241d} +non_warning = ${env:XDG_COLOR_NON_WARNING:#458588} +interactive = ${env:XDG_COLOR_INTERACTIVE:#98971a} [bar/example] width = 100% @@ -63,8 +60,8 @@ label-urgent-padding = 2 label-empty-padding = 2 label-occupied-padding=2 -label-urgent-foreground = ${colors.gray} -label-occupied-foreground = ${colors.gray} +label-urgent-foreground = ${colors.background_inactive} +label-occupied-foreground = ${colors.background_inactive} label-active-font = 1 [module/bspwm] @@ -75,11 +72,11 @@ label-focused = %index% label-focused-padding = 2 label-occupied = %index% -label-occupied-foreground = ${colors.gray} +label-occupied-foreground = ${colors.background_inactive} label-occupied-padding = 2 label-urgent = %index% -label-urgent-foreground = ${colors.red} +label-urgent-foreground = ${colors.warning} label-urgent-padding = 2 label-empty = @@ -95,7 +92,7 @@ format-discharging=Battery: label-discharging=%percentage%% format-charging=Charging: label-charging=%percentage%% -format-discharging-foreground=${colors.grayish} +format-discharging-foreground=${colors.background_inactive} label-discharging-foreground=${colors.foreground} [module/backlight] @@ -105,7 +102,7 @@ use-actual-brightness = true enable-scroll = true format = Brightness: