Cleanup dotfiles, fixed permissions
Also updated i3 config
This commit is contained in:
BIN
.config/i3/boot.mp3
Normal file
BIN
.config/i3/boot.mp3
Normal file
Binary file not shown.
235
.config/i3/config
Normal file
235
.config/i3/config
Normal file
@@ -0,0 +1,235 @@
|
||||
# T's desktop v3
|
||||
#exec --no-stratup-id xrandr --output eDP1 --primary --auto
|
||||
#exec --no-startup-id xrandr --output HDMI-0 --auto --mode 2048x1152 --primary
|
||||
exec_always --no-startup-id $HOME/.config/i3/scripts/polybar_launch.sh
|
||||
exec --no-startup-id compton -G -b
|
||||
#exec --no-startup-id mplayer -fs $HOME/.i3/boot.mp4
|
||||
#exec --no-startup-id conky -c $HOME/.config/conky/conkyrc
|
||||
exec --no-startup-id xset -dpms && xset s noblank && xset s noexpose && xset dpms 600 1800 360
|
||||
exec --no-startup-id synclient TapButton1=1
|
||||
exec xautolock -time 10 -locker $HOME/config/i3/scripts/locker.sh
|
||||
#exec xautolock -locknow
|
||||
#DAEMONS
|
||||
exec --no-startup-id udiskie -t
|
||||
exec --no-startup-id nitrogen --restore
|
||||
exec --no-startup-id dunst
|
||||
#exec --no-startup-id mpd
|
||||
#exec --no-startup-id megasync
|
||||
#exec --no-startup-id parcellite
|
||||
exec --no-startup-id blueman-applet
|
||||
#Layout
|
||||
exec setxkbmap us altgr-intl
|
||||
#exec xmodmap $HOME/.i3/custom.map
|
||||
#exec --no-startup-id /usr/lib/gnome-settings-daemon/gsd-xsettings
|
||||
exec--no-startup-id gnome-power-manager
|
||||
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
#exec --no-startup-id gnome-flashback
|
||||
|
||||
font pango: xos4 Terminus, Font Awesome 5 Free, Font Awesome 5 Brands 12
|
||||
|
||||
#--APPEARANCE--#
|
||||
#-----T-i3-----#
|
||||
#class border backgr. text indicator
|
||||
client.focused #f8f8f2 #f8f8f2 #44475a #8be9fd
|
||||
client.focused_inactive #44475a #44475a #ffffff #6272a4
|
||||
client.urgent #ff79c6 #900000 #ffffff #900000
|
||||
client.placeholder #000000 #0c0c0c #ffffff #000000
|
||||
client.background #ffffff
|
||||
|
||||
#//APPEARANCE//#
|
||||
|
||||
set $mod Mod4
|
||||
set $alt Mod1
|
||||
set $m Mod3
|
||||
|
||||
#--WINDOW-SETTINGS--#
|
||||
floating_modifier $mod
|
||||
for_window [class=".*"] title_format "-> %title"
|
||||
for_window [class=".*"] border pixel 2
|
||||
for_window [class="Pavucontrol"] floating enable
|
||||
for_window [class="octopi"] floating enable
|
||||
for_window [class="lxappearance"] floating enable
|
||||
for_window [class="mojo"] floating enable
|
||||
for_window [class="nitrogen"] floating enable
|
||||
for_window [title="Hold On*"] floating enable
|
||||
for_window [title="Cerebro*"] floating enable
|
||||
for_window [title="florence"] floating enable
|
||||
for_window [title="Starting Unity...*"] floating enable
|
||||
for_window [window_role="pop-up"] floating enable
|
||||
for_window [window_role="task_dialog"] floating enable
|
||||
assign [class="^ranger$"] → $WS4
|
||||
assign [title="^ncmpcpp$"] → $WS5
|
||||
assign [class="^URxvt$"] → $WS3
|
||||
assign [class="^Termite$"] → $WS3
|
||||
assign [class="^Alacritty$"] → $WS3
|
||||
assign [class="^Firefox$"] → $WS2
|
||||
assign [class="^Steam*"] → $WSW2
|
||||
assign [class="^Gimp$"] → $WSW4
|
||||
#//WINDOW-SETTINGS//#
|
||||
|
||||
#--CONTAINERS+WINDOWS--#
|
||||
bindsym $mod+Shift+q kill
|
||||
bindsym --release button2 kill
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
|
||||
bindsym $mod+p focus parent
|
||||
bindsym $mod+a layout toggle split
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+v layout tabbed
|
||||
bindsym $mod+x split h
|
||||
bindsym $mod+c split v
|
||||
|
||||
bindsym $mod+u border pixel 4
|
||||
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
bindsym $mod+space focus mode_toggle
|
||||
#//CONTAINERS+WINDOWS//#
|
||||
|
||||
#--CUSTOM COMMANDS--#
|
||||
#KEYBOARD LAYOUT SWITCHING
|
||||
#bindsym $alt+F3 exec --no-startup-id setxkbmap us altgr-intl && xmodmap ~/.i3/custom.map
|
||||
#bindsym $alt+F2 exec --no-startup-id setxkbmap si
|
||||
|
||||
#LAUNCH PROGRAM
|
||||
bindsym $mod+d exec --no-startup-id rofi -color-enabled -show run -font "xos4 Terminus 18"
|
||||
bindsym $mod+Shift+d exec --no-startup-id rofi -show drun -font "xos4 Terminus 18" -o 85 -p "Run:"
|
||||
bindsym $alt+Tab exec --no-startup-id rofi -show window -font "xos4 Terminus 18"
|
||||
|
||||
bindsym $mod+t exec alacritty
|
||||
bindsym $mod+w exec firefox
|
||||
bindsym $mod+Shift+f exec alacritty --config-file "$HOME/.config/alacritty/alacritty_ranger.yml" -t ranger -e ranger ~
|
||||
bindsym $mod+m exec alacritty -e ncmpcpp
|
||||
|
||||
#INTEGRATED-SETTINGS
|
||||
bindsym XF86AudioPlay exec mpc toggle
|
||||
bindsym XF86AudioStop exec mpc stop
|
||||
bindsym XF86AudioNext exec mpc next
|
||||
bindsym XF86AudioPrev exec mpc previous
|
||||
bindsym XF86AudioMute exec ~/.config/i3/scripts/volume_set.sh mute
|
||||
bindsym XF86AudioRaiseVolume exec ~/.config/i3/scripts/volume_set.sh up
|
||||
bindsym XF86AudioLowerVolume exec ~/.config/i3/scripts/volume_set.sh down
|
||||
bindsym XF86MonBrightnessUp exec xbacklight +5
|
||||
bindsym XF86MonBrightnessDown exec xbacklight -5
|
||||
bindsym XF86KbdBrightnessUp exec asus-kbd-backlight up
|
||||
bindsym XF86KbdBrightnessDown exec asus-kbd-backlight down
|
||||
bindsym XF86Sleep exec ~/.config/i3/scripts/locker.sh & systemctl suspend
|
||||
bindsym $mod+Shift+p exec ~/.config/i3/scripts/locker.sh & systemctl suspend
|
||||
bindsym $mod+Shift+o exec ~/.config/i3/scripts/locker.sh
|
||||
|
||||
#SHUTDOWN+RESTART
|
||||
bindsym $mod+Shift+c reload
|
||||
bindsym $mod+Shift+r restart
|
||||
bindsym $mod+Shift+z exec "i3-msg exit"
|
||||
bindsym $mod+Shift+e exec ~/.config/i3/scripts/locker.sh
|
||||
|
||||
#//CUSTOM COMMANDS//#
|
||||
|
||||
#--WORKSPACES--#
|
||||
workspace_auto_back_and_forth yes
|
||||
workspace $WS1 output primary
|
||||
|
||||
#Primary workspaces
|
||||
set $WS1 "1:"
|
||||
set $WS2 "2:"
|
||||
set $WS3 "3:"
|
||||
set $WS4 "4:"
|
||||
set $WS5 "5:"
|
||||
bindsym $mod+1 workspace $WS1
|
||||
bindsym $mod+2 workspace $WS2
|
||||
bindsym $mod+3 workspace $WS3
|
||||
bindsym $mod+4 workspace $WS4
|
||||
bindsym $mod+5 workspace $WS5
|
||||
bindsym $mod+Shift+1 move container to workspace $WS1
|
||||
bindsym $mod+Shift+2 move container to workspace $WS2
|
||||
bindsym $mod+Shift+3 move container to workspace $WS3
|
||||
bindsym $mod+Shift+4 move container to workspace $WS4
|
||||
bindsym $mod+Shift+5 move container to workspace $WS5
|
||||
bindsym $m+1 workspace $WS1
|
||||
bindsym $m+2 workspace $WS2
|
||||
bindsym $m+3 workspace $WS3
|
||||
bindsym $m+4 workspace $WS4
|
||||
bindsym $m+5 workspace $WS5
|
||||
bindsym $m+Shift+1 move container to workspace $WS1
|
||||
bindsym $m+Shift+2 move container to workspace $WS2
|
||||
bindsym $m+Shift+3 move container to workspace $WS3
|
||||
bindsym $m+Shift+4 move container to workspace $WS4
|
||||
bindsym $m+Shift+5 move container to workspace $WS5
|
||||
|
||||
#Secondary workspaces
|
||||
set $WSW1 "6:"
|
||||
set $WSW2 "7:"
|
||||
set $WSW3 "8:"
|
||||
set $WSW4 "9:"
|
||||
bindsym $mod+F1 workspace $WSW1
|
||||
bindsym $mod+F2 workspace $WSW2
|
||||
bindsym $mod+F3 workspace $WSW3
|
||||
bindsym $mod+F4 workspace $WSW4
|
||||
bindsym $mod+Shift+F1 move container to workspace $WSW1
|
||||
bindsym $mod+Shift+F2 move container to workspace $WSW2
|
||||
bindsym $mod+Shift+F3 move container to workspace $WSW3
|
||||
bindsym $mod+Shift+F4 move container to workspace $WSW4
|
||||
bindsym $m+F1 workspace $WSW1
|
||||
bindsym $m+F2 workspace $WSW2
|
||||
bindsym $m+F3 workspace $WSW3
|
||||
bindsym $m+F4 workspace $WSW4
|
||||
bindsym $m+Shift+F1 move container to workspace $WSW1
|
||||
bindsym $m+Shift+F2 move container to workspace $WSW2
|
||||
bindsym $m+Shift+F3 move container to workspace $WSW3
|
||||
bindsym $m+Shift+F4 move container to workspace $WSW4
|
||||
|
||||
#Multiple screens
|
||||
bindsym $mod+Left move container to output left
|
||||
bindsym $mod+Right move container to output right
|
||||
bindsym $mod+Shift+Left move workspace to output left
|
||||
bindsym $mod+Shift+Right move workspace to output right
|
||||
bindsym $mod+Up move container to output up
|
||||
bindsym $mod+Down move container to output down
|
||||
bindsym $mod+Shift+Up move workspace to output up
|
||||
bindsym $mod+Shift+Down move workspace to output down
|
||||
#//WORKSPACES//#
|
||||
|
||||
#--BORDER--#
|
||||
default_border pixel 2
|
||||
default_floating_border normal 4
|
||||
smart_borders on
|
||||
gaps inner 4
|
||||
gaps outer 10
|
||||
#//BORDER//#
|
||||
|
||||
#--LAYOUTS--#
|
||||
#bindsym $alt+Shift+l exec $HOME/.i3/scripts/workspace.sh "$HOME/.i3/layouts/workspace-3.json" "$HOME/build/doc24_backend"
|
||||
#//LAYOUTS//#
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
bindsym h resize shrink width 10 px or 10 ppt
|
||||
bindsym j resize grow height 10 px or 10 ppt
|
||||
bindsym k resize shrink height 10 px or 10 ppt
|
||||
bindsym l resize grow width 10 px or 10 ppt
|
||||
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
mode "ignore" {
|
||||
bindsym $alt+Shift+i mode "default"
|
||||
|
||||
}
|
||||
bindsym $alt+i mode "ignore"
|
||||
# vim:filetype=i3
|
||||
6
.config/i3/custom.map
Normal file
6
.config/i3/custom.map
Normal file
@@ -0,0 +1,6 @@
|
||||
clear mod4
|
||||
clear mod3
|
||||
keycode 94 = Hyper_L Hyper_L Hyper_L Hyper_L Hyper_L Hyper_L Hyper_L
|
||||
keycode 135 = Super_R Super_R Super_R Super_R Super_R Super_R Super_R
|
||||
add mod3 = Hyper_L
|
||||
add mod4 = Super_L Super_R
|
||||
73
.config/i3/layouts/gimp-layout.json
Normal file
73
.config/i3/layouts/gimp-layout.json
Normal file
@@ -0,0 +1,73 @@
|
||||
// vim:ts=4:sw=4:et
|
||||
{
|
||||
"border": "normal",
|
||||
"current_border_width": 5,
|
||||
"floating": "user_off",
|
||||
"geometry": {
|
||||
"height": 820,
|
||||
"width": 210,
|
||||
"x": 3599,
|
||||
"y": 0
|
||||
},
|
||||
"name": "Layers - Brushes",
|
||||
"percent": 0.1078125,
|
||||
"swallows": [
|
||||
{
|
||||
// "class": "^Gimp$",
|
||||
// "instance": "^gimp$",
|
||||
// "title": "^Layers\\ \\-\\ Brushes$",
|
||||
// "transient_for": "^$",
|
||||
// "window_role": "^gimp\\-dock$"
|
||||
}
|
||||
],
|
||||
"type": "con"
|
||||
}
|
||||
|
||||
{
|
||||
"border": "pixel",
|
||||
"current_border_width": 5,
|
||||
"floating": "user_off",
|
||||
"geometry": {
|
||||
"height": 200,
|
||||
"width": 620,
|
||||
"x": 410,
|
||||
"y": 370
|
||||
},
|
||||
"name": "*[progress_bar] (imported)-1.0 (RGB color, 1 layer) 192x12 – GIMP",
|
||||
"percent": 0.777083333333333,
|
||||
"swallows": [
|
||||
{
|
||||
// "class": "^Gimp$",
|
||||
// "instance": "^gimp$",
|
||||
// "title": "^\\*\\[progress_bar\\]\\ \\(imported\\)\\-1\\.0\\ \\(RGB\\ color\\,\\ 1\\ layer\\)\\ 192x12\\ \\–\\ GIMP$",
|
||||
// "transient_for": "^$",
|
||||
// "window_role": "^gimp\\-image\\-window$"
|
||||
}
|
||||
],
|
||||
"type": "con"
|
||||
}
|
||||
|
||||
{
|
||||
"border": "normal",
|
||||
"current_border_width": 5,
|
||||
"floating": "user_off",
|
||||
"geometry": {
|
||||
"height": 820,
|
||||
"width": 170,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"name": "Toolbox - Tool Options",
|
||||
"percent": 0.115104166666667,
|
||||
"swallows": [
|
||||
{
|
||||
// "class": "^Gimp$",
|
||||
// "instance": "^gimp$",
|
||||
// "title": "^Toolbox\\ \\-\\ Tool\\ Options$",
|
||||
// "transient_for": "^$",
|
||||
// "window_role": "^gimp\\-toolbox$"
|
||||
}
|
||||
],
|
||||
"type": "con"
|
||||
}
|
||||
|
||||
101
.config/i3/layouts/workspace-3.json
Normal file
101
.config/i3/layouts/workspace-3.json
Normal file
@@ -0,0 +1,101 @@
|
||||
// vim:ts=4:sw=4:et
|
||||
{
|
||||
// stacked split container with 2 children
|
||||
"border": "pixel",
|
||||
"floating": "auto_off",
|
||||
"layout": "stacked",
|
||||
"percent": 0.7,
|
||||
"type": "con",
|
||||
"nodes": [
|
||||
{
|
||||
"border": "none",
|
||||
"current_border_width": 4,
|
||||
"floating": "auto_off",
|
||||
"geometry": {
|
||||
"height": 768,
|
||||
"width": 1024,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"name": "tristan@T-i3: ~/build/doc24_backend",
|
||||
"percent": 0.5,
|
||||
"swallows": [
|
||||
{
|
||||
"class": "^Alacritty$",
|
||||
"instance": "^alacritty$"
|
||||
}
|
||||
],
|
||||
"type": "con"
|
||||
},
|
||||
{
|
||||
"border": "none",
|
||||
"current_border_width": 4,
|
||||
"floating": "auto_off",
|
||||
"geometry": {
|
||||
"height": 768,
|
||||
"width": 1024,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"name": "i3-save-tree --workspace 3 > ~/.i3/layouts/workspace-3.json",
|
||||
"percent": 0.5,
|
||||
"swallows": [
|
||||
{
|
||||
"class": "^Alacritty$",
|
||||
"instance": "^alacritty$"
|
||||
}
|
||||
],
|
||||
"type": "con"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
{
|
||||
// splitv split container with 2 children
|
||||
"border": "pixel",
|
||||
"floating": "auto_off",
|
||||
"layout": "splitv",
|
||||
"percent": 0.3,
|
||||
"type": "con",
|
||||
"nodes": [
|
||||
{
|
||||
"border": "none",
|
||||
"current_border_width": 4,
|
||||
"floating": "auto_off",
|
||||
"geometry": {
|
||||
"height": 768,
|
||||
"width": 1024,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"name": "tristan@T-i3: ~",
|
||||
"percent": 0.5,
|
||||
"swallows": [
|
||||
{
|
||||
"class": "^Alacritty$"
|
||||
}
|
||||
],
|
||||
"type": "con"
|
||||
},
|
||||
{
|
||||
"border": "none",
|
||||
"current_border_width": 4,
|
||||
"floating": "auto_off",
|
||||
"geometry": {
|
||||
"height": 768,
|
||||
"width": 1024,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"name": "tristan@T-i3: ~/build/doc24_backend",
|
||||
"percent": 0.5,
|
||||
"swallows": [
|
||||
{
|
||||
"class": "^Alacritty$"
|
||||
}
|
||||
],
|
||||
"type": "con"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
BIN
.config/i3/mboot.mp3
Normal file
BIN
.config/i3/mboot.mp3
Normal file
Binary file not shown.
BIN
.config/i3/scripts/claw
Executable file
BIN
.config/i3/scripts/claw
Executable file
Binary file not shown.
29
.config/i3/scripts/locker.sh
Executable file
29
.config/i3/scripts/locker.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
ARGS=(
|
||||
"--screen=0"
|
||||
"--blur=5"
|
||||
# "-i${HOME}/Pictures/bg_1440p/Linux-Wallpapers-19-2560-x-1920.png"
|
||||
# "-i${HOME}/Pictures/backgrounds/0c7e1f_5775038.jpg"
|
||||
"--clock"
|
||||
"--timecolor=dfdfdfff"
|
||||
"--datecolor=dfdfdfff"
|
||||
"--insidevercolor=35d75588"
|
||||
"--insidewrongcolor=d7355588"
|
||||
"--insidecolor=00000000"
|
||||
"--ringvercolor=64c784ff"
|
||||
"--ringwrongcolor=c76484ff"
|
||||
"--ringcolor=3555d7ff"
|
||||
"--linecolor=00000000"
|
||||
"--radius=30"
|
||||
"--indpos=x+200:h-70"
|
||||
"--timepos=x+90:h-70"
|
||||
"--datepos=tx:ty+25"
|
||||
"--statuspos=ix:iy+10"
|
||||
"--separatorcolor=6484c7ff"
|
||||
"--keyhlcolor=35d755ff"
|
||||
"--bshlcolor=d73555ff"
|
||||
"--veriftext=V" "--wrongtext=E")
|
||||
|
||||
i3lock "${ARGS[@]}" &
|
||||
i3lockpid=$!
|
||||
sleep 2
|
||||
23
.config/i3/scripts/polybar_launch.sh
Executable file
23
.config/i3/scripts/polybar_launch.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
if type "xrandr"; then
|
||||
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
||||
export COLOR_CYAN="#8be9fd"
|
||||
export COLOR_BLUE="#6272a4"
|
||||
export COLOR_GREEN="#50fa7b"
|
||||
export LABEL_MOUNTED="%{F$COLOR_CYAN}%mountpoint%%{F-}:%free%"
|
||||
export LABEL_NETWORK_CONNECTED="%{F$COLOR_CYAN}%local_ip%%{F-}:%downspeed:4%"
|
||||
MONITOR=$m polybar --reload top &
|
||||
MONITOR=$m polybar --reload bottom &
|
||||
done
|
||||
else
|
||||
polybar --reload top &
|
||||
fi
|
||||
|
||||
echo "Bars launched..."
|
||||
9
.config/i3/scripts/rotate_background.sh
Executable file
9
.config/i3/scripts/rotate_background.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#! /bin/bash
|
||||
WALLPAPERS="/home/tristan/Pictures/bg_1440p"
|
||||
ALIST=( `ls -w1 $WALLPAPERS` )
|
||||
RANGE=${#ALIST[@]}
|
||||
let "number = $RANDOM"
|
||||
let LASTNUM="`cat $WALLPAPERS/.last` + $number"
|
||||
let "number = $LASTNUM % $RANGE"
|
||||
echo $number > $WALLPAPERS/.last
|
||||
nitrogen --set-scaled --save $WALLPAPERS/${ALIST[$number]}
|
||||
40
.config/i3/scripts/shutdown_menu
Executable file
40
.config/i3/scripts/shutdown_menu
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
#LOCKSCRIPT="i3lock-extra -m pixelize"
|
||||
FG_COLOR="#d7d7d7"
|
||||
BG_COLOR="#15325A"
|
||||
SF_COLOR="#3555d7"
|
||||
SB_COLOR="#6484c7"
|
||||
color="-bg $BG_COLOR -fg $FG_COLOR -hlfg $SF_COLOR -hlbg $SB_COLOR -bw 0"
|
||||
|
||||
# menu defined as an associative array
|
||||
typeset -A menu
|
||||
|
||||
# Menu with keys/commands
|
||||
menu=(
|
||||
[Shutdown]="systemctl poweroff"
|
||||
[Reboot]="systemctl reboot"
|
||||
[Hibernate]="systemctl hibernate"
|
||||
[Suspend]="systemctl suspend"
|
||||
[Halt]="systemctl halt"
|
||||
[Lock]="~/.i3/scripts/locker.sh"
|
||||
[Logout]="exit"
|
||||
[Cancel]="Cancel"
|
||||
)
|
||||
|
||||
# Menu entries that may trigger a confirmation message
|
||||
menu_confirm="Shutdown Reboot Hibernate Suspend Halt Logout"
|
||||
launcher="rofi -dmenu -hide-scrollbar -width 10"
|
||||
launcher_opt="-i -yoffset 23 -location 3 $color"
|
||||
selection=$(printf '%s\n' ${!menu[@]} | sort | eval '$launcher $launcher_opt -font "Hack-Regular 12" -lines 8')
|
||||
if [ $selection == "Cancel" ] || [ -z $selection ]; then
|
||||
exit 1
|
||||
else
|
||||
if [[ ${menu_confirm[*]} =~ $selection ]]; then
|
||||
confirm=$(printf 'Yes\nNo\n' | eval '$launcher $launcher_opt -l 2 -font "Hack-Regular 12"')
|
||||
if [[ $confirm == 'Yes' ]]; then
|
||||
i3-msg -q "exec ${menu[${selection}]}"
|
||||
fi
|
||||
else
|
||||
i3-msg -q "exec ${menu[${selection}]}"
|
||||
fi
|
||||
fi
|
||||
7
.config/i3/scripts/term_runner.sh
Executable file
7
.config/i3/scripts/term_runner.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
while getopts "d:" option; do
|
||||
case "${option}" in
|
||||
d)
|
||||
alacritty --working-directory ${OPTARG} & ;;
|
||||
esac
|
||||
done
|
||||
18
.config/i3/scripts/volume_set.sh
Executable file
18
.config/i3/scripts/volume_set.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
if [ "$1" == "up" ]
|
||||
then
|
||||
pulsemixer --change-volume +5
|
||||
TEXT="Volume: $(pulsemixer --get-volume | cut -d' ' -f 1 | sed 's/\(\[\|\]\)//g')"
|
||||
elif [ "$1" == "down" ]
|
||||
then
|
||||
pulsemixer --change-volume -5
|
||||
TEXT="Volume: $(pulsemixer --get-volume | cut -d' ' -f 1 | sed 's/\(\[\|\]\)//g')"
|
||||
elif [ "$1" == "mute" ]
|
||||
then
|
||||
pulsemixer --toggle-mute
|
||||
TEXT="Mute: $(pulsemixer --get-mute | cut -d' ' -f 1 | sed 's/\(\[\|\]\)//g')"
|
||||
else
|
||||
echo "usage volume_set.sh {up|down|mute}"
|
||||
fi
|
||||
|
||||
dunstify -r 33223 "Volume changed" "$TEXT"
|
||||
13
.config/i3/scripts/wan-or-not.sh
Executable file
13
.config/i3/scripts/wan-or-not.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/zsh
|
||||
#First arg is icon for WAN IP, Second argument is icon for local IP, third for offline
|
||||
wanip=$(dig +short myip.opendns.com @resolver1.opendns.com);
|
||||
if [[ $wanip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
|
||||
echo "<span foreground='#00CC33'>$1</span>:$wanip"
|
||||
else
|
||||
wanip=$(ip addr show dev wlan0 | grep "inet " | awk '{print $2}')
|
||||
if [[ $wanip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} ]]; then
|
||||
echo "<span foreground='#3300CC'>$2</span>:$wanip"
|
||||
else
|
||||
echo "<span foreground='#CC0033'>$3</span>"
|
||||
fi
|
||||
fi
|
||||
2
.config/i3/scripts/workspace.sh
Executable file
2
.config/i3/scripts/workspace.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
i3-msg "append_layout $1" && bash $HOME/.i3/scripts/term_runner.sh -d "$2" -d "$2" -d "$2" -d "$HOME"
|
||||
Reference in New Issue
Block a user