Merge branch 'rofi', done migration

This commit is contained in:
TheK4n 2023-11-20 13:46:02 +03:00
commit 678533c613
10 changed files with 46 additions and 9 deletions

View File

@ -49,8 +49,10 @@ bindsym $mod+Return exec alacritty
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec --no-startup-id dmenu_run -i -b -p "Program to run: " -fn xft:FiraCode:size=$font_size
bindsym $mod+d exec --no-startup-id rofi -show drun
bindsym $mod+i exec --no-startup-id i3_switch_workspace.sh
bindsym $mod+o exec --no-startup-id slm_rofi.sh
bindsym $mod+p exec --no-startup-id power_rofi.sh
# change focus
bindsym $mod+h focus left
@ -173,7 +175,7 @@ mode $exitmode {
bindsym e exit
bindsym r exec reboot
bindsym s exec shutdown -h now
bindsym u exec exec systemctl suspend; mode "default"
bindsym u exec systemctl suspend; mode "default"
bindsym l exec $i3lock_cmd; mode "default"
bindsym b exec convert canvas:none PNG:- | feh -YF -; mode "default"

View File

@ -0,0 +1,7 @@
configuration {
show-icons: true;
matching: "fuzzy";
terminal: "alacritty";
font: "xft:FiraCode 12";
}
@theme "Arc-Dark"

View File

@ -1,6 +1,6 @@
#!/bin/sh
bssid="$(bluetoothctl devices | dmenu -b -p "Devices: " -l 20 | cut -d' ' -f2)"
bssid="$(bluetoothctl devices | rofi -dmenu -p "Devices: " -l 20 | cut -d' ' -f2)"
exit_counter=0
until bluetoothctl connect "$bssid"

View File

@ -0,0 +1,13 @@
#!/bin/bash
gen_workspaces()
{
i3-msg -t get_workspaces | tr ',' '\n' | grep "name" | sed 's/"name":"\(.*\)"/\1/g'
}
choosed_workspace=$(gen_workspaces | rofi -dmenu -i -p "Select workspace")
if [ -n "${choosed_workspace}" ]
then
i3-msg workspace "${choosed_workspace}"
fi

View File

@ -1,4 +1,4 @@
#!/bin/sh
pidd="$(ps -u $USER -o pid,%mem,%cpu,comm | sort -b -k2 -r | sed -n '1!p' | dmenu -i -l 15 | awk '{print $1}')"
pidd="$(ps -u $USER -o pid,%mem,%cpu,comm | sort -b -k2 -r | sed -n '1!p' | rofi -dmenu -i -l 15 | awk '{print $1}')"
kill -15 "$pidd"

View File

@ -0,0 +1,11 @@
#!/bin/bash
eval "$(echo "i3-msg exit
reboot
shutdown -h now
systemctl suspend
i3lock -enf -c 1e1e1e
convert canvas:none PNG:- | feh -YF -" | rofi -dmenu -i -p "Power")"

View File

@ -27,7 +27,7 @@ die_if_invalid_path() {
cmd_list() {
ls "$LAYOUTS_DIR"
find "$LAYOUTS_DIR" -type f -exec basename -s .sh {} \;
}
cmd_edit() {

View File

@ -0,0 +1,4 @@
#!/bin/bash
choosed_screen_layout="$(slm ls | rofi -dmenu -i -p "Select screen layout")"
slm load "$choosed_screen_layout"

View File

@ -2,6 +2,6 @@
set -eo pipefail
bssid="$(nmcli -f BSSID,SSID,SIGNAL,RATE,BARS,SECURITY dev wifi list | sed -n '1!p' | dmenu -b -p "WiFi: " -l 20 | cut -d' ' -f1)"
pass="$(echo "" | dmenu -b -p "Password: ")"
bssid="$(nmcli -f BSSID,SSID,SIGNAL,RATE,BARS,SECURITY dev wifi list | sed -n '1!p' | rofi -dmenu -p "WiFi: " -l 20 | cut -d' ' -f1)"
pass="$(echo "" | rofi -dmenu -p "Password: ")"
nmcli device wifi connect "$bssid" "password" "$pass"

View File

@ -20,7 +20,7 @@ declare -A TARGETS=(
["git"]=".config/git"
["ranger"]=".config/ranger"
["gpg"]=""
["i3"]=".xinitrc .xprofile .Xresources .config/i3 .config/i3status .local/bin/i3status_wrapper .config/picom .local/bin/slm .local/bin/wifi .local/bin/bluetooth"
["i3"]=".xinitrc .xprofile .Xresources .config/i3 .config/i3status .local/bin/i3status_wrapper .config/rofi .config/picom .local/bin/slm .local/bin/wifi .local/bin/bluetooth .local/bin/i3_switch_workspace.sh"
["bat"]=".config/bat"
["font"]=""
["termux"]=""