Skip to content

Commit 6a8edd2

Browse files
refactor install script
1 parent 62a9d81 commit 6a8edd2

18 files changed

+186
-129
lines changed

Configs/.config/hypr/keybindings.conf

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ bind = $mainMod, T, exec, $term # open terminal
3030
bind = $mainMod, E, exec, $file # open file manager
3131
bind = $mainMod, C, exec, $editor # open vscode
3232
bind = $mainMod, F, exec, $browser # open browser
33-
bind = $mainMod, period, exec, emote # open emoji selector
3433

3534
# Rofi is toggled on/off if you repeat the key presses
3635
bind = $mainMod, A, exec, pkill rofi || ~/.config/hypr/scripts/rofilaunch.sh d # launch desktop applications
@@ -41,8 +40,6 @@ bind = $mainMod, R, exec, pkill rofi || ~/.config/hypr/scripts/rofilaunch.sh f #
4140
bind = , F10, exec, ~/.config/hypr/scripts/volumecontrol.sh -o m # toggle audio mute
4241
binde = , F11, exec, ~/.config/hypr/scripts/volumecontrol.sh -o d # decrease volume
4342
binde = , F12, exec, ~/.config/hypr/scripts/volumecontrol.sh -o i # increase volume
44-
binde = $mainMod $CONTROL, down, exec, ~/.config/hypr/scripts/spotifyvolumecontrol.sh down # decrease volume for spotify
45-
binde = $mainMod $CONTROL, up, exec, ~/.config/hypr/scripts/spotifyvolumecontrol.sh up # increase volume for spotify
4643
bind = , XF86AudioMute, exec, ~/.config/hypr/scripts/volumecontrol.sh -o m # toggle audio mute
4744
bind = , XF86AudioMicMute, exec, ~/.config/hypr/scripts/volumecontrol.sh -i m # toggle microphone mute
4845
binde = , XF86AudioLowerVolume, exec, ~/.config/hypr/scripts/volumecontrol.sh -o d # decrease volume
@@ -57,7 +54,7 @@ binde = , XF86MonBrightnessUp, exec, ~/.config/hypr/scripts/brightnesscontrol.sh
5754
binde = , XF86MonBrightnessDown, exec, ~/.config/hypr/scripts/brightnesscontrol.sh d # decrease brightness
5855

5956
# Screenshot/Screencapture
60-
bind = $mainMod, P, exec, ~/.config/hypr/scripts/screenshot.sh s # drag to manually snip an area / click on a window to print it
57+
bind = $mainMod, P, exec, ~/.config/hypr/scripts/screenshot.sh s # drag to snip an area / click on a window to print it
6158
bind = $mainMod ALT, P, exec, ~/.config/hypr/scripts/screenshot.sh m # print focused monitor
6259
bind = ,print, exec, ~/.config/hypr/scripts/screenshot.sh p # print all monitor outputs
6360

@@ -147,6 +144,3 @@ bind = $mainMod ALT, 0, movetoworkspacesilent, 10
147144
# Trigger when the switch is turning off
148145
bindl= , switch:on:Lid Switch, exec, swaylock && systemctl suspend
149146

150-
# Night light // Install hyprshade for blue light feature
151-
bind = $mainMod ALT, XF86MonBrightnessDown, exec, hyprshade on blue-light-filter
152-
bind = $mainMod ALT, XF86MonBrightnessUp, exec, hyprshade off

Configs/.config/hypr/scripts/testrunner.sh

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@ RofDir="$HOME/.config/rofi"
77

88
roficn=0
99
wlogcn=1
10-
hyprctl dispatch workspace 11
1110

1211
while read loop_theme
1312
do
1413
themeName=`echo $loop_theme | cut -d '|' -f 2`
1514
$ScrDir/themeswitch.sh -s $themeName &> /dev/null
1615
sleep 0.2
1716

17+
hyprctl dispatch workspace empty
18+
dolphin &> /dev/null &
19+
sleep 0.21
20+
kitty &> /dev/null &
21+
sleep 1.4
22+
hyprctl dispatch workspace empty
23+
1824
#walln=`ls -l $WalDir/$themeName | wc -l`
1925
for (( i=1 ; i<3 ; i++ ))
2026
do
@@ -25,7 +31,7 @@ do
2531
# rofiselect
2632
$ScrDir/rofiselect.sh &> /dev/null &
2733
sleep 0.7
28-
pkill rofi
34+
pkill -x rofi
2935

3036
# rofi
3137
if [ $roficn -lt 8 ] ; then
@@ -36,12 +42,12 @@ do
3642
cp $RofDir/styles/style_$roficn.rasi $RofDir/config.rasi
3743
$ScrDir/rofilaunch.sh &> /dev/null &
3844
sleep 0.7
39-
pkill rofi
45+
pkill -x rofi
4046

4147
# themeselect
4248
$ScrDir/themeselect.sh &> /dev/null &
4349
sleep 0.7
44-
pkill rofi
50+
pkill -x rofi
4551

4652
# wlogout
4753
if [ $wlogcn -eq 1 ] ; then
@@ -51,29 +57,35 @@ do
5157
fi
5258
$ScrDir/logoutlaunch.sh $wlogcn &> /dev/null &
5359
sleep 0.7
54-
pkill wlogout
60+
pkill -x wlogout
5561

5662
# waybar
5763
$ScrDir/wbarconfgen.sh n &> /dev/null
5864

5965
# quickapps
6066
$ScrDir/quickapps.sh kitty firefox spotify code dolphin &> /dev/null &
6167
sleep 0.7
62-
pkill rofi
68+
pkill -x rofi
6369

6470
# cliphist
6571
$ScrDir/cliphist.sh w &> /dev/null &
6672
sleep 0.7
67-
pkill rofi
73+
pkill -x rofi
6874

6975
# wallselect
7076
$ScrDir/swwwallselect.sh &> /dev/null &
7177
sleep 0.7
72-
pkill rofi
78+
pkill -x rofi
7379

7480
# wallbash
7581
$ScrDir/wallbashtoggle.sh
7682
sleep 0.2
83+
84+
# volumecontrol
85+
for (( i=1 ; i<=6 ; i++ )) ; do
86+
[[ i -gt 3 ]] && vol="d" || vol="i"
87+
$ScrDir/volumecontrol.sh -o $vol
88+
done
7789
done
7890
done < $WalCtl
7991

Configs/.config/hypr/userprefs.conf

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@ force_zero_scaling = true
1515
# █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█
1616

1717
#bind = $CONTROL ALT SHIFT, T, exec, ~/.config/hypr/scripts/testrunner.sh # test runner
18-
bind = $CONTROL ALT SHIFT, R, pass, ^(com\.obsproject\.Studio)$ # start/stop obs screen recording
19-
bind = $mainMod SHIFT, G, exec, pkill rofi || ~/.config/hypr/scripts/gamelauncher.sh 3 # steam game launcher
18+
bind = $CONTROL ALT SHIFT, R, pass, ^(com\.obsproject\.Studio)$ # start/stop obs screen recording // install obs flatpak
19+
bind = $mainMod SHIFT, G, exec, pkill rofi || ~/.config/hypr/scripts/gamelauncher.sh 3 # steam game launcher // install steam
20+
bind = $mainMod, period, exec, emote # open emoji selector // install emote
21+
bind = $mainMod ALT, XF86MonBrightnessDown, exec, hyprshade on blue-light-filter # enable blue light filter // install hyprshade
22+
bind = $mainMod ALT, XF86MonBrightnessUp, exec, hyprshade off # disable blue light filter // install hyprshade
2023

2124

2225
# █░░ ▄▀█ █░█ █▄░█ █▀▀ █░█
2326
# █▄▄ █▀█ █▄█ █░▀█ █▄▄ █▀█
2427

25-
# exec-once = swayidle -w timeout 600 'swaylock' timeout 900 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' # lock after 10 mins, turn off monitor after 15 mins
26-
exec-once = swayidle -w timeout 1200 'swaylock; hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' timeout 1800 'systemctl suspend' # lock & turn off monitor after 20 mins, suspend after 30 mins
28+
# exec-once = swayidle -w timeout 600 'swaylock' timeout 900 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' # lock after 10 mins, turn off monitor after 15 mins // install swayidle
29+
exec-once = swayidle -w timeout 1200 'swaylock; hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' timeout 1800 'systemctl suspend' # lock & turn off monitor after 20 mins, suspend after 30 mins // install swayidle
2730

2831

2932
# █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█   █▀█ █░█ █░░ █▀▀ █▀

Configs/.zshrc

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
# export PATH=$HOME/bin:/usr/local/bin:$PATH
33

44
# Path to your oh-my-zsh installation.
5-
#export ZSH="$HOME/.oh-my-zsh"
65
ZSH=/usr/share/oh-my-zsh/
76

87
# Set name of the theme to load --- if set to "random", it will
98
# load a random theme each time oh-my-zsh is loaded, in which case,
109
# to know which specific one was loaded, run: echo $RANDOM_THEME
1110
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
12-
#ZSH_THEME="powerlevel10k"
1311
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
1412

1513
# Set list of themes to pick from when loading at random
@@ -72,13 +70,10 @@ source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
7270
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
7371
# Example format: plugins=(rails git textmate ruby lighthouse)
7472
# Add wisely, as too many plugins slow down shell startup.
75-
plugins=(git)
76-
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
77-
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
73+
plugins=()
7874
source $ZSH/oh-my-zsh.sh
7975

8076
# User configuration
81-
8277
# export MANPATH="/usr/local/man:$MANPATH"
8378

8479
# You may need to manually set your language environment
@@ -98,23 +93,52 @@ source $ZSH/oh-my-zsh.sh
9893
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
9994
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
10095
# For a full list of active aliases, run `alias`.
101-
#
96+
10297
# Example aliases
10398
# alias zshconfig="mate ~/.zshrc"
10499
# alias ohmyzsh="mate ~/.oh-my-zsh"
105-
alias l='eza -l --icons'
106-
alias ls='eza -1 --icons'
107-
alias ll='eza -la --icons'
108-
alias ld='eza -lD --icons'
109100

110-
alias in='sudo pacman -S' # install package
101+
function command_not_found_handler {
102+
local purple='\e[1;35m' bright='\e[0;1m' green='\e[1;32m' reset='\e[0m'
103+
printf 'zsh: command not found: %s\n' "$1"
104+
local entries=( ${(f)"$(/usr/bin/pacman -F --machinereadable -- "/usr/bin/$1")"} )
105+
if (( ${#entries[@]} )) ; then
106+
printf "${bright}$1${reset} may be found in the following packages:\n"
107+
local pkg
108+
for entry in "${entries[@]}" ; do
109+
local fields=( ${(0)entry} )
110+
if [[ "$pkg" != "${fields[2]}" ]] ; then
111+
printf "${purple}%s/${bright}%s ${green}%s${reset}\n" "${fields[1]}" "${fields[2]}" "${fields[3]}"
112+
fi
113+
printf ' /%s\n' "${fields[4]}"
114+
pkg="${fields[2]}"
115+
done
116+
fi
117+
return 127
118+
}
119+
120+
function in {
121+
local pkg="$1"
122+
if pacman -Si "$pkg" &>/dev/null ; then
123+
sudo pacman -S "$pkg"
124+
elif pacman -Qi yay &>/dev/null ; then
125+
yay -S "$pkg"
126+
elif pacman -Qi paru &>/dev/null ; then
127+
paru -S "$pkg"
128+
fi
129+
}
130+
131+
alias l='eza -l --icons' # long list
132+
alias ls='eza -1 --icons' # short list
133+
alias ll='eza -la --icons' # long list all
134+
alias ld='eza -lD --icons' # long list dirs
111135
alias un='sudo pacman -Rns' # uninstall package
112136
alias up='sudo pacman -Syu' # update system/package/aur
113137
alias pl='pacman -Qs' # list installed package
114138
alias pa='pacman -Ss' # list availabe package
115139
alias pc='sudo pacman -Sc' # remove unused cache
116140
alias po='pacman -Qtdq | sudo pacman -Rns -' # remove unused packages, also try > pacman -Qqd | pacman -Rsu --print -
117-
alias vc='code' # gui code editor
141+
alias vc='code' # gui code editor
118142

119143
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
120144
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ network-manager-applet | nm tray
175175
bluez | for bluetooth
176176
bluez-utils | for bluetooth
177177
blueman | bt tray
178-
brightnessctl | brightness control for laptop
179178
180179
| login | |
181180
| :-- | --- |
@@ -194,19 +193,24 @@ rofi-lbonn-wayland-git | app launcher
194193
waybar-hyprland-git | status bar
195194
swww | wallpaper app
196195
swaylock-effects-git | lockscreen
197-
swayidle | idle management daemon
198196
wlogout | logout screen
199-
grim | screenshot tool
197+
grimblast-git | screenshot tool
200198
slurp | selects region for screenshot/screenshare
201199
swappy | screenshot editor
202200
cliphist | clipboard manager
203201
204202
| dependencies | |
205203
| :-- | --- |
206204
polkit-kde-agent | authentication agent
207-
xdg-desktop-portal-hyprland-git | XDG Desktop Portal
208-
imagemagick | for kitty/neofetch image processing
209-
qt5-imageformats | for dolphin thumbnails
205+
xdg-desktop-portal-hyprland | XDG Desktop Portal
206+
pacman-contrib | for system update check
207+
python-pyamdgpuinfo | for amd gpu info
208+
parallel | for parallel processing
209+
jq | to read json
210+
imagemagick | for image processing
211+
qt5-imageformats | for dolphin image thumbnails
212+
ffmpegthumbs | for dolphin video thumbnails
213+
brightnessctl | brightness control for laptop
210214
pavucontrol | audio settings gui
211215
pamixer | for waybar audio
212216
@@ -229,11 +233,9 @@ ark | kde file archiver
229233
| shell | |
230234
| :-- | --- |
231235
zsh | main shell
232-
exa | colorful file lister
236+
eza | colorful file lister
233237
oh-my-zsh-git | for zsh plugins
234238
zsh-theme-powerlevel10k-git | theme for zsh
235-
zsh-syntax-highlighting-git | highlighting of commands
236-
zsh-autosuggestions-git | see completion as you type
237239
pokemon-colorscripts-git | display pokemon sprites
238240
239241
</details>
@@ -249,7 +251,7 @@ pokemon-colorscripts-git | display pokemon sprites
249251
| <kbd>Super</kbd> + <kbd>Del</kbd> | quit hyprland session
250252
| <kbd>Super</kbd> + <kbd>W</kbd> | toggle window on focus to float
251253
| <kbd>Alt</kbd> + <kbd>Enter</kbd> | toggle window on focus to fullscreen
252-
| <kbd>Alt</kbd> + <kbd>J</kbd> | toggle layout
254+
| <kbd>Super</kbd> + <kbd>J</kbd> | toggle layout
253255
| <kbd>Super</kbd> + <kbd>G</kbd> | toggle window group
254256
| <kbd>Super</kbd> + <kbd>T</kbd> | launch kitty terminal
255257
| <kbd>Super</kbd> + <kbd>E</kbd> | launch dolphin file explorer
@@ -261,15 +263,13 @@ pokemon-colorscripts-git | display pokemon sprites
261263
| <kbd>F10</kbd> | mute audio output (toggle)
262264
| <kbd>F11</kbd> | decrease volume (hold)
263265
| <kbd>F12</kbd> | increase volume (hold)
264-
| <kbd>Super</kbd> + <kbd>Ctrl</kbd> + <kbd></kbd> | decrease volume for spotify (hold)
265-
| <kbd>Super</kbd> + <kbd>Ctrl</kbd> + <kbd></kbd> | increase volume for spotify (hold)
266266
| <kbd>Super</kbd> + <kbd>V</kbd> | clipboard history paste
267267
| <kbd>Super</kbd> + <kbd>L</kbd> | lock screen
268268
| <kbd>Super</kbd> + <kbd>Backspace</kbd> | logout menu
269269
| <kbd>Super</kbd> + <kbd>K</kbd> | switch keyboard layout
270-
| <kbd>Super</kbd> + <kbd>P</kbd> | screenshot snip
270+
| <kbd>Super</kbd> + <kbd>P</kbd> | drag to select area or click on a window to print
271271
| <kbd>Super</kbd> + <kbd>Alt</kbd> + <kbd>P</kbd> | print current screen
272-
| <kbd>Super</kbd> + <kbd>RightClick</kbd> | resize the window
272+
| <kbd>Super</kbd> + <kbd>RightClick</kbd> | resize the window
273273
| <kbd>Super</kbd> + <kbd>LeftClick</kbd> | change the window position
274274
| <kbd>Super</kbd> + <kbd>MouseScroll</kbd> | cycle through workspaces
275275
| <kbd>Super</kbd> + <kbd>Shift</kbd> + <kbd></kbd><kbd></kbd><kbd></kbd><kbd></kbd>| resize windows (hold)

0 commit comments

Comments
 (0)