Skip to content

Commit

Permalink
make everything very simple
Browse files Browse the repository at this point in the history
Signed-off-by: vcyzteen <[email protected]>
  • Loading branch information
vcyzteen committed Jul 1, 2021
1 parent 0bb72c6 commit eb67dcb
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 43 deletions.
26 changes: 1 addition & 25 deletions .config/sxhkd/sxhkdrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,12 @@ super + Return

# set theme use rofi
super + z
bash ${HOME}/.scripts/set-theme

# set type compositor
super + c
bash ${HOME}/.scripts/set-compositor

# powermenu
super + x
rofi -show p -modi p:${HOME}/.scripts/powermenu \
-theme ${HOME}/.config/rofi/config.rasi \
-font "mplus Nerd Font Mono 10" \
-width 20 \
-lines 2

# simple ss with rofi
super + r
rofi -show p -modi p:${HOME}/.scripts/rofiss \
-theme ${HOME}/.config/rofi/config.rasi \
-font "mplus Nerd Font Mono 10" \
-width 20 \
-lines 3
bash ${HOME}/.scripts/get-all

# program launcher
super + @space
rofi -show drun

# network
super + n
bash ${HOME}/.scripts/network

# mpd rofi
super + m
bash ${HOME}/.scripts/mpd
Expand Down
41 changes: 41 additions & 0 deletions .scripts/get-all
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash

rofi_command="rofi -lines 5 -theme $HOME/.config/rofi/config.rasi"

# option
theme="☱ : Theme"
network="❋ : Network"
model="❒ : Compositor"
power="⏻ : Powermenu"
screenshot="⎚ : Screenshots"

# Variable passed to rofi
options="$theme\n$network\n$model\n$power\n$screenshot"

# Spawn menu
chosen="$(echo -e "$options" | $rofi_command -p "Menu" -dmenu)"
case $chosen in
$network)
bash ${HOME}/.scripts/network
;;
$theme)
bash ${HOME}/.scripts/set-theme
;;
$model)
bash ${HOME}/.scripts/set-compositor
;;
$power)
rofi -show p -modi p:${HOME}/.scripts/powermenu \
-theme ${HOME}/.config/rofi/config.rasi \
-font "mplus Nerd Font Mono 10" \
-width 20 \
-lines 2
;;
$screenshot)
rofi -show p -modi p:${HOME}/.scripts/rofiss \
-theme ${HOME}/.config/rofi/config.rasi \
-font "mplus Nerd Font Mono 10" \
-width 20 \
-lines 3
;;
esac
14 changes: 5 additions & 9 deletions .scripts/mpd
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ rofi_command="rofi -theme $HOME/.config/rofi/config.rasi"
status="$(mpc status)"
# Defines the Play / Pause option content
if [[ $status == *"[playing]"* ]]; then
play_pause=" Pause"
play_pause=" Pause"
else
play_pause=" Play"
play_pause=" Play"
fi
active=""
urgent=""
stop=" Stop"
next=" Next"
previous=" Previous"
next="❯ Next"
previous="❮ Previous"

# Variable passed to rofi
options="$previous\n$play_pause\n$stop\n$next"
options="$previous\n$play_pause\n$next"

# Get the current playing song
current=$(mpc -f "%artist% - %title%" current)
Expand All @@ -35,9 +34,6 @@ case $chosen in
$play_pause)
mpc -q toggle && notify-send -u low -t 1800 "$(mpc current)"
;;
$stop)
mpc -q stop
;;
$next)
mpc -q next && notify-send -u low -t 1800 "$(mpc current)"
;;
Expand Down
10 changes: 1 addition & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,7 @@ $ fc-cache -rv
|-------------------------|------------------------|
| Reload sxhkd | Super + Escape |
|-------------------------|------------------------|
| Switch Theme | Super + Z |
|-------------------------|------------------------|
| Power Menu | Super + X |
|-------------------------|------------------------|
| Switch Model Compositor | Super + C |
|-------------------------|------------------------|
| Simple Ss WIth Rofi | Super + R |
|-------------------------|------------------------|
| Network Configuration | Super + N |
| Get all Menu XD | Super + Z |
|-------------------------|------------------------|
| Mpd With Rofi | Super + M |
|-------------------------|------------------------|
Expand Down

0 comments on commit eb67dcb

Please sign in to comment.