This commit is contained in:
Clay Gomera 2023-10-03 10:40:20 -04:00
parent e8b31ea3d4
commit 8ea5a726bf
12 changed files with 490 additions and 441 deletions

View file

@ -16,13 +16,19 @@ fi
# environment variables
export EDITOR="~/.local/bin/lvim"
export VISUAL="neovide --neovim-bin ~/.local/bin/lvim"
export MEDIA_DIR="$HOME/Media"
export TEMP_DIR="$HOME/Temporal"
# clean home
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DESKTOP_DIR="$HOME/Desktop"
export XDG_DOWNLOAD_DIR="$HOME/Downloads"
export XDG_TEMPLATES_DIR="$HOME/Templates"
export XDG_PUBLICSHARE_DIR="$HOME/Public"
export XDG_DOCUMENTS_DIR="$HOME/Documents"
export XDG_MUSIC_DIR="$HOME/Music"
export XDG_PICTURES_DIR="$HOME/Pictures"
export XDG_VIDEOS_DIR="$HOME/Videos"
export W3M_DIR="$XDG_DATA_HOME/w3m"
export GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc-2.0"
export INPUTRC="$HOME/.config/inputrc"

View file

@ -5,7 +5,7 @@
# - Dependencies: dmenu, power-profiles-daemon, slock
#######################
## Main menu options ##
## Main manu options ##
#######################
option1=" Logout"
option2=" Reboot"
@ -13,18 +13,23 @@ option3=" Power off"
option4="󰒲 Suspend"
option5=" Lock"
option6=" Change power profile"
option7=" Cancel"
option7="󱎘 Exit"
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6\n$option7"
############################
## Power profiles submenu ##
############################
####################################
## Power profiles submenu options ##
####################################
pwr1="󰓅 Performance"
pwr2="󰾅 Balanced"
pwr3="󰾆 Power Saver"
pwr4=" Cancel"
pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4"
#####
## This variable will store the current power profile
#####
currentpwr=$(powerprofilesctl get)
##########
## main ##
##########
@ -46,29 +51,45 @@ case "$action" in
slock;
;;
"$option6")
currentpwr=$(powerprofilesctl get); # this variable will store the current power profile
if [ "$currentpwr" = "performance" ]; then # this if statement is used for the power profiles prompt
currentpwr="$pwr1"
#####
## These conditions will be used for the prompt
#####
if [ "$currentpwr" = "performance" ]; then
currentpwr="$pwr1";
elif [ "$currentpwr" = "balanced" ]; then
currentpwr="$pwr2"
currentpwr="$pwr2";
elif [ "$currentpwr" = "power-saver" ]; then
currentpwr="$pwr3"
currentpwr="$pwr3";
fi
pwraction=$(echo -e "$pwrs" | dmenu -i -p " Power Profile Menu - Currently set to: ${currentpwr}"); # power profiles submenu prompt
pwraction=$(echo -e "$pwrs" | dmenu -l 6 -i -p " Power Profile Menu - Currently set to: $currentpwr") # power profiles submenu prompt
case "$pwraction" in
"$pwr1")
powerprofilesctl set performance && notify-send "Power profile switched to performance";
if [ "$currentpwr" = "$pwr1" ]; then # if the power profile is already set to performance
notify-send "The power profile is already set to performance";
exit 1;
else
powerprofilesctl set performance && notify-send "Power profile switched to performance"; # if not, set the powerprofile to performance
fi
;;
"$pwr2")
powerprofilesctl set balanced && notify-send "Power profile switched to balanced";
if [ "$currentpwr" = "$pwr2" ]; then # if the power profile is already set to balanced
notify-send "The power profile is already set to balanced";
exit 1;
else
powerprofilesctl set balanced && notify-send "Power profile switched to balanced"; # if not, set the powerprofile to balanced
fi
;;
"$pwr3")
powerprofilesctl set power-saver && notify-send "Power profile switched to power saver";
if [ "$currentpwr" = "$pwr3" ]; then # if the power profile is already set to power saver
notify-send "The power profile is already set to power saver";
exit 1;
else
powerprofilesctl set power-saver && notify-send "Power profile switched to power saver"; # if not, set the powerprofile to power saver
fi
;;
"$pwr4")
exit 0
esac
;;
exit 0;
esac;;
"$option7")
exit 0
exit 0;
esac

View file

@ -7,15 +7,23 @@
###########################
## Screenshots Directory ##
###########################
SHOTDIR="$MEDIA_DIR/Pictures/Screenshots" # $MEDIA_DIR reffers to a global variable in .xinitrc/.bash_profile
SHOTDIR="$XDG_PICTURES_DIR/screenshots"
mkdir -p "$SHOTDIR"
###########################
## Screencasts Directory ##
###########################
CASTDIR="$XDG_VIDEOS_DIR/screencasts"
mkdir -p "$CASTDIR"
#######################
## Main menu choices ##
#######################
mcho1="󰹑 Take an screenshot"
mcho2="󰻃 Record the screen"
mchos="$mcho1\n$mcho2"
mcho1="󰹑 Take a screenshot"
mcho2="󰐍 Record the screen"
mcho3="󰙧 Stop recording"
mcho4="󱎘 Exit"
mchos="$mcho1\n$mcho2\n$mcho3\n$mcho4"
#############################
## Screenshot menu choices ##
@ -31,7 +39,7 @@ schos="$scho1\n$scho2\n$scho3\n$scho4\n$scho5"
## Screenshot submenu ##
########################
sscho1="󰆏 Copy to clipboard"
sscho2="󰠘 Save to ~/Media/Pictures/Screenshots"
sscho2="󰠘 Save to $SHOTDIR"
sschos="$sscho1\n$sscho2"
#################################
@ -43,38 +51,25 @@ del3="󱑇 10 sec delay"
dels="$del1\n$del2\n$del3"
#####
## This function uses the sschos variable
## to ask the user what to do with the
## This function uses the sschos variable to ask the user what to do with the
## screenshot
#####
## param: none
## return: string
#####
fsschos() {
sschoice=$(echo -e "$sschos" | dmenu -i -l 2 -p " What do you want to do with this screenshot?")
}
#####
## This function uses the dels variable
## to ask the user which delay option to
## This function uses the dels variable to ask the user which delay option to
## choose
#####
## param: none
## return: string
#####
fdel() {
del=$(echo -e "$dels" | dmenu -i -p " Select Delay")
}
#####
## This function does a full screen
## screenshot without delay, depending on
## what the user chooses on the fsschos
## function, the screenshot will be saved
## to the clipboard or to $SHOTDIR
#####
## param: none
## return: void
## This function does a full screen screenshot without delay, depending on what
## the user chooses on the fsschos function, the screenshot will be saved to the
## clipboard or to $SHOTDIR
#####
shot_screen() {
fsschos
@ -88,17 +83,10 @@ shot_screen() {
}
#####
## This function does a full screen
## screenshot with delay, depending on
## what the user chooses on the fsschos
## function, the screenshot will be saved
## to the clipboard or to $SHOTDIR. And
## depending on what the user chooses on
## the fdel function, the delay will be
## between 3 and 10 seconds
#####
## param: none
## return: void
## This function does a full screen screenshot with delay, depending on what the
## user chooses on the fsschos function, the screenshot will be saved to the
## clipboard or to $SHOTDIR. And depending on what the user chooses on the fdel
## function, the delay will be between 3 and 10 seconds
#####
shot_screen_delay() {
fsschos;
@ -118,13 +106,13 @@ shot_screen_delay() {
fdel;
case $del in
"$del1")
sleep 3 && maim -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved to ~/Media/Pictures/Screenshots/";
sleep 3 && maim -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved to $SHOTDIR";
;;
"$del2")
sleep 5 && maim -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved to ~/Media/Pictures/Screenshots/";
sleep 5 && maim -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved to $SHOTDIR";
;;
"$del3")
sleep 10 && maim -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved to ~/Media/Pictures/Screenshots/";
sleep 10 && maim -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved to $SHOTDIR";
esac
else
exit 0
@ -132,55 +120,75 @@ shot_screen_delay() {
}
#####
## This function allows the user to select
## the area on screen to screenshot
## depending on what the user chooses on
## the fsschos function, the screenshot
## will be saved to the clipboard or to
## $SHOTDIR
#####
## param: none
## return: void
## This function allows the user to select the area on the screen to screenshot
## depending on what the user chooses on the fsschos function, the screenshot will
## be saved to the clipboard or to $SHOTDIR
#####
shot_area() {
fsschos;
if [ "$sschoice" = "$sscho1" ]; then
maim -s | xclip -selection clipboard -t image/png && notify-send "Screenshot saved to clipboard";
elif [ "$sschoice" = "$sscho2" ]; then
maim -s -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved to ~/Media/Pictures/Screenshots/";
maim -s -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved to $SHOTDIR";
else
exit 0
fi
}
#####
## This function does an screnshot of the
## currently active window, depending on
## what the user chooses on the fsschos
## function, the screenshot will be saved
## to the clipboard or to $SHOTDIR
#####
## param: none
## return: void
## This function does a screenshot of the currently active window, depending
## on what the user chooses on the fsschos function, the screenshot will be
## saved to the clipboard or to $SHOTDIR
#####
shot_window() {
fsschos;
if [ "$sschoice" = "$sscho1" ]; then
maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png && notify-send "Screenshot saved to clipboard";
elif [ "$sschoice" = "$sscho2" ]; then
maim -i "$(xdotool getactivewindow)" -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved to ~/Media/Pictures/Screenshots/";
maim -i "$(xdotool getactivewindow)" -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved to $SHOTDIR";
else
exit 0
fi
}
#####
## This function uses ffmpeg to record the screen, It will check if ffmpeg is
## already running (already recording), to prevent the user from executing
## another ffmpeg instance, if it's not running, it will grab the screen
## resolution with xdpyinfo and use it to record the screen with ffmpeg.
#####
start_recording() {
if pgrep -x "ffmpeg" > /dev/null; then
notify-send "A screen recording is already in progress."
else
filename="$CASTDIR/$(date +%s).mp4"
resolution="$(xdpyinfo | grep dimensions | awk '{print $2}')"
ffmpeg -f x11grab -s "$resolution" -i :0.0 -c:v libx264 -preset ultrafast -qp 0 "$filename" &
notify-send "Screen recording started."
fi
}
#####
## This function stops screen recording, it first checks if ffmpeg is already
## running (already recording), to only stop a recording if there's an ffmpeg
## instance running
#####
stop_recording() {
if pgrep -x "ffmpeg" > /dev/null; then
pkill -f "ffmpeg -f x11grab"
notify-send "Screen recording stopped. Video saved to $CASTDIR"
else
notify-send "You aren't recording anything at the moment"
fi
}
##########
## main ##
##########
mchoice=$(echo -e "$mchos" | dmenu -i -l 2 -p " Screen Capture Menu") # main menu prompt
mchoice=$(echo -e "$mchos" | dmenu -i -l 4 -p " Screen Capture Menu") # main menu prompt
case $mchoice in
"$mcho1")
schoice=$(echo -e "$schos" | dmenu -i -l 9 -p " Sreenshot Menu") # screenshot menu prompt
schoice=$(echo -e "$schos" | dmenu -i -l 9 -p " Screenshot Menu") # screenshot menu prompt
case $schoice in
"$scho1")
shot_screen;
@ -199,8 +207,12 @@ case $mchoice in
esac
;;
"$mcho2")
# TODO Implement screencast functionality with ffmpeg
notify-send "Bro you need to implement screen recording with ffmpeg"
exit 0
start_recording;
;;
"$mcho3")
stop_recording;
;;
"$mcho4")
exit 0;
;;
esac

View file

@ -7,7 +7,7 @@
##########################
## Wallpapers Directory ##
##########################
walldir="$MEDIA_DIR/Pictures/Wallpapers" # $MEDIA_DIR reffers to a global variable in .xinitrc/.bash_profile
walldir="$XDG_PICTURES_DIR/wallpapers"
cd "$walldir" || exit # we cd into $walldir in order to get only the file name on the main prompt
#######################

View file

@ -12,14 +12,16 @@ option2=" Turn off WiFi"
option3="󱛅 Disconnect WiFi"
option4="󱛃 Connect WiFi"
option5="󱛆 Setup captive portal"
option6=" Exit"
option6="󱎘 Exit"
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6"
#####
## This variable will grab the wireless
## interface name
## These variables will store specific
## information about the wireless
## interface
#####
wlan=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f1 | head -1)
wifi_info=$(nmcli dev | awk '/wifi/ {print $1,$3; exit}')
read -r wlan constate <<< "$wifi_info"
#####
## This function uses nmcli to turn
@ -30,8 +32,7 @@ wlan=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f1 | head -1)
## return: void
#####
turnoff() {
nmcli radio wifi off
notify-send "WiFi has been turned off"
nmcli radio wifi off && notify-send "WiFi has been turned off";
}
#####
@ -43,22 +44,26 @@ turnoff() {
## return: void
#####
turnon() {
nmcli radio wifi on
notify-send "WiFi has been turned on"
nmcli radio wifi on && notify-send "WiFi has been turned on";
}
#####
## This function uses nmcli and the
## $wlan variable to disconnect
## from the wifi network and
## then sends a notification
## $wlan and $constate variables to
## disconnect from the wifi network
## and then sends a notification
#####
## param: none
## return: void
#####
disconnect() {
nmcli device disconnect "$wlan"
notify-send "WiFi has been disconnected"
if [ "$constate" = "disconnected" ]; then
notify-send "WiFi is already disconnected";
elif [ "$constate" = "connected" ]; then
nmcli device disconnect "$wlan" && notify-send "Wifi has been disconnected";
else
exit 1;
fi
}
#####
@ -71,10 +76,10 @@ disconnect() {
## return: string
#####
connect() {
notify-send "Scannig WiFi networks, please wait"
nmcli dev wifi rescan
sleep 1
bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | dmenu -i -l 10 -p "Select a Wifi Network  " | cut -d' ' -f1)
notify-send "Scannig networks..." && nmcli dev wifi rescan;
wifinet=$(nmcli -f BSSID,SSID,BARS,SECURITY dev wifi list | sed -n '1!p' | dmenu -i -l 10 -p " Select a Wifi Network");
bssid=$(echo "$wifinet" | cut -d' ' -f1)
ssid=$(echo "$wifinet" | cut -d' ' -f3)
}
#####
@ -85,11 +90,18 @@ connect() {
## return: string
#####
password() {
# TODO Create a condition to check if the chosen network is open or not, that
# way this will be skipped of it's open
# TODO What if the network is already saved? The user doesn't need to type the
# password again
pass=$(echo " " | dmenu -P -i -p "Enter Password ")
if nmcli connection show | grep -q "$ssid"; then # check if the network is already saved
return 0; # no password is required
elif nmcli -f BSSID,SECURITY dev wifi list | sed -n '1!p' | grep "$bssid" | awk '{print $2}' | grep -q -- "--"; then # check if the network is open
return 0; # no password is required
else
pass=$(dmenu -i -l 1 -P -p "Enter Password " --password);
if [ -n "$pass" ]; then # if the user gave a password
return 0;
else
exit 1; # if not, exit the script
fi
fi
}
#####
@ -101,28 +113,10 @@ password() {
## return: void
#####
action() {
# TODO Create a condition to check if the chosen network is open or not (check
# password funcion)
# TODO What if the network is already saved? The user doesn't need to type the
# password again
nmcli device wifi connect "$bssid" password "$pass" || nmcli device wifi connect "$bssid"
}
#####
## This function will check if the
## connection works
#####
## param: none
## return: void
#####
check() {
notify-send "Checking if connection was successful"
sleep 1
currentwfi=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f4 | head -1)
if ping -q -c 2 -W 2 google.com >/dev/null; then
notify-send "You are now connected to $currentwfi and internet is working properly"
else
notify-send "Your internet is not working :("
if [ -n "$pass" ]; then # we need to check again if the $pass variable exists
nmcli dev wifi connect "$bssid" password "$pass"
else # if not, that means that the password() function ended in one of the first two conditions, the network is saved or open
nmcli dev wifi connect "$bssid";
fi
}
@ -132,23 +126,25 @@ check() {
cases=$(echo -e "$options" | dmenu -l 6 -i -p " Wifi Settings" ) # main menu prompt
case "$cases" in
"$option1")
turnon;;
turnon;
;;
"$option2")
turnoff;;
turnoff;
;;
"$option3")
disconnect;;
disconnect;
;;
"$option4")
connect;
if [ -n "$bssid" ]; then # if the user chooses a network
password;
if connect; then # if the user chooses a network
password; # this function will exit the script if the user didn't put a password
action;
sleep 5;
check;
else
exit 0; # if not, exit the script
fi;;
exit 1; # if not, exit the script
fi
;;
"$option5")
"$BROWSER" http://networkcheck.kde.org;; # $BROWSER reffers to a global variable set in .xinitrc/.bash_profile
io.elementary.capnet-assist;
;;
"$option6")
exit 0;
esac

View file

@ -1,10 +1,13 @@
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const int horizpadbar = 2; /* horizontal padding for statusbar */
static const int vertpadbar = 4; /* vertical padding for statusbar */
#include "tcl.c"
#include "movestack.c"
// Appearance
static const unsigned int borderpx = 1; // border pixel of windows
static const unsigned int snap = 32; // snap pixel
static const int showbar = 1; // 0 means no bar
static const int topbar = 1; // 0 means bottom bar
static const int horizpadbar = 2; // horizontal padding for statusbar
static const int vertpadbar = 4; // vertical padding for statusbar
static const char *fonts[] = {"Symbols Nerd Font Mono:size=12", "mononoki Nerd Font:size=12"};
static const char dmenufont[] = {"mononoki Nerd Font:size=12"};
static const char col_gray1[] = "#1d2021";
@ -14,22 +17,25 @@ static const char col_gray4[] = "#fbf1c7";
static const char col_cyan[] = "#cc241d";
static const unsigned int baralpha = 0xd0;
static const unsigned int borderalpha = OPAQUE;
static const char *colors[][3] = {
/* fg bg border */
// FB BG BORDER
[SchemeNorm] = {col_gray3, col_gray1, col_gray2},
[SchemeSel] = {col_gray4, col_cyan, col_cyan},
};
static const unsigned int alphas[][3] = {
/* fg bg border*/
// FB BG BORDER
[SchemeNorm] = {OPAQUE, baralpha, borderalpha},
[SchemeSel] = {OPAQUE, baralpha, borderalpha},
};
/* scratchpads */
// Scratchpads
typedef struct {
const char *name;
const void *cmd;
} Sp;
const char *spcmd1[] = {"st", "-n", "sptrm", "-g", "140x35", NULL};
const char *spcmd2[] = {"st", "-n", "sptop", "-g", "140x35", "-e", "btop", NULL};
const char *spcmd3[] = {"st", "-n", "spfli", "-g", "140x35", "-e", "flix-cli", NULL};
@ -43,8 +49,9 @@ const char *spcmd10[] = {"st", "-n", "spytm", "-g", "140x35", "-e", "ytfzf", "-m
const char *spcmd11[] = {"st", "-n", "sprss", "-g", "140x35", "-e", "newsboat", NULL};
const char *spcmd12[] = {"st", "-n", "spgkk", "-g", "140x35", "-e", "geek-life", NULL};
const char *spcmd13[] = {"st", "-n", "sptut", "-g", "140x35", "-e", "tut", NULL};
static Sp scratchpads[] = {
/* name cmd */
// NAME CMD
{"sptrm", spcmd1},
{"sptop", spcmd2},
{"spfli", spcmd3},
@ -60,7 +67,7 @@ static Sp scratchpads[] = {
{"sptut", spcmd13},
};
/* tagging */
// Tags
static const char *tags[] = {
"", // EDITOR
"󰙨", // TESTING
@ -73,13 +80,13 @@ static const char *tags[] = {
"󰊖" // GAMES
};
// rules
// Rules
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
// class instance title tags mask isfloating monitor
// CLASS INSTANCE TITLE TAGS MASK ISFLOATING MONITOR
// no workspace
{"Galculator", NULL, NULL, 0, 1, -1},
// code tag
@ -155,22 +162,21 @@ static const Rule rules[] = {
{NULL, "sptut", NULL, SPTAG(12), 1, -1},
};
// layout(s)
static const float mfact = 0.5; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
// Layout(s)
static const float mfact = 0.5; // factor of master area size [0.05..0.95]
static const int nmaster = 1; // number of clients in master area
static const int resizehints = 1; // 1 means respect size hints in tiled resizals
static const int lockfullscreen = 1; // 1 will force focus on the fullscreen window
#include "tcl.c"
static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
// SYMBOL ARRANGE FUNCTION
{"[]=", tile}, // first entry is default
{"><>", NULL}, // no layout function means floating behavior
{"[M]", monocle},
{"|||", tcl},
};
// key definitions
// Key definitions
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{MODKEY, KEY, view, {.ui = 1 << TAG}}, \
@ -178,21 +184,18 @@ static const Layout layouts[] = {
{MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \
{MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG}},
// helper for spawning shell commands in the pre dwm-5.0 fashion
// Helper for spawning shell commands in the pre dwm-5.0 fashion
#define SHCMD(cmd) {.v = (const char*[]){ "/bin/sh", "-c", cmd, NULL}}
/* commands */
// Commands
// dmenu
static const char *dmenucmd[] = {"dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL};
// terminal
static const char *termcmd[] = {"st", NULL};
#include "movestack.c"
static const Key keys[] = {
/* modifier key function argument */
/* main apps*/
// MODIFIER KEY FUNCTION ARGUMENT
// main apps
// terminal
{MODKEY, XK_Return, spawn, {.v = termcmd}},
// text editor
@ -200,15 +203,15 @@ static const Key keys[] = {
// web browser
{MODKEY, XK_w, spawn, SHCMD("qutebrowser")},
// chat
{ MODKEY, XK_s, spawn, SHCMD("signal-desktop")},
{MODKEY, XK_s, spawn, SHCMD("org.signal.Signal")},
/* keyboard layout */
// keyboard layout
// set keyboard layout to es
{MODKEY|ControlMask, XK_e, spawn, SHCMD("setxkbmap -layout es && pkill -RTMIN+10 dwmblocks")},
// set keyboard layout to us
{MODKEY|ControlMask, XK_u, spawn, SHCMD("setxkbmap -layout us && pkill -RTMIN+10 dwmblocks")},
/* XF86 Keys */
// XF86 Keys
// increase volume
{0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer -i 5 && pkill -RTMIN+10 dwmblocks")},
// decrease volume
@ -236,7 +239,7 @@ static const Key keys[] = {
// news
{0, XF86XK_News, spawn, SHCMD("st -n newsboat -c newsboat -e newsboat")},
/* dmenu */
// dmenu
// launcher
{MODKEY|ShiftMask, XK_r, spawn, {.v = dmenucmd}},
// desktop launcher
@ -254,7 +257,7 @@ static const Key keys[] = {
// power manager
{MODKEY|ShiftMask, XK_q, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_power")},
/* window management */
// window management
// window focusing
{MODKEY, XK_j, focusstack, {.i = +1}},
{MODKEY, XK_k, focusstack, {.i = -1}},
@ -295,7 +298,7 @@ static const Key keys[] = {
{MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1}},
{MODKEY|ShiftMask, XK_period, tagmon, {.i = +1}},
/* tags */
// tags
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
@ -306,7 +309,7 @@ static const Key keys[] = {
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
/* scratchpads */
// scratchpads
{MODKEY|Mod1Mask, XK_Return, togglescratch, {.ui = 0 }},
{MODKEY|Mod1Mask, XK_b, togglescratch, {.ui = 1 }},
{MODKEY|Mod1Mask, XK_f, togglescratch, {.ui = 2 }},
@ -321,7 +324,7 @@ static const Key keys[] = {
{MODKEY|Mod1Mask, XK_g, togglescratch, {.ui = 11 }},
{MODKEY|Mod1Mask, XK_t, togglescratch, {.ui = 12 }},
/* misc */
// misc
// logout
//{ MODKEY|ShiftMask, XK_q, quit, {0} },
// toogle the bar
@ -330,8 +333,8 @@ static const Key keys[] = {
{MODKEY|ControlMask, XK_r, quit, {1}},
};
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
// button definitions
// click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin
// mouse bindings
static const Button buttons[] = {
/* click event mask button function argument */
@ -347,4 +350,3 @@ static const Button buttons[] = {
{ClkTagBar, MODKEY, Button1, tag, {0}},
{ClkTagBar, MODKEY, Button3, toggletag, {0}},
};

View file

@ -5,7 +5,7 @@
# If you want you can set this to $EDITOR to use your environment variable or
# vim if you want to specify the program directly.
# default="TUT_USE_INTERNAL"
editor="emacsclient -t -a ''"
editor="~/.local/bin/lvim"
# You need to press yes in a confirmation dialog before favoriting, boosting,
# etc.

View file

@ -5,11 +5,11 @@
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/Temporal/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Temporal/Downloads"
XDG_TEMPLATES_DIR="$HOME/Temporal/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Temporal/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Media/Music"
XDG_PICTURES_DIR="$HOME/Media/Pictures"
XDG_VIDEOS_DIR="$HOME/Media/Videos"
XDG_DESKTOP_DIR="$HOME/var/desktop"
XDG_DOWNLOAD_DIR="$HOME/var/downloads"
XDG_TEMPLATES_DIR="$HOME/media/documents/templates"
XDG_PUBLICSHARE_DIR="$HOME/var/public"
XDG_DOCUMENTS_DIR="$HOME/media/documents"
XDG_MUSIC_DIR="$HOME/media/music"
XDG_PICTURES_DIR="$HOME/media/pictures"
XDG_VIDEOS_DIR="$HOME/media/videos"

View file

@ -13,7 +13,7 @@
" Since emacs is a GUI app and not a terminal app like vim, append the command
" with an ampersand (&).
set vicmd=nvim
set vicmd=~/.local/bin/lvim
" This makes vifm perform file operations on its own instead of relying on
" standard utilities like `cp`. While using `cp` and alike is a more universal

2
user/.local/bin/neovide Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
neovide --neovim-bin "$HOME/.local/bin/lvim"

View file

@ -28,16 +28,26 @@ if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
if xinput --list | grep -q "Elan TrackPoint"; then
xinput set-prop "TPPS/2 Elan TrackPoint" "libinput Accel Speed" 1
fi
# environment variables
export MOZ_USE_XINPUT2=1
export QT_STYLE_OVERRIDE=kvantum
export MEDIA_DIR="$HOME/Media"
export TEMP_DIR="$HOME/Temporal"
# clean home
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DESKTOP_DIR="$HOME/var/desktop"
export XDG_DOWNLOAD_DIR="$HOME/var/downloads"
export XDG_TEMPLATES_DIR="$HOME/media/documents/templates"
export XDG_PUBLICSHARE_DIR="$HOME/var/public"
export XDG_DOCUMENTS_DIR="$HOME/media/documents"
export XDG_MUSIC_DIR="$HOME/media/music"
export XDG_PICTURES_DIR="$HOME/media/pictures"
export XDG_VIDEOS_DIR="$HOME/media/videos"
export W3M_DIR="$XDG_DATA_HOME/w3m"
export GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc-2.0"
export WGETRC="$HOME/.config/wget/wgetrc"
@ -52,4 +62,4 @@ export BROWSER="qutebrowser"
export VIEWER="zathura"
# start window manager / desktop environment
exec dwm
dbus-launch dwm