aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dot_Xmodmap8
-rw-r--r--dot_bash_profile5
-rw-r--r--dot_bashrc87
-rw-r--r--dot_config/i3/config631
-rw-r--r--dot_config/i3/i3blocks.conf182
-rw-r--r--dot_config/i3/keybindings106
-rw-r--r--dot_config/i3/scripts/executable_bandwidth2105
-rw-r--r--dot_config/i3/scripts/executable_battery-pinebook-pro18
-rw-r--r--dot_config/i3/scripts/executable_battery1114
-rw-r--r--dot_config/i3/scripts/executable_battery2106
-rw-r--r--dot_config/i3/scripts/executable_blur-lock11
-rw-r--r--dot_config/i3/scripts/executable_cpu_usage62
-rw-r--r--dot_config/i3/scripts/executable_disk48
-rw-r--r--dot_config/i3/scripts/executable_keyboard-layout5
-rw-r--r--dot_config/i3/scripts/executable_keyhint25
-rw-r--r--dot_config/i3/scripts/executable_keyhint-26
-rw-r--r--dot_config/i3/scripts/executable_literal_empty_workspace10
-rw-r--r--dot_config/i3/scripts/executable_memory69
-rw-r--r--dot_config/i3/scripts/executable_openweather93
-rw-r--r--dot_config/i3/scripts/executable_openweather-city43
-rw-r--r--dot_config/i3/scripts/executable_openweather.conf5
-rw-r--r--dot_config/i3/scripts/executable_power-profiles190
-rw-r--r--dot_config/i3/scripts/executable_powermenu186
-rw-r--r--dot_config/i3/scripts/executable_ppd-status11
-rw-r--r--dot_config/i3/scripts/executable_temperature86
-rw-r--r--dot_config/i3/scripts/executable_volume93
-rw-r--r--dot_config/i3/scripts/executable_vpn25
-rw-r--r--dot_config/i3/scripts/executable_worldclock122
-rw-r--r--dot_config/picom.conf230
-rw-r--r--dot_config/rofi/arc_dark_colors.rasi34
-rw-r--r--dot_config/rofi/arc_dark_transparent_colors.rasi34
-rw-r--r--dot_config/rofi/power-profiles.rasi121
-rw-r--r--dot_config/rofi/powermenu.rasi120
-rw-r--r--dot_config/rofi/rofidmenu.rasi135
-rw-r--r--dot_config/rofi/rofikeyhint.rasi137
-rw-r--r--dot_config/rofi/worldclock.rasi120
-rw-r--r--dot_config/xfce4/terminal/terminalrc44
-rw-r--r--dot_fzf.zsh14
-rw-r--r--dot_gitconfig3
-rw-r--r--dot_nanorc2
-rw-r--r--dot_profile9
-rw-r--r--dot_screenlayout/private_executable_monitor.sh2
-rw-r--r--dot_spacemacs570
-rw-r--r--dot_zshrc140
-rw-r--r--executable_dot_Xresources4
45 files changed, 4171 insertions, 0 deletions
diff --git a/dot_Xmodmap b/dot_Xmodmap
new file mode 100644
index 0000000..a554667
--- /dev/null
+++ b/dot_Xmodmap
@@ -0,0 +1,8 @@
1remove Lock = Caps_Lock
2remove Control = Control_L
3remove Lock = Control_L
4remove Control = Caps_Lock
5keysym Control_L = Caps_Lock
6keysym Caps_Lock = Control_L
7add Lock = Caps_Lock
8add Control = Control_L
diff --git a/dot_bash_profile b/dot_bash_profile
new file mode 100644
index 0000000..5545f00
--- /dev/null
+++ b/dot_bash_profile
@@ -0,0 +1,5 @@
1#
2# ~/.bash_profile
3#
4
5[[ -f ~/.bashrc ]] && . ~/.bashrc
diff --git a/dot_bashrc b/dot_bashrc
new file mode 100644
index 0000000..8f8e639
--- /dev/null
+++ b/dot_bashrc
@@ -0,0 +1,87 @@
1#
2# ~/.bashrc
3#
4
5# If not running interactively, don't do anything
6[[ $- != *i* ]] && return
7
8[[ -f ~/.welcome_screen ]] && . ~/.welcome_screen
9
10_set_liveuser_PS1() {
11 PS1='[\u@\h \W]\$ '
12 if [ "$(whoami)" = "liveuser" ] ; then
13 local iso_version="$(grep ^VERSION= /usr/lib/endeavouros-release 2>/dev/null | cut -d '=' -f 2)"
14 if [ -n "$iso_version" ] ; then
15 local prefix="eos-"
16 local iso_info="$prefix$iso_version"
17 PS1="[\u@$iso_info \W]\$ "
18 fi
19 fi
20}
21_set_liveuser_PS1
22unset -f _set_liveuser_PS1
23
24ShowInstallerIsoInfo() {
25 local file=/usr/lib/endeavouros-release
26 if [ -r $file ] ; then
27 cat $file
28 else
29 echo "Sorry, installer ISO info is not available." >&2
30 fi
31}
32
33
34alias ls='ls --color=auto'
35alias ll='ls -lav --ignore=..' # show long listing of all except ".."
36alias l='ls -lav --ignore=.?*' # show long listing but no hidden dotfiles except "."
37
38[[ "$(whoami)" = "root" ]] && return
39
40[[ -z "$FUNCNEST" ]] && export FUNCNEST=100 # limits recursive functions, see 'man bash'
41
42## Use the up and down arrow keys for finding a command in history
43## (you can write some initial letters of the command first).
44bind '"\e[A":history-search-backward'
45bind '"\e[B":history-search-forward'
46
47################################################################################
48## Some generally useful functions.
49## Consider uncommenting aliases below to start using these functions.
50##
51## October 2021: removed many obsolete functions. If you still need them, please look at
52## https://github.com/EndeavourOS-archive/EndeavourOS-archiso/raw/master/airootfs/etc/skel/.bashrc
53
54_open_files_for_editing() {
55 # Open any given document file(s) for editing (or just viewing).
56 # Note1:
57 # - Do not use for executable files!
58 # Note2:
59 # - Uses 'mime' bindings, so you may need to use
60 # e.g. a file manager to make proper file bindings.
61
62 if [ -x /usr/bin/exo-open ] ; then
63 echo "exo-open $@" >&2
64 setsid exo-open "$@" >& /dev/null
65 return
66 fi
67 if [ -x /usr/bin/xdg-open ] ; then
68 for file in "$@" ; do
69 echo "xdg-open $file" >&2
70 setsid xdg-open "$file" >& /dev/null
71 done
72 return
73 fi
74
75 echo "$FUNCNAME: package 'xdg-utils' or 'exo' is required." >&2
76}
77
78#------------------------------------------------------------
79
80## Aliases for the functions above.
81## Uncomment an alias if you want to use it.
82##
83
84# alias ef='_open_files_for_editing' # 'ef' opens given file(s) for editing
85# alias pacdiff=eos-pacdiff
86################################################################################
87
diff --git a/dot_config/i3/config b/dot_config/i3/config
new file mode 100644
index 0000000..bb07f08
--- /dev/null
+++ b/dot_config/i3/config
@@ -0,0 +1,631 @@
1# This file is a modified version based on default i3-config-wizard config
2# source is available here:
3# https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/master/.config/i3/config
4# Maintainer: joekamprad [[email protected]]
5# https://endeavouros.com
6#
7# iconic font icon search: https://fontawesome.com/v4.7/cheatsheet/
8#
9# --> to update this run the following command (will backup existing setup file)
10# wget --backups=1 https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/.config/i3/config -P ~/.config/i3/
11#
12# Endeavouros-i3 config file
13# Source for complete framework of our i3 config and theming here: https://github.com/endeavouros-team/endeavouros-i3wm-setup
14# EndeavourOS wiki holds some Information also: https://discovery.endeavouros.com/window-tiling-managers/i3-wm/
15# Please see http://i3wm.org/docs/userguide.html for the official i3 reference!
16
17#######################
18# config starts here: #
19#######################
20
21# Font for window titles. Will also be used by the bar unless a different font
22# is used in the bar {} block below.
23# This font is widely installed, provides lots of unicode glyphs, right-to-left
24# text rendering and scalability on retina/hidpi displays (thanks to pango).
25font pango: Noto Sans Regular 11
26
27# set the mod key to the winkey:
28set $mod Mod4
29
30#####################
31# workspace layout: #
32#####################
33
34# default i3 tiling mode:
35workspace_layout default
36
37# i3 stacking layout:
38# Each window will be fullscreen and tabbed top to bottom.
39workspace_layout tabbed
40#workspace_layout stacking
41
42# i3 tabbed layout:
43# Each new window will open fullscreen as a tab (left to right)
44#workspace_layout tabbed
45
46##############################
47# extra options for windows: #
48##############################
49
50#border indicator on windows:
51#new_window pixel 1
52
53# thin borders
54# hide_edge_borders both
55
56# Set inner/outer gaps
57#gaps inner 0
58#gaps outer 0
59
60# show window title bars (not officially supported with i3gaps)
61#default_border normal
62
63# window title alignment
64#title_align center
65
66# Use Mouse+$mod to drag floating windows to their wanted position
67floating_modifier $mod
68
69# switch/iterate between workspaces
70bindsym $mod+Tab workspace next
71bindsym $mod+Shift+Tab workspace prev
72
73# switch to workspace
74bindsym $mod+1 workspace $ws1
75bindsym $mod+2 workspace $ws2
76bindsym $mod+3 workspace $ws3
77bindsym $mod+4 workspace $ws4
78bindsym $mod+5 workspace $ws5
79bindsym $mod+6 workspace $ws6
80bindsym $mod+7 workspace $ws7
81bindsym $mod+8 workspace $ws8
82bindsym $mod+9 workspace $ws9
83bindsym $mod+0 workspace $ws10
84
85# switch to workspace with numpad keys
86bindcode $mod+87 workspace 1
87bindcode $mod+88 workspace 2
88bindcode $mod+89 workspace 3
89bindcode $mod+83 workspace 4
90bindcode $mod+84 workspace 5
91bindcode $mod+85 workspace 6
92bindcode $mod+79 workspace 7
93bindcode $mod+80 workspace 8
94bindcode $mod+81 workspace 9
95bindcode $mod+90 workspace 10
96
97# switch to workspace with numlock numpad keys
98bindcode $mod+Mod2+87 workspace $ws1
99bindcode $mod+Mod2+88 workspace $ws2
100bindcode $mod+Mod2+89 workspace $ws3
101bindcode $mod+Mod2+83 workspace $ws4
102bindcode $mod+Mod2+84 workspace $ws5
103bindcode $mod+Mod2+85 workspace $ws6
104bindcode $mod+Mod2+79 workspace $ws7
105bindcode $mod+Mod2+80 workspace $ws8
106bindcode $mod+Mod2+81 workspace $ws9
107bindcode $mod+Mod2+90 workspace $ws10
108
109# move focused container to workspace
110bindsym $mod+Shift+1 move container to workspace $ws1
111bindsym $mod+Shift+2 move container to workspace $ws2
112bindsym $mod+Shift+3 move container to workspace $ws3
113bindsym $mod+Shift+4 move container to workspace $ws4
114bindsym $mod+Shift+5 move container to workspace $ws5
115bindsym $mod+Shift+6 move container to workspace $ws6
116bindsym $mod+Shift+7 move container to workspace $ws7
117bindsym $mod+Shift+8 move container to workspace $ws8
118bindsym $mod+Shift+9 move container to workspace $ws9
119bindsym $mod+Shift+0 move container to workspace $ws10
120
121# move focused container to workspace with numpad keys
122bindcode $mod+Shift+Mod2+87 move container to workspace $ws1
123bindcode $mod+Shift+Mod2+88 move container to workspace $ws2
124bindcode $mod+Shift+Mod2+89 move container to workspace $ws3
125bindcode $mod+Shift+Mod2+83 move container to workspace $ws4
126bindcode $mod+Shift+Mod2+84 move container to workspace $ws5
127bindcode $mod+Shift+Mod2+85 move container to workspace $ws6
128bindcode $mod+Shift+Mod2+79 move container to workspace $ws7
129bindcode $mod+Shift+Mod2+80 move container to workspace $ws8
130bindcode $mod+Shift+Mod2+81 move container to workspace $ws9
131bindcode $mod+Shift+Mod2+90 move container to workspace $ws10
132
133# move focused container to workspace with numpad keys
134bindcode $mod+Shift+87 move container to workspace $ws1
135bindcode $mod+Shift+88 move container to workspace $ws2
136bindcode $mod+Shift+89 move container to workspace $ws3
137bindcode $mod+Shift+83 move container to workspace $ws4
138bindcode $mod+Shift+84 move container to workspace $ws5
139bindcode $mod+Shift+85 move container to workspace $ws6
140bindcode $mod+Shift+79 move container to workspace $ws7
141bindcode $mod+Shift+80 move container to workspace $ws8
142bindcode $mod+Shift+81 move container to workspace $ws9
143bindcode $mod+Shift+90 move container to workspace $ws10
144
145# resize window (you can also use the mouse for that):
146mode "resize" {
147 bindsym h resize shrink width 10 px or 10 ppt
148 bindsym k resize grow height 10 px or 10 ppt
149 bindsym j resize shrink height 10 px or 10 ppt
150 bindsym l resize grow width 10 px or 10 ppt
151
152 # same bindings, but for the arrow keys
153 bindsym Left resize shrink width 10 px or 10 ppt
154 bindsym Up resize grow height 10 px or 10 ppt
155 bindsym Down resize shrink height 10 px or 10 ppt
156 bindsym Right resize grow width 10 px or 10 ppt
157
158 # back to normal: Enter or Escape
159 # bindsym Return mode "default"
160 bindsym Escape mode "default"
161}
162
163bindsym $mod+r mode "resize"
164bindsym $mod+space [floating] resize set 1280 800
165
166######################################
167# keybindings for different actions: #
168######################################
169
170# start a terminal
171bindsym $mod+Return exec xfce4-terminal
172
173# kill focused window
174bindsym $mod+q kill
175
176# exit-menu
177bindsym $mod+Shift+e exec ~/.config/i3/scripts/powermenu
178
179# Lock the system
180# lock with a picture:
181#bindsym $mod+l exec i3lock -i ~/.config/i3/i3-lock-screen.png -p default|win -t
182# lock by blurring the screen:
183bindsym $mod+l exec ~/.config/i3/scripts/blur-lock
184
185# reload the configuration file
186bindsym $mod+Shift+c reload
187
188# restart i3 inplace (preserves your layout/session, can be used to update i3)
189bindsym $mod+Shift+r restart
190
191# keybinding in fancy rofi (automated):
192bindsym F1 exec ~/.config/i3/scripts/keyhint-2
193# alternative
194# keybinding list in editor:
195# bindsym $mod+F1 exec xed ~/.config/i3/keybindings
196
197# Backlight control
198bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight +5 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"
199bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -5 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"
200
201# change focus
202bindsym $mod+j focus left
203bindsym $mod+k focus down
204bindsym $mod+b focus up
205bindsym $mod+o focus right
206
207# alternatively, you can use the cursor keys:
208bindsym $mod+Left focus left
209bindsym $mod+Down focus down
210bindsym $mod+Up focus up
211bindsym $mod+Right focus right
212
213# move focused window
214bindsym $mod+Shift+j move left
215bindsym $mod+Shift+k move down
216bindsym $mod+Shift+b move up
217bindsym $mod+Shift+o move right
218
219# alternatively, you can use the cursor keys:
220bindsym $mod+Shift+Left move left
221bindsym $mod+Shift+Down move down
222bindsym $mod+Shift+Up move up
223bindsym $mod+Shift+Right move right
224
225# split in horizontal orientation
226bindsym $mod+h split h
227
228# split in vertical orientation
229bindsym $mod+v split v
230
231# enter fullscreen mode for the focused container
232bindsym $mod+f fullscreen toggle
233
234# change container layout (stacked, tabbed, toggle split)
235bindsym $mod+s layout stacking
236bindsym $mod+g layout tabbed
237bindsym $mod+e layout toggle split
238
239# toggle tiling / floating
240bindsym $mod+Shift+space floating toggle
241
242# change focus between tiling / floating windows
243#bindsym $mod+space focus mode_toggle
244
245# focus the parent container
246bindsym $mod+a focus parent
247
248# open new empty workspace
249bindsym $mod+Shift+n exec --no-startup-id ~/.config/i3/scripts/empty_workspace
250
251# Multimedia Keys
252
253# volume
254bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
255bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
256
257# gradular volume control
258bindsym $mod+XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 1%+ && pkill -RTMIN+1 i3blocks
259bindsym $mod+XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 1%- && pkill -RTMIN+1 i3blocks
260
261# mute
262bindsym XF86AudioMute exec --no-startup-id amixer sset Master toggle && killall -USR1 i3blocks
263
264# audio control
265bindsym XF86AudioPlay exec --no-startup-id playerctl play
266bindsym XF86AudioPause exec --no-startup-id playerctl pause
267bindsym XF86AudioNext exec --no-startup-id playerctl next
268bindsym XF86AudioPrev exec --no-startup-id playerctl previous
269
270# Redirect sound to headphones
271#bindsym $mod+p exec /usr/local/bin/switch-audio-port
272
273## App shortcuts
274bindsym $mod+w exec /usr/bin/firefox
275bindsym $mod+n exec /usr/bin/thunar
276bindsym Print exec --no-startup-id mkdir -p ~/Pictures/Screenshot/`date +"%Y/%m"` && scrot ~/Pictures/Screenshot/%Y/%m/%Y-%m-%d-%T-screenshot.png && notify-send "Screenshot saved"
277
278# Power Profiles menu switcher (rofi)
279bindsym $mod+Shift+p exec --no-startup-id ~/.config/i3/scripts/power-profiles
280
281##########################################
282# configuration for workspace behaviour: #
283##########################################
284
285# Define names for default workspaces for which we configure key bindings later on.
286# We use variables to avoid repeating the names in multiple places.
287set $ws1 "1:"
288set $ws2 "2:"
289set $ws3 "3:"
290set $ws4 "4:"
291set $ws5 "5:"
292set $ws6 "6"
293set $ws7 "7"
294set $ws8 "8"
295set $ws9 "9"
296set $ws10 "10"
297
298# use workspaces on different displays:
299# where you have to replace VGA-0/HDMI-0 with the names for your displays
300# you can get from xrandr command
301#workspace $ws1 output VGA-0
302#workspace $ws2 output VGA-0
303#workspace $ws3 output HDMI-0
304#workspace $ws4 output HDMI-0
305#workspace $ws5 output HDMI-0
306
307# bind program to workspace and focus to them on startup:
308#assign [class="Xfce4-terminal"] $ws1
309assign [class="jetbrains-clion"] $ws1
310assign [class="Thunar"] $ws3
311assign [class="thunderbird"] $ws4
312assign [class="TelegramDesktop"] $ws5
313assign [class="discord"] $ws5
314assign [class="Microsoft Teams - Preview"] $ws5
315
316# automatic set focus new window if it opens on another workspace then the current:
317for_window [class=Xfce4-terminal] focus
318for_window [class=(?i)firefox] focus
319for_window [class=Thunar] focus
320for_window [class=thunderbird] focus
321for_window [class=TelegramDesktop] focus
322for_window [class="Microsoft Teams - Preview"] focus
323
324##############
325# compositor #
326##############
327
328# transparency
329# uncomment one of them to be used (picom package is installed per default)
330# options could need changes, related to used GPU and drivers.
331# to find the right setting consult the archwiki or ask at the forum.
332#
333# xcompmgr: https://wiki.archlinux.org/title/Xcompmgr
334# manpage: https://man.archlinux.org/man/xcompmgr.1.en
335#exec --no-startup-id xcompmgr -C -n &
336# or an more specialized config like this:
337#exec --no-startup-id xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55 &
338#
339# or:
340#
341# picom: https://wiki.archlinux.org/title/Picom
342# manpage: https://man.archlinux.org/man/picom.1.en
343# The default configuration is available in /etc/xdg/picom.conf
344# For modifications, it can be copied to ~/.config/picom/picom.conf or ~/.config/picom.conf
345#
346# using default config
347#exec_always --no-startup-id picom --backed glx --vsync
348#exec_always --no-startup-id picom -b
349#
350# for custom config:
351exec_always --no-startup-id picom --config ~/.config/picom.conf
352
353#############################################
354# autostart applications/services on login: #
355#############################################
356
357#get auth work with polkit-gnome
358exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
359
360#ibus daemon
361exec --no-startup-id env GDK_SCALE=1 ibus-daemon -drxR
362
363#fcitx5 daemon
364#exec --no-startup-id fcitx5 -d
365
366# dex execute .desktop files + apps using /etc/xdg/autostart.
367# when second to i3 a DE is installed or mixed usage of i3 + xfce4 or GNOME
368# in this cases better disable dex and use manual starting apps using xdg/autostart
369# if enabled you should comment welcome app.
370# https://github.com/jceb/dex
371#exec --no-startup-id dex -a -s /etc/xdg/autostart/:~/.config/autostart/
372exec --no-startup-id dex --autostart --environment i3
373
374# start welcome app
375#exec --no-startup-id sh /usr/share/endeavouros/scripts/welcome --startdelay=3
376
377# num lock activated
378#exec --no-startup-id numlockx on
379
380# configure multiple keyboard layouts and hotkey to switch (Alt+CAPSLOCK in this example)
381#exec --no-startup-id setxkbmap -layout 'us,sk' -variant altgr-intl,qwerty -option 'grp:alt_caps_toggle'
382
383# start conky:
384#exec_always --no-startup-id conky
385
386# start a script to setup displays
387# uncomment the next line, use arandr to setup displays and save the file as monitor:
388exec --no-startup-id ~/.screenlayout/monitor.sh
389
390# set wallpaper
391exec --no-startup-id sleep 2 && nitrogen --restore
392#exec --no-startup-id feh --bg-fill /usr/share/endeavouros/backgrounds/endeavouros_i3.png
393
394# set powersavings for display:
395#exec --no-startup-id xset s 0 dpms 600 600 600
396
397# disable power saving (for example if using xscreensaver)
398exec --no-startup-id xset -dpms
399
400# use xautolock to use autosuspend rules for mobile devices
401# https://wiki.archlinux.org/title/Session_lock#xautolock
402#exec --no-startup-id xautolock -time 60 -locker "systemctl suspend"
403
404
405# xscreensaver
406# https://www.jwz.org/xscreensaver
407#exec --no-startup-id xscreensaver --no-splash
408
409# Desktop notifications
410exec --no-startup-id dunst --config ~/.config/dunst/dunstrc
411# alternative if you installed aside with XFCE4:
412#exec --no-startup-id env GDK_SCALE=2 /usr/lib/xfce4/notifyd/xfce4-notifyd &
413
414# autotiling script
415# https://github.com/nwg-piotr/autotiling
416# `yay -S autotiling ;) (it is in AUR)
417#exec_always --no-startup-id autotiling
418
419# Autostart apps as you like
420#exec --no-startup-id sleep 2 && xfce4-terminal
421#exec --no-startup-id sleep 7 && firefox https://github.com/endeavouros-team/endeavouros-i3wm-setup/blob/main/force-knowledge.md
422#exec --no-startup-id sleep 3 && thunar
423exec --no-startup-id sleep 1 && thunderbird
424
425###############
426# system tray #
427###############
428# if you do not use dex: exec --no-startup-id dex --autostart --environment i3
429# you need to have tray apps started manually one by one:
430
431# start blueberry app for managing bluetooth devices from tray:
432#exec --no-startup-id blueberry-tray
433
434# networkmanager-applet
435#exec --no-startup-id nm-applet
436
437# clipman-applet
438#exec --no-startup-id xfce4-clipman
439
440##################
441# floating rules #
442##################
443
444# set floating (nontiling) for apps needing it
445for_window [class="Yad" instance="yad"] floating enable
446for_window [class="Galculator" instance="galculator"] floating enable
447for_window [class="Blueberry.py" instance="blueberry.py"] floating enable
448
449# set floating (nontiling) for special apps
450for_window [class="Xsane" instance="xsane"] floating enable
451for_window [class="Pavucontrol" instance="pavucontrol"] floating enable
452for_window [class="qt5ct" instance="qt5ct"] floating enable
453for_window [class="Blueberry.py" instance="blueberry.py"] floating enable
454for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable
455for_window [class="Pamac-manager"] floating enable
456for_window [window_role="About"] floating enable
457for_window [class="copyq"] floating enable
458for_window [class="Nm-connection-editor"] floating enable
459for_window [class="flameshot"] floating enable
460for_window [class="TelegramDesktop"] floating enable resize set 1300 1200
461for_window [class="eudic"] floating enable resize set 800 800
462
463# Make the currently focused window a scratchpad
464bindsym $mod+Shift+m move scratchpad
465
466# Show the first scratchpad window
467bindsym $mod+m scratchpad show
468
469# set border of floating window
470for_window [class="urxvt"] border pixel 1
471
472# set size of floating window
473#for_window [window_role="(?i)GtkFileChooserDialog"] resize set 640 480 #to set size of file choose dialog
474#for_window [class=".*"] resize set 1280 680 #to change size of all floating windows
475
476# set position of floating window
477for_window [class=".*"] move position center
478
479######################################
480# color settings for bar and windows #
481######################################
482
483# Define colors variables:
484set $darkbluetrans #08052be6
485set $darkblue #08052b
486set $lightblue #5294e2
487set $urgentred #e53935
488set $white #ffffff
489set $black #000000
490set $purple #e345ff
491set $darkgrey #383c4a
492set $grey #b0b5bd
493set $mediumgrey #8b8b8b
494set $yellowbrown #e1b700
495
496# define colors for windows:
497#class border bground text indicator child_border
498client.focused $lightblue $darkblue $white $mediumgrey $mediumgrey
499client.unfocused $darkblue $darkblue $grey $darkgrey $darkgrey
500client.focused_inactive $darkblue $darkblue $grey $black $black
501client.urgent $urgentred $urgentred $white $yellowbrown $yellowbrown
502
503############################################
504# bar settings (input comes from i3blocks) #
505############################################
506
507# Start i3bar to display a workspace bar
508# (plus the system information i3status finds out, if available)
509bar {
510 font pango: Noto Sans Regular 16
511 status_command i3blocks -c ~/.config/i3/i3blocks.conf
512 position bottom
513 output eDP-1
514 i3bar_command i3bar
515 #i3bar_command i3bar --transparency
516 #tray_output none
517 tray_output primary
518 tray_padding 0
519 strip_workspace_numbers no
520
521 colors {
522 separator $purple
523 background $darkgrey
524 statusline $white
525 focused_workspace $mediumgrey $grey $darkgrey $purple
526 active_workspace $lightblue $mediumgrey $darkgrey $purple
527 inactive_workspace $darkgrey $darkgrey $grey $purple
528 urgent_workspace $urgentred $urgentred $white $purple
529 }
530}
531
532
533bar {
534 font pango: Noto Sans Regular 11
535 status_command i3blocks -c ~/.config/i3/i3blocks.conf
536 position bottom
537 i3bar_command i3bar
538 output DP-3
539 tray_output primary
540 tray_padding 0
541 strip_workspace_numbers no
542
543 colors {
544 separator $purple
545 background $darkgrey
546 statusline $white
547 focused_workspace $mediumgrey $grey $darkgrey $purple
548 active_workspace $lightblue $mediumgrey $darkgrey $purple
549 inactive_workspace $darkgrey $darkgrey $grey $purple
550 urgent_workspace $urgentred $urgentred $white $purple
551 }
552}
553
554
555bar {
556 font pango: Noto Sans Regular 11
557 status_command i3blocks -c ~/.config/i3/i3blocks.conf
558 position bottom
559 i3bar_command i3bar
560 output DP-4
561 tray_output primary
562 tray_padding 0
563 strip_workspace_numbers no
564
565 colors {
566 separator $purple
567 background $darkgrey
568 statusline $white
569 focused_workspace $mediumgrey $grey $darkgrey $purple
570 active_workspace $lightblue $mediumgrey $darkgrey $purple
571 inactive_workspace $darkgrey $darkgrey $grey $purple
572 urgent_workspace $urgentred $urgentred $white $purple
573 }
574}
575
576# you can add different bars for multidisplay setups on each display:
577# set output HDMI-0 to the display you want the bar, --transparency can be set.
578# Transparency needs rgba color codes to be used where the last two letters are the transparency factor see here:
579# https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4
580# #08052be6 --> e6=90%
581
582# bar {
583# font pango: Noto Sans Regular 10
584# status_command i3blocks -c ~/.config/i3/i3blocks-2.conf
585# i3bar_command i3bar --transparency
586# output HDMI-0
587# position bottom
588#
589# When strip_workspace_numbers is set to yes,
590# any workspace that has a name of the form
591# “[n][:][NAME]” will display only the name.
592#strip_workspace_numbers yes
593##strip_workspace_name no
594#
595# colors {
596# separator $purple
597# background $darkbluetrans
598# statusline $white
599# border bg txt indicator
600# focused_workspace $lighterblue $lighterblue $darkblue $purple
601# active_workspace $lightdblue $lightdblue $darkblue $purple
602# inactive_workspace $darkblue $darkblue $lightdblue $purple
603# urgent_workspace $urgentred $urgentred $white $purple
604# }
605#}
606
607#####################################
608# Application menu handled by rofi: #
609#####################################
610
611## rofi bindings fancy application menu ($mod+d /F9 optional disabled)
612
613bindsym $mod+d exec rofi -modi drun -show drun \
614 -config ~/.config/rofi/rofidmenu.rasi
615
616#bindsym F9 exec rofi -modi drun -show drun \
617# -config ~/.config/rofi/rofidmenu.rasi
618
619## rofi bindings for window menu ($mod+t /F10 optional disabled)
620
621bindsym $mod+t exec rofi -show window \
622 -config ~/.config/rofi/rofidmenu.rasi
623
624#bindsym F10 exec rofi -show window \
625# -config ~/.config/rofi/rofidmenu.rasi
626
627## rofi bindings to manage clipboard (install rofi-greenclip from the AUR)
628
629#exec --no-startup-id greenclip daemon>/dev/null
630#bindsym $mod+c exec --no-startup-id rofi -modi "clipboard:greenclip print" -show clipboard \
631# -config ~/.config/rofi/rofidmenu.rasi
diff --git a/dot_config/i3/i3blocks.conf b/dot_config/i3/i3blocks.conf
new file mode 100644
index 0000000..dd9f5ac
--- /dev/null
+++ b/dot_config/i3/i3blocks.conf
@@ -0,0 +1,182 @@
1# i3blocks config file changed for EndeavourOS-i3 setup
2
3# source is available here:
4# https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/.config/i3/i3blocks.conf
5# Maintainer: joekamprad [[email protected]]
6# Former Visual Designer: Florent Valetti [@FLVAL EndeavourOS]
7# created for i3wm setup on EndeavourOS
8# https://endeavouros.com
9
10# cheatsheet for icon fonts used on the block-bar:
11# https://fontawesome.com/v4.7/cheatsheet/
12
13# --> to update this run the following command:
14# wget --backups=1 https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/.config/i3/i3blocks.conf -P ~/.config/i3/
15
16# Please see man i3blocks for a complete reference!
17# The man page is also hosted at http://vivien.github.io/i3blocks
18
19
20# List of valid properties:
21#
22# align
23# color
24# command
25# full_text
26# instance
27# interval
28# label
29# min_width
30# name
31# separator
32# separator_block_width
33# short_text
34# signal
35# urgent
36
37# Global properties
38#
39# The top properties below are applied to every block, but can be overridden.
40separator=false
41markup=pango
42
43#[Weather]
44#command=~/.config/i3/scripts/openweather
45# or:
46#command=~/.config/i3/scripts/openweather-city
47#interval=1800
48#color=#7275b3
49
50#[terminal]
51#full_text= 
52#color=#807dfe
53#command=i3-msg -q exec xfce4-terminal
54
55#[browser]
56#full_text= 
57#color=#ff7f81
58#command=i3-msg -q exec firefox
59
60#[files]
61#full_text= 
62#color=#7f3fbf
63#command=i3-msg -q exec thunar ~/
64
65#[mail]
66#full_text= 
67#color=#dbcb75
68#command=i3-msg -q exec thunderbird
69
70#[simple-2]
71#full_text=: :
72#color=#717171
73
74# Disk usage
75#
76# The directory defaults to $HOME if the instance is not specified.
77# The script may be called with a optional argument to set the alert
78# (defaults to 10 for 10%).
79#[disk]
80#label=
81#instance=/home
82#command=~/.config/i3/scripts/disk
83#interval=30
84
85# Memory usage
86#
87# The type defaults to "mem" if the instance is not specified.
88#[memory]
89#label=
90#command=~/.config/i3/scripts/memory
91#interval=2
92
93#[cpu_usage]
94#label=
95#command=~/.config/i3/scripts/cpu_usage
96##min_width=CPU: 100.00%
97#interval=2
98
99[CPU-temperature]
100label=
101command=~/.config/i3/scripts/temperature
102interval=30
103#T_WARN=70
104#T_CRIT=90
105#SENSOR_CHIP=""
106# where SENSOR_CHIP can be find with sensors output
107# can be used also for GPU temperature or other temperature sensors lm-sensors detects.
108
109# showing name of connected network (enable for wifi use)
110[net]
111label=
112command=echo "$(LANG=C nmcli d | grep connected | awk '{print $4}' | head -n1)"
113interval=30
114
115[bandwidth]
116command=~/.config/i3/scripts/bandwidth2
117interval=persist
118
119# Battery indicator
120[battery]
121command=~/.config/i3/scripts/battery2
122# for alternative battery script change to battery1
123# change this to battery-pinebook-pro if you are running on pinebook-pro
124label=
125interval=30
126
127#[simple-2]
128#full_text=:
129#color=#717171
130
131[pavucontrol]
132full_text=
133command=pavucontrol
134
135[volume-pulseaudio]
136command=~/.config/i3/scripts/volume
137instance=Master
138interval=1
139
140# display keyboard layout name
141# for keyboard layouts switcher
142# see i3 config file
143# this needs xkblayout-state installed from the AUR:
144# https://aur.archlinux.org/packages/xkblayout-state-git
145#[keyboard-layout]
146#command=~/.config/i3/scripts/keyboard-layout
147#interval=2
148
149#[keybindings]
150#full_text=
151#command=~/.config/i3/scripts/keyhint
152
153# power-profiles-daemon implementation:
154# needs package power-profiles-daemon installed and the service running see here:
155# https://wiki.archlinux.org/title/CPU_frequency_scaling#power-profiles-daemon
156
157#set power-profile
158[ppd_menu]
159full_text=
160command=~/.config/i3/scripts/power-profiles
161color=#407437
162
163#Show the current power-profile
164#[ppd-status]
165#command=~/.config/i3/scripts/ppd-status
166#interval=5
167
168[time]
169command=date '+%a %b %d %H:%M'
170interval=1
171
172[worldclock]
173full_text=Clock
174command=~/.config/i3/scripts/worldclock
175
176[shutdown_menu]
177full_text=
178command=~/.config/i3/scripts/powermenu
179
180[simple-2]
181full_text=:
182color=#717171
diff --git a/dot_config/i3/keybindings b/dot_config/i3/keybindings
new file mode 100644
index 0000000..f5edbc6
--- /dev/null
+++ b/dot_config/i3/keybindings
@@ -0,0 +1,106 @@
1EndeavourOS i3wm Keybindings cheat sheet:
2
3--> to update this run the following command:
4wget --backups=1 https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/.config/i3/keybindings -P ~/.config/i3/
5
6All sources and updates are available at GitHub:
7https://github.com/endeavouros-team/endeavouros-i3wm-setup
8
9For reference consult our WIKI:
10https://discovery.endeavouros.com/window-tiling-managers/i3-wm/
11
12 = windows key
13
14# start xfce4-terminal
15+Return
16
17# kill focused window
18+q
19
20# Application menu search by typing (fancy Rofi menu):
21+d
22
23# Window switcher menu (fancy Rofi menu):
24+t
25
26# fancy exit-menu on bottom right:
27+Shift+e
28
29# Lock the system
30# lock with a picture or blurring the screen (options in config)
31+l
32
33# reload the configuration file
34+Shift+c
35
36# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
37+Shift+r
38
39# keybinding in fancy rofi (automated)
40F1
41
42# full keybinding list in editor:
43+F1
44
45# change window focus
46+j focus left
47+k focus down
48+b focus up
49+o focus right
50
51# alternatively, you can use the cursor keys:
52+Left focus left
53+Down focus down
54+Up focus up
55+Right focus right
56
57# move a focused window
58+Shift+j move left
59+Shift+k move down
60+Shift+b move up
61+Shift+o move right
62
63# alternatively, you can use the cursor keys:
64+Shift+Left move left
65+Shift+Down move down
66+Shift+Up move up
67+Shift+Right move right
68
69# split in horizontal orientation
70+h split h
71
72# split in vertical orientation
73+v split v
74
75# enter fullscreen mode for the focused container
76+f fullscreen toggle
77
78# change container layout (stacked, tabbed, toggle split)
79+s layout stacking
80+g layout tabbed
81+e layout toggle split
82
83# toggle tiling / floating
84+Shift+space floating toggle
85
86# change focus between tiling / floating windows
87+space focus mode_toggle
88
89# focus the parent container
90+a focus parent
91
92# focus the child container
93#+d focus child
94
95# resize floating window
96+right mouse button
97
98## Multimedia Keys
99
100# Redirect sound to headphones
101+p
102
103## App shortcuts
104+w starts Firefox
105+n starts Thunar
106 Button screenshot
diff --git a/dot_config/i3/scripts/executable_bandwidth2 b/dot_config/i3/scripts/executable_bandwidth2
new file mode 100644
index 0000000..ebd398a
--- /dev/null
+++ b/dot_config/i3/scripts/executable_bandwidth2
@@ -0,0 +1,105 @@
1#!/usr/bin/env bash
2#
3# Copyright (C) 2015 James Murphy
4# Licensed under the terms of the GNU GPL v2 only.
5#
6# i3blocks blocklet script to monitor bandwidth usage
7
8iface="${BLOCK_INSTANCE}"
9iface="${IFACE:-$iface}"
10dt="${DT:-3}"
11unit="${UNIT:-KB}"
12LABEL="${LABEL:-: }" # down arrow up arrow
13#LABEL="${LABEL:-<span font='FontAwesome'> </span>}" # down arrow up arrow
14printf_command="${PRINTF_COMMAND:-"printf \"${LABEL}%1.0f/%1.0f %s/s\\n\", rx, wx, unit;"}"
15
16function default_interface {
17 ip route | awk '/^default via/ {print $5; exit}'
18}
19
20function check_proc_net_dev {
21 if [ ! -f "/proc/net/dev" ]; then
22 echo "/proc/net/dev not found"
23 exit 1
24 fi
25}
26
27function list_interfaces {
28 check_proc_net_dev
29 echo "Interfaces in /proc/net/dev:"
30 grep -o "^[^:]\\+:" /proc/net/dev | tr -d " :"
31}
32
33while getopts i:t:u:p:lh opt; do
34 case "$opt" in
35 i) iface="$OPTARG" ;;
36 t) dt="$OPTARG" ;;
37 u) unit="$OPTARG" ;;
38 p) printf_command="$OPTARG" ;;
39 l) list_interfaces && exit 0 ;;
40 h) printf \
41"Usage: bandwidth3 [-i interface] [-t time] [-u unit] [-p printf_command] [-l] [-h]
42Options:
43-i\tNetwork interface to measure. Default determined using \`ip route\`.
44-t\tTime interval in seconds between measurements. Default: 3
45-u\tUnits to measure bytes in. Default: Mb
46\tAllowed units: Kb, KB, Mb, MB, Gb, GB, Tb, TB
47\tUnits may have optional it/its/yte/ytes on the end, e.g. Mbits, KByte
48-p\tAwk command to be called after a measurement is made.
49\tDefault: printf \"<span font='FontAwesome'> </span>%%-5.1f/%%5.1f %%s/s\\\\n\", rx, wx, unit;
50\tExposed variables: rx, wx, tx, unit, iface
51-l\tList available interfaces in /proc/net/dev
52-h\tShow this help text
53" && exit 0;;
54 esac
55done
56
57check_proc_net_dev
58
59iface="${iface:-$(default_interface)}"
60while [ -z "$iface" ]; do
61 echo No default interface
62 sleep "$dt"
63 iface=$(default_interface)
64done
65
66case "$unit" in
67 Kb|Kbit|Kbits) bytes_per_unit=$((1024 / 8));;
68 KB|KByte|KBytes) bytes_per_unit=$((1024));;
69 Mb|Mbit|Mbits) bytes_per_unit=$((1024 * 1024 / 8));;
70 MB|MByte|MBytes) bytes_per_unit=$((1024 * 1024));;
71 Gb|Gbit|Gbits) bytes_per_unit=$((1024 * 1024 * 1024 / 8));;
72 GB|GByte|GBytes) bytes_per_unit=$((1024 * 1024 * 1024));;
73 Tb|Tbit|Tbits) bytes_per_unit=$((1024 * 1024 * 1024 * 1024 / 8));;
74 TB|TByte|TBytes) bytes_per_unit=$((1024 * 1024 * 1024 * 1024));;
75 *) echo Bad unit "$unit" && exit 1;;
76esac
77
78scalar=$((bytes_per_unit * dt))
79init_line=$(cat /proc/net/dev | grep "^[ ]*$iface:")
80if [ -z "$init_line" ]; then
81 echo Interface not found in /proc/net/dev: "$iface"
82 exit 1
83fi
84
85init_received=$(awk '{print $2}' <<< $init_line)
86init_sent=$(awk '{print $10}' <<< $init_line)
87
88(while true; do cat /proc/net/dev; sleep "$dt"; done) |\
89 stdbuf -oL grep "^[ ]*$iface:" |\
90 awk -v scalar="$scalar" -v unit="$unit" -v iface="$iface" '
91BEGIN{old_received='"$init_received"';old_sent='"$init_sent"'}
92{
93 received=$2
94 sent=$10
95 rx=(received-old_received)/scalar;
96 wx=(sent-old_sent)/scalar;
97 tx=rx+wr;
98 old_received=received;
99 old_sent=sent;
100 if(rx >= 0 && wx >= 0){
101 '"$printf_command"';
102 fflush(stdout);
103 }
104}
105'
diff --git a/dot_config/i3/scripts/executable_battery-pinebook-pro b/dot_config/i3/scripts/executable_battery-pinebook-pro
new file mode 100644
index 0000000..fd97370
--- /dev/null
+++ b/dot_config/i3/scripts/executable_battery-pinebook-pro
@@ -0,0 +1,18 @@
1#!/usr/bin/env bash
2#simple Shellscript for i3blocks on Pinebook pro
3#05012020 [email protected] Gerhard S.
4#battery-symbols: on Manjaro you need the awesome-terminal-fonts package installed!
5PERCENT=$(cat /sys/class/power_supply/cw2015-battery/capacity)
6STATUS=$(cat /sys/class/power_supply/cw2015-battery/status)
7case $((
8 $PERCENT >= 0 && $PERCENT <= 20 ? 1 :
9 $PERCENT > 20 && $PERCENT <= 40 ? 2 :
10 $PERCENT > 40 && $PERCENT <= 60 ? 3 :
11 $PERCENT > 60 && $PERCENT <= 80 ? 4 : 5)) in
12#
13 (1) echo $STATUS:"" :$PERCENT%;;
14 (2) echo $STATUS:"" :$PERCENT%;;
15 (3) echo $STATUS:"" :$PERCENT%;;
16 (4) echo $STATUS:"" :$PERCENT%;;
17 (5) echo $STATUS:"" :$PERCENT%;;
18esac
diff --git a/dot_config/i3/scripts/executable_battery1 b/dot_config/i3/scripts/executable_battery1
new file mode 100644
index 0000000..3b9d5a7
--- /dev/null
+++ b/dot_config/i3/scripts/executable_battery1
@@ -0,0 +1,114 @@
1#!/usr/bin/perl
2#
3# Copyright 2014 Pierre Mavro <[email protected]>
4# Copyright 2014 Vivien Didelot <[email protected]>
5#
6# Licensed under the terms of the GNU GPL v3, or any later version.
7#
8# This script is meant to use with i3blocks. It parses the output of the "acpi"
9# command (often provided by a package of the same name) to read the status of
10# the battery, and eventually its remaining time (to full charge or discharge).
11#
12# The color will gradually change for a percentage below 85%, and the urgency
13# (exit code 33) is set if there is less that 5% remaining.
14
15# Edited by Andreas Lindlbauer <[email protected]>
16
17use strict;
18use warnings;
19use utf8;
20
21# otherwise we get in console "Wide character in print at"
22binmode(STDOUT, ':utf8');
23
24# my $acpi;
25my $upower;
26my $percent;
27my $bat_state;
28my $status;
29my $ac_adapt;
30my $full_text;
31my $short_text;
32my $label = '😅';
33my $bat_number = $ENV{BLOCK_INSTANCE} || 0;
34
35open (UPOWER, "upower -i /org/freedesktop/UPower/devices/battery_BAT$bat_number | grep 'percentage' |") or die;
36$upower = <UPOWER>;
37close(UPOWER);
38
39# fail on unexpected output
40if ($upower !~ /: (\d+)%/) {
41 die "$upower\n";
42}
43
44$percent = $1;
45$full_text = "$percent%";
46
47open (BAT_STATE, "upower -i /org/freedesktop/UPower/devices/battery_BAT$bat_number | grep 'state' |") or die;
48$bat_state = <BAT_STATE>;
49close(BAT_STATE);
50
51if ($bat_state !~ /: (\w+)/) {
52 die "$bat_state\n";
53}
54$status = $1;
55
56if ($status eq 'discharging') {
57 $full_text .= ' ';
58} elsif ($status eq 'charging') {
59 $full_text .= ' ';
60} elsif ($status eq 'Unknown') {
61 open (AC_ADAPTER, "acpi -a |") or die;
62 $ac_adapt = <AC_ADAPTER>;
63 close(AC_ADAPTER);
64
65 if ($ac_adapt =~ /: ([\w-]+)/) {
66 $ac_adapt = $1;
67
68 if ($ac_adapt eq 'on-line') {
69 $full_text .= ' CHR';
70 } elsif ($ac_adapt eq 'off-line') {
71 $full_text .= ' DIS';
72 }
73 }
74}
75
76$short_text = $full_text;
77
78if ($percent < 20) {
79 $label = '';
80} elsif ($percent < 45) {
81 $label = '';
82} elsif ($percent < 70) {
83 $label = '';
84} elsif ($percent < 95) {
85 $label = '';
86} else {
87 $label = '';
88}
89
90# print text
91print " ${label}";
92print " $full_text\n";
93print " ${label}";
94print " $short_text\n";
95
96# consider color and urgent flag only on discharge
97if ($status eq 'discharging') {
98
99 if ($percent < 20) {
100 print "#FF0000\n";
101 } elsif ($percent < 40) {
102 print "#FFAE00\n";
103 } elsif ($percent < 60) {
104 print "#FFF600\n";
105 } elsif ($percent < 85) {
106 print "#A8FF00\n";
107 }
108
109 if ($percent < 5) {
110 exit(33);
111 }
112}
113
114exit(0);
diff --git a/dot_config/i3/scripts/executable_battery2 b/dot_config/i3/scripts/executable_battery2
new file mode 100644
index 0000000..2d55dab
--- /dev/null
+++ b/dot_config/i3/scripts/executable_battery2
@@ -0,0 +1,106 @@
1#!/usr/bin/env python3
2#
3# Copyright (C) 2016 James Murphy
4# Licensed under the GPL version 2 only
5#
6# A battery indicator blocklet script for i3blocks
7
8from subprocess import check_output
9import os
10import re
11
12config = dict(os.environ)
13status = check_output(['acpi'], universal_newlines=True)
14
15if not status:
16 # stands for no battery found
17 color = config.get("color_10", "red")
18 fulltext = "<span color='{}'><span font='FontAwesome'>\uf00d \uf240</span></span>".format(color)
19 percentleft = 100
20else:
21 # if there is more than one battery in one laptop, the percentage left is
22 # available for each battery separately, although state and remaining
23 # time for overall block is shown in the status of the first battery
24 batteries = status.split("\n")
25 state_batteries=[]
26 commasplitstatus_batteries=[]
27 percentleft_batteries=[]
28 time = ""
29 for battery in batteries:
30 if battery!='':
31 state_batteries.append(battery.split(": ")[1].split(", ")[0])
32 commasplitstatus = battery.split(", ")
33 if not time:
34 time = commasplitstatus[-1].strip()
35 # check if it matches a time
36 time = re.match(r"(\d+):(\d+)", time)
37 if time:
38 time = ":".join(time.groups())
39 timeleft = " ({})".format(time)
40 else:
41 timeleft = ""
42
43 p = int(commasplitstatus[1].rstrip("%\n"))
44 if p>0:
45 percentleft_batteries.append(p)
46 commasplitstatus_batteries.append(commasplitstatus)
47 state = state_batteries[0]
48 commasplitstatus = commasplitstatus_batteries[0]
49 if percentleft_batteries:
50 percentleft = int(sum(percentleft_batteries)/len(percentleft_batteries))
51 else:
52 percentleft = 0
53
54 # stands for charging
55 color = config.get("color_charging", "yellow")
56 FA_LIGHTNING = "<span color='{}'><span font='FontAwesome'>\uf0e7</span></span>".format(color)
57
58 # stands for plugged in
59 FA_PLUG = "<span font='FontAwesome'>\uf1e6</span>"
60
61 # stands for using battery
62 FA_BATTERY = "<span font='FontAwesome'>\uf240</span>"
63
64 # stands for unknown status of battery
65 FA_QUESTION = "<span font='FontAwesome'>\uf128</span>"
66
67
68 if state == "Discharging":
69 fulltext = FA_BATTERY + " "
70 elif state == "Full":
71 fulltext = FA_PLUG + " "
72 timeleft = ""
73 elif state == "Unknown":
74 fulltext = FA_QUESTION + " " + FA_BATTERY + " "
75 timeleft = ""
76 else:
77 fulltext = FA_LIGHTNING + " " + FA_PLUG + " "
78
79 def color(percent):
80 if percent < 10:
81 # exit code 33 will turn background red
82 return config.get("color_10", "#FFFFFF")
83 if percent < 20:
84 return config.get("color_20", "#FF3300")
85 if percent < 30:
86 return config.get("color_30", "#FF6600")
87 if percent < 40:
88 return config.get("color_40", "#FF9900")
89 if percent < 50:
90 return config.get("color_50", "#FFCC00")
91 if percent < 60:
92 return config.get("color_60", "#FFFF00")
93 if percent < 70:
94 return config.get("color_70", "#FFFF33")
95 if percent < 80:
96 return config.get("color_80", "#FFFF66")
97 return config.get("color_full", "#FFFFFF")
98
99 form = '<span color="{}">{}%</span>'
100 fulltext += form.format(color(percentleft), percentleft)
101 #fulltext += timeleft
102
103print(fulltext)
104print(fulltext)
105if percentleft < 10:
106 exit(33)
diff --git a/dot_config/i3/scripts/executable_blur-lock b/dot_config/i3/scripts/executable_blur-lock
new file mode 100644
index 0000000..4ff7ed6
--- /dev/null
+++ b/dot_config/i3/scripts/executable_blur-lock
@@ -0,0 +1,11 @@
1#!/usr/bin/env bash
2
3PICTURE=/tmp/i3lock.png
4SCREENSHOT="scrot -z $PICTURE"
5
6BLUR="5x4"
7
8$SCREENSHOT
9convert $PICTURE -blur $BLUR $PICTURE
10i3lock -i $PICTURE
11rm $PICTURE
diff --git a/dot_config/i3/scripts/executable_cpu_usage b/dot_config/i3/scripts/executable_cpu_usage
new file mode 100644
index 0000000..8d8a267
--- /dev/null
+++ b/dot_config/i3/scripts/executable_cpu_usage
@@ -0,0 +1,62 @@
1#!/usr/bin/perl
2#
3# Copyright 2014 Pierre Mavro <[email protected]>
4# Copyright 2014 Vivien Didelot <[email protected]>
5# Copyright 2014 Andreas Guldstrand <[email protected]>
6#
7# Licensed under the terms of the GNU GPL v3, or any later version.
8
9use strict;
10use warnings;
11use utf8;
12use Getopt::Long;
13
14# default values
15my $t_warn = $ENV{T_WARN} // 50;
16my $t_crit = $ENV{T_CRIT} // 80;
17my $cpu_usage = -1;
18my $decimals = $ENV{DECIMALS} // 0;
19my $label = $ENV{LABEL} // "";
20
21sub help {
22 print "Usage: cpu_usage [-w <warning>] [-c <critical>] [-d <decimals>]\n";
23 print "-w <percent>: warning threshold to become yellow\n";
24 print "-c <percent>: critical threshold to become red\n";
25 print "-d <decimals>: Use <decimals> decimals for percentage (default is $decimals) \n";
26 exit 0;
27}
28
29GetOptions("help|h" => \&help,
30 "w=i" => \$t_warn,
31 "c=i" => \$t_crit,
32 "d=i" => \$decimals,
33);
34
35# Get CPU usage
36$ENV{LC_ALL}="en_US"; # if mpstat is not run under en_US locale, things may break, so make sure it is
37open (MPSTAT, 'mpstat 1 1 |') or die;
38while (<MPSTAT>) {
39 if (/^.*\s+(\d+\.\d+)[\s\x00]?$/) {
40 $cpu_usage = 100 - $1; # 100% - %idle
41 last;
42 }
43}
44close(MPSTAT);
45
46$cpu_usage eq -1 and die 'Can\'t find CPU information';
47
48# Print short_text, full_text
49print "${label}";
50printf "%02.${decimals}f%%\n", $cpu_usage;
51print "${label}";
52printf "%02.${decimals}f%%\n", $cpu_usage;
53
54# Print color, if needed
55if ($cpu_usage >= $t_crit) {
56 print "#FF0000\n";
57 exit 33;
58} elsif ($cpu_usage >= $t_warn) {
59 print "#FFFC00\n";
60}
61
62exit 0;
diff --git a/dot_config/i3/scripts/executable_disk b/dot_config/i3/scripts/executable_disk
new file mode 100644
index 0000000..e18c7aa
--- /dev/null
+++ b/dot_config/i3/scripts/executable_disk
@@ -0,0 +1,48 @@
1#!/usr/bin/env bash
2# Copyright (C) 2014 Julien Bonjean <[email protected]>
3
4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation, either version 3 of the License, or
7# (at your option) any later version.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17DIR="${DIR:-$BLOCK_INSTANCE}"
18DIR="${DIR:-$HOME}"
19ALERT_LOW="${ALERT_LOW:-$1}"
20ALERT_LOW="${ALERT_LOW:-10}" # color will turn red under this value (default: 10%)
21
22LOCAL_FLAG="-l"
23if [ "$1" = "-n" ] || [ "$2" = "-n" ]; then
24 LOCAL_FLAG=""
25fi
26
27df -h -P $LOCAL_FLAG "$DIR" | awk -v label="$LABEL" -v alert_low=$ALERT_LOW '
28/\/.*/ {
29 # full text
30 print label $4
31
32 # short text
33 print label $4
34
35 use=$5
36
37 # no need to continue parsing
38 exit 0
39}
40
41END {
42 gsub(/%$/,"",use)
43 if (100 - use < alert_low) {
44 # color
45 print "#FF0000"
46 }
47}
48'
diff --git a/dot_config/i3/scripts/executable_keyboard-layout b/dot_config/i3/scripts/executable_keyboard-layout
new file mode 100644
index 0000000..9a3e314
--- /dev/null
+++ b/dot_config/i3/scripts/executable_keyboard-layout
@@ -0,0 +1,5 @@
1#!/usr/bin/env bash
2
3KBD=$(/usr/bin/xkblayout-state print '%s')
4echo $KBD
5
diff --git a/dot_config/i3/scripts/executable_keyhint b/dot_config/i3/scripts/executable_keyhint
new file mode 100644
index 0000000..8b8c3e3
--- /dev/null
+++ b/dot_config/i3/scripts/executable_keyhint
@@ -0,0 +1,25 @@
1#!/bin/bash
2
3Main() {
4 source /usr/share/endeavouros/scripts/eos-script-lib-yad || return 1
5
6 local command=(
7 eos_yad --title="EndeavourOS i3-wm keybindings:" --no-buttons --geometry=400x345-15-400 --list
8 --column=key: --column=description: --column=command:
9 "ESC" "close this app" ""
10 "=" "modkey" "(set mod Mod4)"
11 "+enter" "open a terminal" ""
12 "+Shift+n" "new empty workspace" ""
13 "+w" "open Browser" ""
14 "+n" "open Filebrowser" ""
15 "+d" "app menu" ""
16 "+q" "close focused app" ""
17 "Print-key" "screenshot" ""
18 "+Shift+e" "logout menu" ""
19 "F1" "open keybinding helper" ""
20 )
21
22 "${command[@]}"
23}
24
25Main "$@"
diff --git a/dot_config/i3/scripts/executable_keyhint-2 b/dot_config/i3/scripts/executable_keyhint-2
new file mode 100644
index 0000000..2e86d12
--- /dev/null
+++ b/dot_config/i3/scripts/executable_keyhint-2
@@ -0,0 +1,6 @@
1I3_CONFIG=$HOME/.config/i3/config
2mod_key=$(sed -nre 's/^set \$mod (.*)/\1/p' ${I3_CONFIG})
3grep "^bindsym" ${I3_CONFIG} \
4 | sed "s/-\(-\w\+\)\+//g;s/\$mod/${mod_key}/g;s/Mod1/Alt/g;s/exec //;s/bindsym //;s/^\s\+//;s/^\([^ ]\+\) \(.\+\)$/\2: \1/;s/^\s\+//" \
5 | tr -s ' ' \
6 | rofi -dmenu -theme ~/.config/rofi/rofikeyhint.rasi
diff --git a/dot_config/i3/scripts/executable_literal_empty_workspace b/dot_config/i3/scripts/executable_literal_empty_workspace
new file mode 100644
index 0000000..b962cde
--- /dev/null
+++ b/dot_config/i3/scripts/executable_literal_empty_workspace
@@ -0,0 +1,10 @@
1#!/usr/bin/env bash
2
3MAX_DESKTOPS=20
4
5WORKSPACES=$(seq -s '\n' 1 1 ${MAX_DESKTOPS})
6
7EMPTY_WORKSPACE=$( (i3-msg -t get_workspaces | tr ',' '\n' | grep num | awk -F: '{print int($2)}' ; \
8 echo -e ${WORKSPACES} ) | sort -n | uniq -u | head -n 1)
9
10i3-msg workspace ${EMPTY_WORKSPACE}
diff --git a/dot_config/i3/scripts/executable_memory b/dot_config/i3/scripts/executable_memory
new file mode 100644
index 0000000..6a69a6f
--- /dev/null
+++ b/dot_config/i3/scripts/executable_memory
@@ -0,0 +1,69 @@
1#!/usr/bin/env bash
2# Copyright (C) 2014 Julien Bonjean <[email protected]>
3
4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation, either version 3 of the License, or
7# (at your option) any later version.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17TYPE="${BLOCK_INSTANCE:-mem}"
18
19awk -v type=$TYPE '
20/^MemTotal:/ {
21 mem_total=$2
22}
23/^MemFree:/ {
24 mem_free=$2
25}
26/^Buffers:/ {
27 mem_free+=$2
28}
29/^Cached:/ {
30 mem_free+=$2
31}
32/^SwapTotal:/ {
33 swap_total=$2
34}
35/^SwapFree:/ {
36 swap_free=$2
37}
38END {
39 if (type == "swap") {
40 free=swap_free/1024/1024
41 used=(swap_total-swap_free)/1024/1024
42 total=swap_total/1024/1024
43 } else {
44 free=mem_free/1024/1024
45 used=(mem_total-mem_free)/1024/1024
46 total=mem_total/1024/1024
47 }
48
49 pct=0
50 if (total > 0) {
51 pct=used/total*100
52 }
53
54 # full text
55 # printf("%.1fG/%.1fG (%.f%%)\n", used, total, pct)
56
57 # short text
58 printf("%.f%%\n", pct)
59
60 # color
61 if (pct > 90) {
62 print("#FF0000")
63 } else if (pct > 80) {
64 print("#FFAE00")
65 } else if (pct > 70) {
66 print("#FFF600")
67 }
68}
69' /proc/meminfo
diff --git a/dot_config/i3/scripts/executable_openweather b/dot_config/i3/scripts/executable_openweather
new file mode 100644
index 0000000..c51f9d3
--- /dev/null
+++ b/dot_config/i3/scripts/executable_openweather
@@ -0,0 +1,93 @@
1#!/usr/bin/env bash
2# Edited by Andreas Lindlbauer <[email protected]>
3
4temps=("#0600FF" "#0500FF" "#0400FF" "#0300FF" "#0200FF" "#0100FF" "#0000FF" "#0002FF" "#0012FF" "#0022FF" "#0032FF" "#0044FF" "#0054FF" "#0064FF" "#0074FF" "#0084FF" "#0094FF" "#00A4FF" "#00B4FF" "#00C4FF" "#00D4FF" "#00E4FF" "#00FFF4" "#00FFD0" "#00FFA8" "#00FF83" "#00FF5C" "#00FF36" "#00FF10" "#17FF00" "#3EFF00" "#65FF00" "#B0FF00" "#FDFF00" "#FFF000" "#FFDC00" "#FFC800" "#FFB400" "#FFA000" "#FF8C00" "#FF7800" "#FF6400" "#FF5000" "#FF3C00" "#FF2800" "#FF1400" "#FF0000")
5
6command -v jq >/dev/null 2>&1 || { echo >&2 "Program 'jq' required but it is not installed.
7Aborting."; exit 1; }
8command -v wget >/dev/null 2>&1 || { echo >&2 "Program 'wget' required but is not installed.
9Aborting."; exit 1; }
10
11# To use this script you need to create an API key here https://home.openweathermap.org
12# You need to put your Open Weather APIKEY here:
13APIKEY="keykeykey"
14# And get your Latitute and Longitudes to put in here:
15LAT="XX.XXXX"
16LON="XX.XXXX"
17URL="http://api.openweathermap.org/data/2.5/onecall?lat=${LAT}&lon=${LON}&units=metric&exclude=minutely,hourly,daily&APPID=${APIKEY}"
18WEATHER_RESPONSE=$(wget -qO- "${URL}")
19
20WEATHER_CONDITION=$(echo "$WEATHER_RESPONSE" | jq '.current.weather[0].main' | sed 's/"//g')
21WEATHER_TEMP=$(echo "$WEATHER_RESPONSE" | jq '.current.feels_like')
22WEATHER_INT=${WEATHER_TEMP%.*}
23
24TIME_NOW=$( echo "$WEATHER_RESPONSE" | jq '.current.dt')
25SUNRISE=$( echo "$WEATHER_RESPONSE" | jq '.current.sunrise')
26SUNSET=$( echo "$WEATHER_RESPONSE" | jq '.current.sunset')
27DESCRIPTION=$( echo "$WEATHER_RESPONSE" | jq '.current.weather[0].description' | sed 's/"//g')
28WEATHER_ALERT=$( echo "$WEATHER_RESPONSE" | jq '.alerts[0].event' | sed 's/"//g')
29DAYTIME="n"
30
31if [[ "$TIME_NOW" > "$SUNRISE" ]] && [[ "$TIME_NOW" < "$SUNSET" ]]; then
32 DAYTIME="d"
33fi
34
35case $WEATHER_CONDITION in
36 'Clouds')
37 if [ "$DAYTIME" == "d" ]; then
38 WEATHER_ICON=""
39 else
40 WEATHER_ICON=""
41 fi
42 ;;
43 'Rain')
44 WEATHER_ICON=""
45 ;;
46 'Drizzle')
47 if [ "$DAYTIME" == "d" ]; then
48 WEATHER_ICON=""
49 else
50 WEATHER_ICON=""
51 fi
52 ;;
53 'Thunderstorm')
54 WEATHER_ICON=""
55 ;;
56 'Snow')
57 WEATHER_ICON=""
58 ;;
59 'Clear')
60 if [ "$DAYTIME" == "d" ]; then
61 WEATHER_ICON=""
62 else
63 WEATHER_ICON=""
64 fi
65 ;;
66 *)
67 WEATHER_ICON="🌫"
68 ;;
69esac
70
71WEATHER_COLOR="#FFFFFF"
72if [ "$WEATHER_INT" -lt "-11" ]; then
73 WEATHER_COLOR="#0000FF"
74elif [ "$WEATHER_INT" -gt 35 ]; then
75 WEATHER_COLOR="#FF0000"
76else
77 WEATHER_INT=$(( WEATHER_INT + 11 ))
78 WEATHER_COLOR="${temps[$WEATHER_INT]}"
79fi
80
81full_text="${WEATHER_ICON} ${WEATHER_TEMP}°C: ${DESCRIPTION} "
82if [ "$WEATHER_ALERT" != "null" ]; then
83 WARN_START=$(echo "$WEATHER_RESPONSE" | jq '.alerts[0].start')
84 WARN_END=$(echo "$WEATHER_RESPONSE" | jq '.alerts[0].end')
85 WARN_START=$(date -d @"$WARN_START" +%a_%k:%M)
86 WARN_END=$(date -d @"$WARN_END" +%a_%k:%M)
87 full_text="${WEATHER_ICON} ${WEATHER_TEMP}°C: ${DESCRIPTION}  ${WEATHER_ALERT} from ${WARN_START} to ${WARN_END}  "
88fi
89
90
91echo "${full_text}"
92echo "${WEATHER_TEMP}°C "
93echo "${WEATHER_COLOR}"
diff --git a/dot_config/i3/scripts/executable_openweather-city b/dot_config/i3/scripts/executable_openweather-city
new file mode 100644
index 0000000..6ea051c
--- /dev/null
+++ b/dot_config/i3/scripts/executable_openweather-city
@@ -0,0 +1,43 @@
1#!/usr/bin/env bash
2
3command -v jq >/dev/null 2>&1 || { echo >&2 "Program 'jq' required but it is not installed.
4Aborting."; exit 1; }
5command -v wget >/dev/null 2>&1 || { echo >&2 "Program 'wget' required but is not installed.
6Aborting."; exit 1; }
7
8# To use this script you need to create an API key here https://home.openweathermap.org
9# You need to put your Open Weather APIKEY here:
10APIKEY="keykey"
11# find your City ID here: https://openweathermap.org/
12# search for your city and copy the ID from the URL inside the browser.
13CITY_ID="idid"
14URL="http://api.openweathermap.org/data/2.5/weather?id=${CITY_ID}&units=metric&APPID=${APIKEY}"
15
16WEATHER_RESPONSE=$(wget -qO- "${URL}")
17
18WEATHER_CONDITION=$(echo $WEATHER_RESPONSE | jq '.weather[0].main' | sed 's/"//g')
19WEATHER_TEMP=$(echo $WEATHER_RESPONSE | jq '.main.temp')
20WIND_DIR=$( echo "$WEATHER_RESPONSE" | jq '.wind.deg')
21WIND_SPEED=$( echo "$WEATHER_RESPONSE" | jq '.wind.speed')
22
23WIND_SPEED=$(awk "BEGIN {print 60*60*$WIND_SPEED/1000}")
24WIND_DIR=$(awk "BEGIN {print int(($WIND_DIR % 360)/22.5)}")
25DIR_ARRAY=( N NNE NE ENE E ESE SE SSE S SSW SW WSW W WNW NW NNW N )
26WIND_DIR=${DIR_ARRAY[WIND_DIR]}
27
28case $WEATHER_CONDITION in
29 'Clouds')
30 WEATHER_ICON=""
31 ;;
32 'Rain')
33 WEATHER_ICON=""
34 ;;
35 'Snow')
36 WEATHER_ICON=""
37 ;;
38 *)
39 WEATHER_ICON=""
40 ;;
41esac
42
43echo "${WEATHER_ICON} ${WEATHER_TEMP}°C: ${WIND_SPEED} km/h ${WIND_DIR}"
diff --git a/dot_config/i3/scripts/executable_openweather.conf b/dot_config/i3/scripts/executable_openweather.conf
new file mode 100644
index 0000000..f11aa86
--- /dev/null
+++ b/dot_config/i3/scripts/executable_openweather.conf
@@ -0,0 +1,5 @@
1# Weather
2[Weather]
3command=~/.config/i3/scripts/openweather
4interval=1800
5color=#7275b3
diff --git a/dot_config/i3/scripts/executable_power-profiles b/dot_config/i3/scripts/executable_power-profiles
new file mode 100644
index 0000000..feb63dc
--- /dev/null
+++ b/dot_config/i3/scripts/executable_power-profiles
@@ -0,0 +1,190 @@
1#!/usr/bin/env bash
2#
3# Use rofi/zenity to change system runstate thanks to systemd.
4#
5# Note: this currently relies on associative array support in the shell.
6#
7# Inspired from i3pystatus wiki:
8# https://github.com/enkore/i3pystatus/wiki/Shutdown-Menu
9#
10# Copyright 2015 Benjamin Chrétien <chretien at lirmm dot fr>
11#
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by
14# the Free Software Foundation, either version 3 of the License, or
15# (at your option) any later version.
16
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21
22# You should have received a copy of the GNU General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24
25# power-profiles-daemon implementation:
26# needs package power-profiles-daemon installed and the service running see here:
27# https://wiki.archlinux.org/title/CPU_frequency_scaling#power-profiles-daemon
28# used in i3-blocks: ~/.config/i3/i3blocks.conf together with: ~/.config/i3/scripts/ppd-status
29
30
31#######################################################################
32# BEGIN CONFIG #
33#######################################################################
34
35# Use a custom lock script
36#LOCKSCRIPT="i3lock-extra -m pixelize"
37
38# Colors: FG (foreground), BG (background), HL (highlighted)
39FG_COLOR="#bbbbbb"
40BG_COLOR="#111111"
41HLFG_COLOR="#111111"
42HLBG_COLOR="#bbbbbb"
43BORDER_COLOR="#222222"
44
45# Options not related to colors
46#ROFI_TEXT=":"
47#ROFI_OPTIONS=(-width -11 -location 0 -hide-scrollbar -bw 30 -color-window "#dd310027,#dd0310027,#dd310027" -padding 5)
48#ROFI_OPTIONS=(-width -18 -location 4 -hide-scrollbar -color-window "#cc310027,#00a0009a,#cc310027" -padding 5 -font "Sourcecode Pro Regular 10, FontAwesome 9")
49ROFI_OPTIONS=(-theme ~/.config/rofi/power-profiles.rasi)
50# Zenity options
51ZENITY_TITLE="Power Profiles"
52ZENITY_TEXT="Set Profiles:"
53ZENITY_OPTIONS=(--column= --hide-header)
54
55#######################################################################
56# END CONFIG #
57#######################################################################
58
59# Whether to ask for user's confirmation
60enable_confirmation=false
61
62# Preferred launcher if both are available
63preferred_launcher="rofi"
64
65usage="$(basename "$0") [-h] [-c] [-p name] -- display a menu for shutdown, reboot, lock etc.
66
67where:
68 -h show this help text
69 -c ask for user confirmation
70 -p preferred launcher (rofi or zenity)
71
72This script depends on:
73 - systemd,
74 - i3,
75 - rofi or zenity."
76
77# Check whether the user-defined launcher is valid
78launcher_list=(rofi zenity)
79function check_launcher() {
80 if [[ ! "${launcher_list[@]}" =~ (^|[[:space:]])"$1"($|[[:space:]]) ]]; then
81 echo "Supported launchers: ${launcher_list[*]}"
82 exit 1
83 else
84 # Get array with unique elements and preferred launcher first
85 # Note: uniq expects a sorted list, so we cannot use it
86 i=1
87 launcher_list=($(for l in "$1" "${launcher_list[@]}"; do printf "%i %s\n" "$i" "$l"; let i+=1; done \
88 | sort -uk2 | sort -nk1 | cut -d' ' -f2- | tr '\n' ' '))
89 fi
90}
91
92# Parse CLI arguments
93while getopts "hcp:" option; do
94 case "${option}" in
95 h) echo "${usage}"
96 exit 0
97 ;;
98 c) enable_confirmation=true
99 ;;
100 p) preferred_launcher="${OPTARG}"
101 check_launcher "${preferred_launcher}"
102 ;;
103 *) exit 1
104 ;;
105 esac
106done
107
108# Check whether a command exists
109function command_exists() {
110 command -v "$1" &> /dev/null 2>&1
111}
112
113# systemctl required
114if ! command_exists systemctl ; then
115 exit 1
116fi
117
118# menu defined as an associative array
119typeset -A menu
120
121# Menu with keys/commands
122
123menu=(
124 [ Performance]="powerprofilesctl set performance"
125 [ Balanced]="powerprofilesctl set balanced"
126 [ Power Saver]="powerprofilesctl set power-saver"
127 [ Cancel]=""
128)
129
130menu_nrows=${#menu[@]}
131
132# Menu entries that may trigger a confirmation message
133menu_confirm="Shutdown Reboot Hibernate Suspend Halt Logout"
134
135launcher_exe=""
136launcher_options=""
137rofi_colors=""
138
139function prepare_launcher() {
140 if [[ "$1" == "rofi" ]]; then
141 rofi_colors=(-bc "${BORDER_COLOR}" -bg "${BG_COLOR}" -fg "${FG_COLOR}" \
142 -hlfg "${HLFG_COLOR}" -hlbg "${HLBG_COLOR}")
143 launcher_exe="rofi"
144 launcher_options=(-dmenu -i -lines "${menu_nrows}" -p "${ROFI_TEXT}" \
145 "${rofi_colors}" "${ROFI_OPTIONS[@]}")
146 elif [[ "$1" == "zenity" ]]; then
147 launcher_exe="zenity"
148 launcher_options=(--list --title="${ZENITY_TITLE}" --text="${ZENITY_TEXT}" \
149 "${ZENITY_OPTIONS[@]}")
150 fi
151}
152
153for l in "${launcher_list[@]}"; do
154 if command_exists "${l}" ; then
155 prepare_launcher "${l}"
156 break
157 fi
158done
159
160# No launcher available
161if [[ -z "${launcher_exe}" ]]; then
162 exit 1
163fi
164
165launcher=(${launcher_exe} "${launcher_options[@]}")
166selection="$(printf '%s\n' "${!menu[@]}" | sort | "${launcher[@]}")"
167
168function ask_confirmation() {
169 if [ "${launcher_exe}" == "rofi" ]; then
170 confirmed=$(echo -e "Yes\nNo" | rofi -dmenu -i -lines 2 -p "${selection}?" \
171 "${rofi_colors}" "${ROFI_OPTIONS[@]}")
172 [ "${confirmed}" == "Yes" ] && confirmed=0
173 elif [ "${launcher_exe}" == "zenity" ]; then
174 zenity --question --text "Are you sure you want to ${selection,,}?"
175 confirmed=$?
176 fi
177
178 if [ "${confirmed}" == 0 ]; then
179 i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
180 fi
181}
182
183if [[ $? -eq 0 && ! -z ${selection} ]]; then
184 if [[ "${enable_confirmation}" = true && \
185 ${menu_confirm} =~ (^|[[:space:]])"${selection}"($|[[:space:]]) ]]; then
186 ask_confirmation
187 else
188 i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
189 fi
190fi
diff --git a/dot_config/i3/scripts/executable_powermenu b/dot_config/i3/scripts/executable_powermenu
new file mode 100644
index 0000000..e72f0a2
--- /dev/null
+++ b/dot_config/i3/scripts/executable_powermenu
@@ -0,0 +1,186 @@
1#!/usr/bin/env bash
2#
3# Use rofi/zenity to change system runstate thanks to systemd.
4#
5# Note: this currently relies on associative array support in the shell.
6#
7# Inspired from i3pystatus wiki:
8# https://github.com/enkore/i3pystatus/wiki/Shutdown-Menu
9#
10# Copyright 2015 Benjamin Chrétien <chretien at lirmm dot fr>
11#
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by
14# the Free Software Foundation, either version 3 of the License, or
15# (at your option) any later version.
16
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21
22# You should have received a copy of the GNU General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24
25# modified to work with latest rofi update by joekamprad <[email protected]>
26
27#######################################################################
28# BEGIN CONFIG #
29#######################################################################
30
31# Use a custom lock script
32#LOCKSCRIPT="i3lock-extra -m pixelize"
33
34# Colors: FG (foreground), BG (background), HL (highlighted)
35FG_COLOR="#bbbbbb"
36BG_COLOR="#111111"
37HLFG_COLOR="#111111"
38HLBG_COLOR="#bbbbbb"
39BORDER_COLOR="#222222"
40
41# Options not related to colors (most rofi options do not work anymore)
42ROFI_OPTIONS=(-theme ~/.config/rofi/powermenu.rasi)
43# Zenity options
44ZENITY_TITLE="Power Menu"
45ZENITY_TEXT="Action:"
46ZENITY_OPTIONS=(--column= --hide-header)
47
48#######################################################################
49# END CONFIG #
50#######################################################################
51
52# Whether to ask for user's confirmation
53enable_confirmation=false
54
55# Preferred launcher if both are available
56preferred_launcher="rofi"
57
58usage="$(basename "$0") [-h] [-c] [-p name] -- display a menu for shutdown, reboot, lock etc.
59
60where:
61 -h show this help text
62 -c ask for user confirmation
63 -p preferred launcher (rofi or zenity)
64
65This script depends on:
66 - systemd,
67 - i3,
68 - rofi or zenity."
69
70# Check whether the user-defined launcher is valid
71launcher_list=(rofi zenity)
72function check_launcher() {
73 if [[ ! "${launcher_list[@]}" =~ (^|[[:space:]])"$1"($|[[:space:]]) ]]; then
74 echo "Supported launchers: ${launcher_list[*]}"
75 exit 1
76 else
77 # Get array with unique elements and preferred launcher first
78 # Note: uniq expects a sorted list, so we cannot use it
79 i=1
80 launcher_list=($(for l in "$1" "${launcher_list[@]}"; do printf "%i %s\n" "$i" "$l"; let i+=1; done \
81 | sort -uk2 | sort -nk1 | cut -d' ' -f2- | tr '\n' ' '))
82 fi
83}
84
85# Parse CLI arguments
86while getopts "hcp:" option; do
87 case "${option}" in
88 h) echo "${usage}"
89 exit 0
90 ;;
91 c) enable_confirmation=true
92 ;;
93 p) preferred_launcher="${OPTARG}"
94 check_launcher "${preferred_launcher}"
95 ;;
96 *) exit 1
97 ;;
98 esac
99done
100
101# Check whether a command exists
102function command_exists() {
103 command -v "$1" &> /dev/null 2>&1
104}
105
106# systemctl required
107if ! command_exists systemctl ; then
108 exit 1
109fi
110
111# menu defined as an associative array
112typeset -A menu
113
114# Menu with keys/commands
115
116menu=(
117 [ Shutdown]="systemctl poweroff"
118 [ Reboot]="systemctl reboot"
119 [ Suspend]="systemctl suspend"
120 [ Hibernate]="systemctl hibernate"
121 [ Lock]="~/.config/i3/scripts/blur-lock"
122 [ Logout]="i3-msg exit"
123 [ Cancel]=""
124)
125
126menu_nrows=${#menu[@]}
127
128# Menu entries that may trigger a confirmation message
129menu_confirm="Shutdown Reboot Hibernate Suspend Halt Logout"
130
131launcher_exe=""
132launcher_options=""
133rofi_colors=""
134
135function prepare_launcher() {
136 if [[ "$1" == "rofi" ]]; then
137 rofi_colors=(-bc "${BORDER_COLOR}" -bg "${BG_COLOR}" -fg "${FG_COLOR}" \
138 -hlfg "${HLFG_COLOR}" -hlbg "${HLBG_COLOR}")
139 launcher_exe="rofi"
140 launcher_options=(-dmenu -i -lines "${menu_nrows}" -p "${ROFI_TEXT}" \
141 "${rofi_colors}" "${ROFI_OPTIONS[@]}")
142 elif [[ "$1" == "zenity" ]]; then
143 launcher_exe="zenity"
144 launcher_options=(--list --title="${ZENITY_TITLE}" --text="${ZENITY_TEXT}" \
145 "${ZENITY_OPTIONS[@]}")
146 fi
147}
148
149for l in "${launcher_list[@]}"; do
150 if command_exists "${l}" ; then
151 prepare_launcher "${l}"
152 break
153 fi
154done
155
156# No launcher available
157if [[ -z "${launcher_exe}" ]]; then
158 exit 1
159fi
160
161launcher=(${launcher_exe} "${launcher_options[@]}")
162selection="$(printf '%s\n' "${!menu[@]}" | sort | "${launcher[@]}")"
163
164function ask_confirmation() {
165 if [ "${launcher_exe}" == "rofi" ]; then
166 confirmed=$(echo -e "Yes\nNo" | rofi -dmenu -i -lines 2 -p "${selection}?" \
167 "${rofi_colors}" "${ROFI_OPTIONS[@]}")
168 [ "${confirmed}" == "Yes" ] && confirmed=0
169 elif [ "${launcher_exe}" == "zenity" ]; then
170 zenity --question --text "Are you sure you want to ${selection,,}?"
171 confirmed=$?
172 fi
173
174 if [ "${confirmed}" == 0 ]; then
175 i3-msg -q "exec ${menu[${selection}]}"
176 fi
177}
178
179if [[ $? -eq 0 && ! -z ${selection} ]]; then
180 if [[ "${enable_confirmation}" = true && \
181 ${menu_confirm} =~ (^|[[:space:]])"${selection}"($|[[:space:]]) ]]; then
182 ask_confirmation
183 else
184 i3-msg -q "exec ${menu[${selection}]}"
185 fi
186fi
diff --git a/dot_config/i3/scripts/executable_ppd-status b/dot_config/i3/scripts/executable_ppd-status
new file mode 100644
index 0000000..8e6eb7b
--- /dev/null
+++ b/dot_config/i3/scripts/executable_ppd-status
@@ -0,0 +1,11 @@
1#!/usr/bin/env bash
2#
3# power-profiles-daemon implementation:
4# needs package power-profiles-daemon installed and the service running see here:
5# https://wiki.archlinux.org/title/CPU_frequency_scaling#power-profiles-daemon
6# used in i3-blocks: ~/.config/i3/i3blocks.conf together with: ~/.config/i3/scripts/power-profiles
7
8# script to show current power profile
9
10current_profile=$(/usr/bin/powerprofilesctl get)
11echo "$current_profile"
diff --git a/dot_config/i3/scripts/executable_temperature b/dot_config/i3/scripts/executable_temperature
new file mode 100644
index 0000000..4e31610
--- /dev/null
+++ b/dot_config/i3/scripts/executable_temperature
@@ -0,0 +1,86 @@
1#!/usr/bin/env perl
2# Copyright 2014 Pierre Mavro <[email protected]>
3# Copyright 2014 Vivien Didelot <[email protected]>
4# Copyright 2014 Andreas Guldstrand <[email protected]>
5# Copyright 2014 Benjamin Chretien <chretien at lirmm dot fr>
6
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
11
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16
17# You should have received a copy of the GNU General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20# Edited by Andreas Lindlbauer <[email protected]>
21
22use strict;
23use warnings;
24use utf8;
25use Getopt::Long;
26
27binmode(STDOUT, ":utf8");
28
29# default values
30my $t_warn = $ENV{T_WARN} || 70;
31my $t_crit = $ENV{T_CRIT} || 90;
32my $chip = $ENV{SENSOR_CHIP} || "";
33my $temperature = -9999;
34my $label = "😀 ";
35
36sub help {
37 print "Usage: temperature [-w <warning>] [-c <critical>] [--chip <chip>]\n";
38 print "-w <percent>: warning threshold to become yellow\n";
39 print "-c <percent>: critical threshold to become red\n";
40 print "--chip <chip>: sensor chip\n";
41 exit 0;
42}
43
44GetOptions("help|h" => \&help,
45 "w=i" => \$t_warn,
46 "c=i" => \$t_crit,
47 "chip=s" => \$chip);
48
49# Get chip temperature
50open (SENSORS, "sensors -u $chip |") or die;
51while (<SENSORS>) {
52 if (/^\s+temp1_input:\s+[\+]*([\-]*\d+\.\d)/) {
53 $temperature = $1;
54 last;
55 }
56}
57close(SENSORS);
58
59$temperature eq -9999 and die 'Cannot find temperature';
60
61if ($temperature < 45) {
62 $label = '';
63} elsif ($temperature < 55) {
64 $label = '';
65} elsif ($temperature < 65) {
66 $label = '';
67} elsif ($temperature < 75) {
68 $label = '';
69} else {
70 $label = '';
71}
72# Print short_text, full_text
73print "${label}";
74print " $temperature°C\n";
75print "${label}";
76print " $temperature°C\n";
77
78# Print color, if needed
79if ($temperature >= $t_crit) {
80 print "#FF0000\n";
81 exit 33;
82} elsif ($temperature >= $t_warn) {
83 print "#FFFC00\n";
84}
85
86exit 0;
diff --git a/dot_config/i3/scripts/executable_volume b/dot_config/i3/scripts/executable_volume
new file mode 100644
index 0000000..39618e1
--- /dev/null
+++ b/dot_config/i3/scripts/executable_volume
@@ -0,0 +1,93 @@
1#!/usr/bin/env bash
2# Copyright (C) 2014 Julien Bonjean <[email protected]>
3# Copyright (C) 2014 Alexander Keller <[email protected]>
4
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14
15# You should have received a copy of the GNU General Public License
16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18# original source: https://github.com/vivien/i3blocks-contrib/tree/master/volume
19# check the readme: https://github.com/vivien/i3blocks-contrib/blob/master/volume/README.md
20#------------------------------------------------------------------------
21
22# The second parameter overrides the mixer selection
23# For PulseAudio users, eventually use "pulse"
24# For Jack/Jack2 users, use "jackplug"
25# For ALSA users, you may use "default" for your primary card
26# or you may use hw:# where # is the number of the card desired
27if [[ -z "$MIXER" ]] ; then
28 MIXER="default"
29 if command -v pulseaudio >/dev/null 2>&1 && pulseaudio --check ; then
30 # pulseaudio is running, but not all installations use "pulse"
31 if amixer -D pulse info >/dev/null 2>&1 ; then
32 MIXER="pulse"
33 fi
34 fi
35 [ -n "$(lsmod | grep jack)" ] && MIXER="jackplug"
36 MIXER="${2:-$MIXER}"
37fi
38
39# The instance option sets the control to report and configure
40# This defaults to the first control of your selected mixer
41# For a list of the available, use `amixer -D $Your_Mixer scontrols`
42if [[ -z "$SCONTROL" ]] ; then
43 SCONTROL="${BLOCK_INSTANCE:-$(amixer -D $MIXER scontrols |
44 sed -n "s/Simple mixer control '\([^']*\)',0/\1/p" |
45 head -n1
46 )}"
47fi
48
49# The first parameter sets the step to change the volume by (and units to display)
50# This may be in in % or dB (eg. 5% or 3dB)
51if [[ -z "$STEP" ]] ; then
52 STEP="${1:-5%}"
53fi
54
55# AMIXER(1):
56# "Use the mapped volume for evaluating the percentage representation like alsamixer, to be
57# more natural for human ear."
58NATURAL_MAPPING=${NATURAL_MAPPING:-0}
59if [[ "$NATURAL_MAPPING" != "0" ]] ; then
60 AMIXER_PARAMS="-M"
61fi
62
63#------------------------------------------------------------------------
64
65capability() { # Return "Capture" if the device is a capture device
66 amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL |
67 sed -n "s/ Capabilities:.*cvolume.*/Capture/p"
68}
69
70volume() {
71 amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL $(capability)
72}
73
74format() {
75
76 perl_filter='if (/.*\[(\d+%)\] (\[(-?\d+.\d+dB)\] )?\[(on|off)\]/)'
77 perl_filter+='{CORE::say $4 eq "off" ? "MUTE" : "'
78 # If dB was selected, print that instead
79 perl_filter+=$([[ $STEP = *dB ]] && echo '$3' || echo '$1')
80 perl_filter+='"; exit}'
81 output=$(perl -ne "$perl_filter")
82 echo "$LABEL$output"
83}
84
85#------------------------------------------------------------------------
86
87case $BLOCK_BUTTON in
88 3) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) toggle ;; # right click, mute/unmute
89 4) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}+ unmute ;; # scroll up, increase
90 5) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}- unmute ;; # scroll down, decrease
91esac
92
93volume | format
diff --git a/dot_config/i3/scripts/executable_vpn b/dot_config/i3/scripts/executable_vpn
new file mode 100644
index 0000000..a348f96
--- /dev/null
+++ b/dot_config/i3/scripts/executable_vpn
@@ -0,0 +1,25 @@
1#!/usr/bin/env bash
2#
3# Copyright (C) 2021 Andreas Lindlbauer
4# Licensed under the terms of EUPLv1.2.
5#
6# i3blocks blocklet script to monitor the (nord)vpn connection
7
8vpnstatus="📢"
9nordvpn_output=$(nordvpn status | cat -v | head -1 | sed -e 's/\^M-^M ^M//g' )
10if [ "${nordvpn_output}" = "Status: Connected" ]; then
11 vpnstatus="🥸"
12elif [ "${nordvpn_output}" = "A new version of NordVPN is available! Please update the application." ]; then
13 nordvpn_output=$(nordvpn status | cat -v | head -2 | tail -1 | sed -e 's/\^M-^M ^M//g' )
14 if [ "${nordvpn_output}" = "Status: Connected" ]; then
15 vpnstatus="🥴"
16 elif [ "${nordvpn_output}" = "Status: Disconnected" ]; then
17 vpnstatus="📢"
18 fi
19elif [ "${nordvpn_output}" = "Status: Disconnected" ]; then
20 vpnstatus="📢"
21elif [[ "$nordvpn_output" == *\/* ]] || [[ "$nordvpn_output" == *\\* ]]; then
22 vpnstatus="Something's very wrong"
23fi
24
25echo "$vpnstatus"
diff --git a/dot_config/i3/scripts/executable_worldclock b/dot_config/i3/scripts/executable_worldclock
new file mode 100644
index 0000000..573800e
--- /dev/null
+++ b/dot_config/i3/scripts/executable_worldclock
@@ -0,0 +1,122 @@
1#!/usr/bin/env bash
2#
3# Use rofi/zenity to display world clock.
4#
5# Note: this currently relies on associative array support in the shell.
6#
7# Inspired from i3pystatus wiki:
8# https://github.com/enkore/i3pystatus/wiki/Shutdown-Menu
9#
10# Copyright 2022 Jinwei Zhao <i at jinwei dot me>
11#
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by
14# the Free Software Foundation, either version 3 of the License, or
15# (at your option) any later version.
16
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21
22# You should have received a copy of the GNU General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24
25# modified to work with latest rofi update by joekamprad <[email protected]>
26
27#######################################################################
28# BEGIN CONFIG #
29#######################################################################
30
31# Colors: FG (foreground), BG (background), HL (highlighted)
32FG_COLOR="#bbbbbb"
33BG_COLOR="#111111"
34HLFG_COLOR="#111111"
35HLBG_COLOR="#bbbbbb"
36BORDER_COLOR="#222222"
37
38# Options not related to colors (most rofi options do not work anymore)
39ROFI_OPTIONS=(-theme ~/.config/rofi/worldclock.rasi)
40
41#######################################################################
42# END CONFIG #
43#######################################################################
44
45# Preferred launcher if both are available
46preferred_launcher="rofi"
47
48# Check whether the user-defined launcher is valid
49launcher_list=(rofi)
50function check_launcher() {
51 if [[ ! "${launcher_list[@]}" =~ (^|[[:space:]])"$1"($|[[:space:]]) ]]; then
52 echo "Supported launchers: ${launcher_list[*]}"
53 exit 1
54 else
55 # Get array with unique elements and preferred launcher first
56 # Note: uniq expects a sorted list, so we cannot use it
57 i=1
58 launcher_list=($(for l in "$1" "${launcher_list[@]}"; do printf "%i %s\n" "$i" "$l"; let i+=1; done \
59 | sort -uk2 | sort -nk1 | cut -d' ' -f2- | tr '\n' ' '))
60 fi
61}
62
63# Parse CLI arguments
64while getopts "hcp:" option; do
65 case "${option}" in
66 p) preferred_launcher="${OPTARG}"
67 check_launcher "${preferred_launcher}"
68 ;;
69 *) exit 1
70 ;;
71 esac
72done
73
74# Check whether a command exists
75function command_exists() {
76 command -v "$1" &> /dev/null 2>&1
77}
78
79# menu defined as an associative array
80typeset -A menu
81
82menu=(
83 [🇨🇦: `date '+%b %d %H:%M'`]=""
84 [🇬🇧: `TZ=Europe/London date '+%b %d %H:%M'`]=""
85 [🇨🇳: `TZ=Asia/Shanghai date '+%b %d %H:%M'`]=""
86)
87
88menu_nrows=${#menu[@]}
89
90launcher_exe=""
91launcher_options=""
92rofi_colors=""
93
94function prepare_launcher() {
95 if [[ "$1" == "rofi" ]]; then
96 rofi_colors=(-bc "${BORDER_COLOR}" -bg "${BG_COLOR}" -fg "${FG_COLOR}" \
97 -hlfg "${HLFG_COLOR}" -hlbg "${HLBG_COLOR}")
98 launcher_exe="rofi"
99 launcher_options=(-dmenu -i -lines "${menu_nrows}" -p "${ROFI_TEXT}" \
100 "${rofi_colors}" "${ROFI_OPTIONS[@]}")
101 elif [[ "$1" == "zenity" ]]; then
102 launcher_exe="zenity"
103 launcher_options=(--list --title="${ZENITY_TITLE}" --text="${ZENITY_TEXT}" \
104 "${ZENITY_OPTIONS[@]}")
105 fi
106}
107
108for l in "${launcher_list[@]}"; do
109 if command_exists "${l}" ; then
110 prepare_launcher "${l}"
111 break
112 fi
113done
114
115# No launcher available
116if [[ -z "${launcher_exe}" ]]; then
117 exit 1
118fi
119
120launcher=(${launcher_exe} "${launcher_options[@]}")
121printf '%s\n' "${!menu[@]}" | sort | "${launcher[@]}"
122
diff --git a/dot_config/picom.conf b/dot_config/picom.conf
new file mode 100644
index 0000000..2ec14a9
--- /dev/null
+++ b/dot_config/picom.conf
@@ -0,0 +1,230 @@
1# Thank you code_nomad: http://9m.no/ꪯ鵞
2# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton
3# and picom Github: https://github.com/yshui/picom
4#################################
5#
6# Backend
7#
8#################################
9
10# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
11# `xrender` is the default one.
12# GLX backend is typically much faster but depends on a sane driver.
13#backend = "xrender";
14backend = "glx";
15#backend = "xr_glx_hybrid"
16
17#################################
18#
19# GLX backend
20#
21#################################
22
23# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
24# Might cause incorrect opacity when rendering transparent content (but never
25# practically happened) and may not work with blur-background.
26# My tests show a 15% performance boost. Recommended.
27glx-no-stencil = true;
28
29# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
30# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
31# May break VSync and is not available on some drivers.
32# glx-use-copysubbuffermesa = true;
33
34# GLX backend: Avoid rebinding pixmap on window damage.
35# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
36# Recommended if it works.
37# glx-no-rebind-pixmap = true;
38
39# Disable the use of damage information.
40# This cause the whole screen to be redrawn everytime, instead of the part of the screen
41# has actually changed. Potentially degrades the performance, but might fix some artifacts.
42# The opposing option is use-damage
43# no-use-damage = false
44# use-damage = true;
45
46# Use X Sync fence to sync clients' draw calls, to make sure all draw
47# calls are finished before picom starts drawing. Needed on nvidia-drivers
48# with GLX backend for some users.
49xrender-sync-fence = false;
50
51# GLX backend: GLX buffer swap method we assume.
52# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
53# undefined is the slowest and the safest, and the default value.
54# copy is fastest, but may fail on some drivers,
55# 2-6 are gradually slower but safer (6 is still faster than 0).
56# Usually, double buffer means 2, triple buffer means 3.
57# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
58# Useless with --glx-use-copysubbuffermesa.
59# Partially breaks --resize-damage.
60# Defaults to undefined.
61#glx-swap-method = "undefined";
62
63#################################
64#
65# Shadows
66#
67#################################
68
69# Enabled client-side shadows on windows.
70shadow = false;
71# The blur radius for shadows. (default 12)
72shadow-radius = 5;
73# The left offset for shadows. (default -15)
74shadow-offset-x = -5;
75# The top offset for shadows. (default -15)
76shadow-offset-y = -5;
77# The translucency for shadows. (default .75)
78shadow-opacity = 0.5;
79
80# Set if you want different colour shadows
81# shadow-red = 0.0;
82# shadow-green = 0.0;
83# shadow-blue = 0.0;
84
85# The shadow exclude options are helpful if you have shadows enabled. Due to the way picom draws its shadows, certain applications will have visual glitches
86# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
87# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
88shadow-exclude = [
89 "! name~=''",
90 "name = 'Notification'",
91 "name = 'Plank'",
92 "name = 'Docky'",
93 "name = 'Kupfer'",
94 "name = 'xfce4-notifyd'",
95 "name *= 'VLC'",
96 "name *= 'compton'",
97 "name *= 'picom'",
98 "name *= 'Chromium'",
99 "name *= 'Chrome'",
100 "class_g = 'Conky'",
101 "class_g = 'Kupfer'",
102 "class_g = 'Synapse'",
103 "class_g ?= 'Notify-osd'",
104 "class_g ?= 'Cairo-dock'",
105 "class_g ?= 'Xfce4-notifyd'",
106 "class_g ?= 'Xfce4-power-manager'",
107 "(class_g = 'firefox' || class_g = 'Thunderbird') && (window_type = 'utility' || window_type = 'popup_menu') && argb",
108 "_GTK_FRAME_EXTENTS@:c",
109 "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
110 "_NET_WM_WINDOW_TYPE:a *= '_KDE_NET_WM_WINDOW_TYPE_OVERRIDE'"
111];
112
113# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
114shadow-ignore-shaped = false;
115
116#################################
117#
118# Opacity
119#
120#################################
121
122inactive-opacity = 1;
123active-opacity = 1;
124frame-opacity = 1;
125inactive-opacity-override = false;
126
127# Dim inactive windows. (0.0 - 1.0)
128# inactive-dim = 0.2;
129# Do not let dimness adjust based on window opacity.
130# inactive-dim-fixed = true;
131# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
132# blur-background = true;
133# Blur background of opaque windows with transparent frames as well.
134# blur-background-frame = true;
135# Do not let blur radius adjust based on window opacity.
136blur-background-fixed = false;
137blur-background-exclude = [
138 "window_type = 'dock'",
139 "window_type = 'desktop'"
140];
141
142#################################
143#
144# Fading
145#
146#################################
147
148# Fade windows during opacity changes.
149fading = true;
150# The time between steps in a fade in milliseconds. (default 10).
151fade-delta = 4;
152# Opacity change between steps while fading in. (default 0.028).
153fade-in-step = 0.03;
154# Opacity change between steps while fading out. (default 0.03).
155fade-out-step = 0.03;
156# Fade windows in/out when opening/closing
157# no-fading-openclose = true;
158
159# Specify a list of conditions of windows that should not be faded.
160fade-exclude = [ ];
161
162#################################
163#
164# Other
165#
166#################################
167
168# Try to detect WM windows and mark them as active.
169mark-wmwin-focused = true;
170# Mark all non-WM but override-redirect windows active (e.g. menus).
171mark-ovredir-focused = true;
172# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
173# Usually more reliable but depends on a EWMH-compliant WM.
174use-ewmh-active-win = true;
175# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
176detect-rounded-corners = true;
177
178# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
179# This prevents opacity being ignored for some apps.
180# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
181detect-client-opacity = true;
182
183# Specify refresh rate of the screen.
184# If not specified or 0, picom will try detecting this with X RandR extension.
185refresh-rate = 0;
186
187# Vertical synchronization: match the refresh rate of the monitor
188# Enable/disable VSync.
189#vsync = false; (fixes screen tearing in browsers if true)
190vsync = true;
191
192# Limit picom to repaint at most once every 1 / refresh_rate second to boost performance.
193# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
194# unless you wish to specify a lower refresh rate than the actual value.
195#sw-opti = true;
196
197# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
198# Known to cause flickering when redirecting/unredirecting windows.
199# unredir-if-possible = false; (fullscreen games behave better if true)
200unredir-if-possible = false;
201
202# Specify a list of conditions of windows that should always be considered focused.
203focus-exclude = [ ];
204
205# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
206detect-transient = true;
207# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
208# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
209detect-client-leader = true;
210
211#################################
212#
213# Window type settings
214#
215#################################
216
217wintypes:
218{
219 tooltip =
220 {
221 # fade: Fade the particular type of windows.
222 fade = true;
223 # shadow: Give those windows shadow
224 shadow = false;
225 # opacity: Default opacity for the type of windows.
226 opacity = 0.85;
227 # focus: Whether to always consider windows of this type focused.
228 focus = true;
229 };
230};
diff --git a/dot_config/rofi/arc_dark_colors.rasi b/dot_config/rofi/arc_dark_colors.rasi
new file mode 100644
index 0000000..fdf4418
--- /dev/null
+++ b/dot_config/rofi/arc_dark_colors.rasi
@@ -0,0 +1,34 @@
1/*******************************************************
2 * ROFI Arc Dark colors for EndeavourOS
3 * Maintainer: joekamprad <[email protected]>
4 *******************************************************/
5* {
6 selected-normal-foreground: rgba ( 249, 249, 249, 100 % );
7 foreground: rgba ( 196, 203, 212, 100 % );
8 normal-foreground: @foreground;
9 alternate-normal-background: rgba ( 64, 69, 82, 59 % );
10 red: rgba ( 220, 50, 47, 100 % );
11 selected-urgent-foreground: rgba ( 249, 249, 249, 100 % );
12 blue: rgba ( 38, 139, 210, 100 % );
13 urgent-foreground: rgba ( 204, 102, 102, 100 % );
14 alternate-urgent-background: rgba ( 75, 81, 96, 90 % );
15 active-foreground: rgba ( 101, 172, 255, 100 % );
16 lightbg: rgba ( 238, 232, 213, 100 % );
17 selected-active-foreground: rgba ( 249, 249, 249, 100 % );
18 alternate-active-background: rgba ( 75, 81, 96, 89 % );
19 background: rgba ( 45, 48, 59, 95 % );
20 alternate-normal-foreground: @foreground;
21 normal-background: @background;
22 lightfg: rgba ( 88, 104, 117, 100 % );
23 selected-normal-background: rgba ( 64, 132, 214, 100 % );
24 border-color: rgba ( 124, 131, 137, 100 % );
25 spacing: 2;
26 separatorcolor: rgba ( 29, 31, 33, 100 % );
27 urgent-background: rgba ( 29, 31, 33, 17 % );
28 selected-urgent-background: rgba ( 165, 66, 66, 100 % );
29 alternate-urgent-foreground: @urgent-foreground;
30 background-color: rgba ( 0, 0, 0, 0 % );
31 alternate-active-foreground: @active-foreground;
32 active-background: rgba ( 29, 31, 33, 17 % );
33 selected-active-background: rgba ( 68, 145, 237, 100 % );
34}
diff --git a/dot_config/rofi/arc_dark_transparent_colors.rasi b/dot_config/rofi/arc_dark_transparent_colors.rasi
new file mode 100644
index 0000000..4dc8195
--- /dev/null
+++ b/dot_config/rofi/arc_dark_transparent_colors.rasi
@@ -0,0 +1,34 @@
1/*******************************************************
2 * ROFI Arch Dark Transparent colors for EndeavourOS
3 * Maintainer: joekamprad <[email protected]>
4 *******************************************************/
5* {
6 selected-normal-foreground: rgba ( 255, 147, 5, 100 % );
7 foreground: rgba ( 196, 203, 212, 100 % );
8 normal-foreground: @foreground;
9 alternate-normal-background: rgba ( 45, 48, 59, 1 % );
10 red: rgba ( 220, 50, 47, 100 % );
11 selected-urgent-foreground: rgba ( 249, 249, 249, 100 % );
12 blue: rgba ( 38, 139, 210, 100 % );
13 urgent-foreground: rgba ( 204, 102, 102, 100 % );
14 alternate-urgent-background: rgba ( 75, 81, 96, 90 % );
15 active-foreground: rgba ( 101, 172, 255, 100 % );
16 lightbg: rgba ( 238, 232, 213, 100 % );
17 selected-active-foreground: rgba ( 249, 249, 249, 100 % );
18 alternate-active-background: rgba ( 45, 48, 59, 88 % );
19 background: rgba ( 45, 48, 59, 88 % );
20 alternate-normal-foreground: @foreground;
21 normal-background: rgba ( 45, 48, 59, 1 % );
22 lightfg: rgba ( 88, 104, 117, 100 % );
23 selected-normal-background: rgba ( 24, 26, 32, 100 % );
24 border-color: rgba ( 124, 131, 137, 100 % );
25 spacing: 2;
26 separatorcolor: rgba ( 45, 48, 59, 1 % );
27 urgent-background: rgba ( 45, 48, 59, 15 % );
28 selected-urgent-background: rgba ( 165, 66, 66, 100 % );
29 alternate-urgent-foreground: @urgent-foreground;
30 background-color: rgba ( 0, 0, 0, 0 % );
31 alternate-active-foreground: @active-foreground;
32 active-background: rgba ( 29, 31, 33, 17 % );
33 selected-active-background: rgba ( 26, 28, 35, 100 % );
34}
diff --git a/dot_config/rofi/power-profiles.rasi b/dot_config/rofi/power-profiles.rasi
new file mode 100644
index 0000000..f81cf72
--- /dev/null
+++ b/dot_config/rofi/power-profiles.rasi
@@ -0,0 +1,121 @@
1/*******************************************************
2 * ROFI configs i3 powermenu for EndeavourOS
3 * Maintainer: joekamprad <[email protected]>
4 *******************************************************/
5configuration {
6 font: "Noto Sans Regular 10";
7 show-icons: false;
8 icon-theme: "Qogir";
9 scroll-method: 0;
10 disable-history: false;
11 fullscreen: false;
12 hide-scrollbar: true;
13 sidebar-mode: false;
14}
15
16@import "~/.config/rofi/arc_dark_colors.rasi"
17
18
19window {
20 background-color: @background;
21 border: 0;
22 padding: 10;
23 transparency: "real";
24 width: 170px;
25 location: east;
26 /*y-offset: 18;*/
27 /*x-offset: 850;*/
28}
29listview {
30 lines: 4;
31 columns: 1;
32}
33element {
34 border: 0;
35 padding: 1px;
36}
37element-text {
38 background-color: inherit;
39 text-color: inherit;
40}
41element.normal.normal {
42 background-color: @normal-background;
43 text-color: @normal-foreground;
44}
45element.normal.urgent {
46 background-color: @urgent-background;
47 text-color: @urgent-foreground;
48}
49element.normal.active {
50 background-color: @active-background;
51 text-color: @active-foreground;
52}
53element.selected.normal {
54 background-color: @selected-normal-background;
55 text-color: @selected-normal-foreground;
56}
57element.selected.urgent {
58 background-color: @selected-urgent-background;
59 text-color: @selected-urgent-foreground;
60}
61element.selected.active {
62 background-color: @selected-active-background;
63 text-color: @selected-active-foreground;
64}
65element.alternate.normal {
66 background-color: @alternate-normal-background;
67 text-color: @alternate-normal-foreground;
68}
69element.alternate.urgent {
70 background-color: @alternate-urgent-background;
71 text-color: @alternate-urgent-foreground;
72}
73element.alternate.active {
74 background-color: @alternate-active-background;
75 text-color: @alternate-active-foreground;
76}
77scrollbar {
78 width: 4px;
79 border: 0;
80 handle-color: @normal-foreground;
81 handle-width: 8px;
82 padding: 0;
83}
84mode-switcher {
85 border: 2px 0px 0px;
86 border-color: @separatorcolor;
87}
88button {
89 spacing: 0;
90 text-color: @normal-foreground;
91}
92button.selected {
93 background-color: @selected-normal-background;
94 text-color: @selected-normal-foreground;
95}
96inputbar {
97 spacing: 0;
98 text-color: @normal-foreground;
99 padding: 1px;
100}
101case-indicator {
102 spacing: 0;
103 text-color: @normal-foreground;
104}
105entry {
106 spacing: 0;
107 text-color: @normal-foreground;
108}
109prompt {
110 spacing: 0;
111 text-color: @normal-foreground;
112}
113inputbar {
114 children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
115}
116textbox-prompt-colon {
117 expand: false;
118 str: "Set Power Profile:";
119 margin: 0px 0.3em 0em 0em;
120 text-color: @normal-foreground;
121}
diff --git a/dot_config/rofi/powermenu.rasi b/dot_config/rofi/powermenu.rasi
new file mode 100644
index 0000000..a0375a5
--- /dev/null
+++ b/dot_config/rofi/powermenu.rasi
@@ -0,0 +1,120 @@
1/*******************************************************
2 * ROFI configs i3 powermenu for EndeavourOS
3 * Maintainer: joekamprad <[email protected]>
4 *******************************************************/
5configuration {
6 font: "Noto Sans Regular 10";
7 show-icons: false;
8 icon-theme: "Qogir";
9 scroll-method: 0;
10 disable-history: false;
11 sidebar-mode: false;
12}
13
14@import "~/.config/rofi/arc_dark_transparent_colors.rasi"
15
16window {
17 background-color: @background;
18 border: 0;
19 padding: 10;
20 transparency: "real";
21 width: 120px;
22 location: east;
23 /*y-offset: 18;*/
24 /*x-offset: 850;*/
25}
26listview {
27 lines: 6;
28 columns: 1;
29 scrollbar: false;
30}
31element {
32 border: 0;
33 padding: 1px;
34}
35element-text {
36 background-color: inherit;
37 text-color: inherit;
38}
39element.normal.normal {
40 background-color: @normal-background;
41 text-color: @normal-foreground;
42}
43element.normal.urgent {
44 background-color: @urgent-background;
45 text-color: @urgent-foreground;
46}
47element.normal.active {
48 background-color: @active-background;
49 text-color: @active-foreground;
50}
51element.selected.normal {
52 background-color: @selected-normal-background;
53 text-color: @selected-normal-foreground;
54}
55element.selected.urgent {
56 background-color: @selected-urgent-background;
57 text-color: @selected-urgent-foreground;
58}
59element.selected.active {
60 background-color: @selected-active-background;
61 text-color: @selected-active-foreground;
62}
63element.alternate.normal {
64 background-color: @alternate-normal-background;
65 text-color: @alternate-normal-foreground;
66}
67element.alternate.urgent {
68 background-color: @alternate-urgent-background;
69 text-color: @alternate-urgent-foreground;
70}
71element.alternate.active {
72 background-color: @alternate-active-background;
73 text-color: @alternate-active-foreground;
74}
75scrollbar {
76 width: 4px;
77 border: 0;
78 handle-color: @normal-foreground;
79 handle-width: 8px;
80 padding: 0;
81}
82mode-switcher {
83 border: 2px 0px 0px;
84 border-color: @separatorcolor;
85}
86button {
87 spacing: 0;
88 text-color: @normal-foreground;
89}
90button.selected {
91 background-color: @selected-normal-background;
92 text-color: @selected-normal-foreground;
93}
94inputbar {
95 spacing: 0;
96 text-color: @normal-foreground;
97 padding: 1px;
98}
99case-indicator {
100 spacing: 0;
101 text-color: @normal-foreground;
102}
103entry {
104 spacing: 0;
105 text-color: @normal-foreground;
106}
107prompt {
108 spacing: 0;
109 text-color: @normal-foreground;
110}
111inputbar {
112 children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
113}
114textbox-prompt-colon {
115 expand: false;
116 str: ":";
117 margin: 0px 0.3em 0em 0em;
118 text-color: @normal-foreground;
119}
120
diff --git a/dot_config/rofi/rofidmenu.rasi b/dot_config/rofi/rofidmenu.rasi
new file mode 100644
index 0000000..675255f
--- /dev/null
+++ b/dot_config/rofi/rofidmenu.rasi
@@ -0,0 +1,135 @@
1/*******************************************************
2 * ROFI configs i3 Apps menu for EndeavourOS
3 * Maintainer: joekamprad <[email protected]>
4 *******************************************************/
5configuration {
6 font: "Noto Sans Regular 16";
7 show-icons: true;
8 icon-theme: "Qogir";
9 display-drun: "Apps";
10 drun-display-format: "{name}";
11 scroll-method: 0;
12 disable-history: false;
13 sidebar-mode: false;
14}
15
16@import "~/.config/rofi/arc_dark_transparent_colors.rasi"
17
18window {
19 background-color: @background;
20 border: 0;
21 padding: 30;
22}
23listview {
24 lines: 10;
25 columns: 3;
26}
27mainbox {
28 border: 0;
29 padding: 0;
30}
31message {
32 border: 2px 0px 0px;
33 border-color: @separatorcolor;
34 padding: 1px;
35}
36textbox {
37 text-color: @foreground;
38}
39listview {
40 fixed-height: 0;
41 border: 8px 0px 0px;
42 border-color: @separatorcolor;
43 spacing: 8px;
44 scrollbar: false;
45 padding: 2px 0px 0px;
46}
47element {
48 border: 0;
49 padding: 1px;
50}
51element-text {
52 background-color: inherit;
53 text-color: inherit;
54}
55element.normal.normal {
56 background-color: @normal-background;
57 text-color: @normal-foreground;
58}
59element.normal.urgent {
60 background-color: @urgent-background;
61 text-color: @urgent-foreground;
62}
63element.normal.active {
64 background-color: @active-background;
65 text-color: @active-foreground;
66}
67element.selected.normal {
68 background-color: @selected-normal-background;
69 text-color: @selected-normal-foreground;
70}
71element.selected.urgent {
72 background-color: @selected-urgent-background;
73 text-color: @selected-urgent-foreground;
74}
75element.selected.active {
76 background-color: @selected-active-background;
77 text-color: @selected-active-foreground;
78}
79element.alternate.normal {
80 background-color: @alternate-normal-background;
81 text-color: @alternate-normal-foreground;
82}
83element.alternate.urgent {
84 background-color: @alternate-urgent-background;
85 text-color: @alternate-urgent-foreground;
86}
87element.alternate.active {
88 background-color: @alternate-active-background;
89 text-color: @alternate-active-foreground;
90}
91scrollbar {
92 width: 4px;
93 border: 0;
94 handle-color: @normal-foreground;
95 handle-width: 8px;
96 padding: 0;
97}
98mode-switcher {
99 border: 2px 0px 0px;
100 border-color: @separatorcolor;
101}
102button {
103 spacing: 0;
104 text-color: @normal-foreground;
105}
106button.selected {
107 background-color: @selected-normal-background;
108 text-color: @selected-normal-foreground;
109}
110inputbar {
111 spacing: 0;
112 text-color: @normal-foreground;
113 padding: 1px;
114}
115case-indicator {
116 spacing: 0;
117 text-color: @normal-foreground;
118}
119entry {
120 spacing: 0;
121 text-color: @normal-foreground;
122}
123prompt {
124 spacing: 0;
125 text-color: @normal-foreground;
126}
127inputbar {
128 children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
129}
130textbox-prompt-colon {
131 expand: false;
132 str: ":";
133 margin: 0px 0.3em 0em 0em;
134 text-color: @normal-foreground;
135}
diff --git a/dot_config/rofi/rofikeyhint.rasi b/dot_config/rofi/rofikeyhint.rasi
new file mode 100644
index 0000000..d2685d3
--- /dev/null
+++ b/dot_config/rofi/rofikeyhint.rasi
@@ -0,0 +1,137 @@
1/*******************************************************
2 * ROFI configs i3 keyhint-menu for EndeavourOS
3 * Maintainer: joekamprad <[email protected]>
4 *******************************************************/
5configuration {
6 font: "Noto Sans Regular 10";
7 show-icons: false;
8 icon-theme: "Qogir";
9 display-drun: "KeyHint";
10 drun-display-format: "{name}";
11 scroll-method: 0;
12 disable-history: false;
13 fullscreen: false;
14 hide-scrollbar: true;
15 sidebar-mode: false;
16}
17
18@import "~/.config/rofi/arc_dark_transparent_colors.rasi"
19
20window {
21 background-color: @background;
22 border: 0;
23 padding: 30;
24}
25listview {
26 lines: 10;
27 columns: 1;
28}
29mainbox {
30 border: 0;
31 padding: 0;
32}
33message {
34 border: 2px 0px 0px;
35 border-color: @separatorcolor;
36 padding: 1px;
37}
38textbox {
39 text-color: @foreground;
40}
41listview {
42 fixed-height: 0;
43 border: 8px 0px 0px;
44 border-color: @separatorcolor;
45 spacing: 8px;
46 scrollbar: false;
47 padding: 2px 0px 0px;
48}
49element {
50 border: 0;
51 padding: 1px;
52}
53element-text {
54 background-color: inherit;
55 text-color: inherit;
56}
57element.normal.normal {
58 background-color: @normal-background;
59 text-color: @normal-foreground;
60}
61element.normal.urgent {
62 background-color: @urgent-background;
63 text-color: @urgent-foreground;
64}
65element.normal.active {
66 background-color: @active-background;
67 text-color: @active-foreground;
68}
69element.selected.normal {
70 background-color: @selected-normal-background;
71 text-color: @selected-normal-foreground;
72}
73element.selected.urgent {
74 background-color: @selected-urgent-background;
75 text-color: @selected-urgent-foreground;
76}
77element.selected.active {
78 background-color: @selected-active-background;
79 text-color: @selected-active-foreground;
80}
81element.alternate.normal {
82 background-color: @alternate-normal-background;
83 text-color: @alternate-normal-foreground;
84}
85element.alternate.urgent {
86 background-color: @alternate-urgent-background;
87 text-color: @alternate-urgent-foreground;
88}
89element.alternate.active {
90 background-color: @alternate-active-background;
91 text-color: @alternate-active-foreground;
92}
93scrollbar {
94 width: 4px;
95 border: 0;
96 handle-color: @normal-foreground;
97 handle-width: 8px;
98 padding: 0;
99}
100mode-switcher {
101 border: 2px 0px 0px;
102 border-color: @separatorcolor;
103}
104button {
105 spacing: 0;
106 text-color: @normal-foreground;
107}
108button.selected {
109 background-color: @selected-normal-background;
110 text-color: @selected-normal-foreground;
111}
112inputbar {
113 spacing: 0;
114 text-color: @normal-foreground;
115 padding: 1px;
116}
117case-indicator {
118 spacing: 0;
119 text-color: @normal-foreground;
120}
121entry {
122 spacing: 0;
123 text-color: @normal-foreground;
124}
125prompt {
126 spacing: 0;
127 text-color: @normal-foreground;
128}
129inputbar {
130 children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
131}
132textbox-prompt-colon {
133 expand: false;
134 str: ":";
135 margin: 0px 0.3em 0em 0em;
136 text-color: @normal-foreground;
137}
diff --git a/dot_config/rofi/worldclock.rasi b/dot_config/rofi/worldclock.rasi
new file mode 100644
index 0000000..90046a1
--- /dev/null
+++ b/dot_config/rofi/worldclock.rasi
@@ -0,0 +1,120 @@
1/*******************************************************
2 * ROFI configs i3 powermenu for EndeavourOS
3 * Maintainer: joekamprad <[email protected]>
4 *******************************************************/
5configuration {
6 font: "Noto Sans Regular 10";
7 show-icons: false;
8 icon-theme: "Qogir";
9 scroll-method: 0;
10 disable-history: false;
11 sidebar-mode: false;
12}
13
14@import "~/.config/rofi/arc_dark_transparent_colors.rasi"
15
16window {
17 background-color: @background;
18 border: 0;
19 padding: 10;
20 transparency: "real";
21 width: 150px;
22 location: east;
23 /*y-offset: 18;*/
24 /*x-offset: 850;*/
25}
26listview {
27 lines: 6;
28 columns: 1;
29 scrollbar: false;
30}
31element {
32 border: 0;
33 padding: 1px;
34}
35element-text {
36 background-color: inherit;
37 text-color: inherit;
38}
39element.normal.normal {
40 background-color: @normal-background;
41 text-color: @normal-foreground;
42}
43element.normal.urgent {
44 background-color: @urgent-background;
45 text-color: @urgent-foreground;
46}
47element.normal.active {
48 background-color: @active-background;
49 text-color: @active-foreground;
50}
51element.selected.normal {
52 background-color: @selected-normal-background;
53 text-color: @selected-normal-foreground;
54}
55element.selected.urgent {
56 background-color: @selected-urgent-background;
57 text-color: @selected-urgent-foreground;
58}
59element.selected.active {
60 background-color: @selected-active-background;
61 text-color: @selected-active-foreground;
62}
63element.alternate.normal {
64 background-color: @alternate-normal-background;
65 text-color: @alternate-normal-foreground;
66}
67element.alternate.urgent {
68 background-color: @alternate-urgent-background;
69 text-color: @alternate-urgent-foreground;
70}
71element.alternate.active {
72 background-color: @alternate-active-background;
73 text-color: @alternate-active-foreground;
74}
75scrollbar {
76 width: 4px;
77 border: 0;
78 handle-color: @normal-foreground;
79 handle-width: 8px;
80 padding: 0;
81}
82mode-switcher {
83 border: 2px 0px 0px;
84 border-color: @separatorcolor;
85}
86button {
87 spacing: 0;
88 text-color: @normal-foreground;
89}
90button.selected {
91 background-color: @selected-normal-background;
92 text-color: @selected-normal-foreground;
93}
94inputbar {
95 spacing: 0;
96 text-color: @normal-foreground;
97 padding: 1px;
98}
99case-indicator {
100 spacing: 0;
101 text-color: @normal-foreground;
102}
103entry {
104 spacing: 0;
105 text-color: @normal-foreground;
106}
107prompt {
108 spacing: 0;
109 text-color: @normal-foreground;
110}
111inputbar {
112 children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
113}
114textbox-prompt-colon {
115 expand: false;
116 str: ":";
117 margin: 0px 0.3em 0em 0em;
118 text-color: @normal-foreground;
119}
120
diff --git a/dot_config/xfce4/terminal/terminalrc b/dot_config/xfce4/terminal/terminalrc
new file mode 100644
index 0000000..62f54ea
--- /dev/null
+++ b/dot_config/xfce4/terminal/terminalrc
@@ -0,0 +1,44 @@
1[Configuration]
2MiscAlwaysShowTabs=FALSE
3MiscBell=FALSE
4MiscBordersDefault=TRUE
5MiscCursorBlinks=FALSE
6MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK
7MiscDefaultGeometry=80x24
8MiscInheritGeometry=FALSE
9MiscMenubarDefault=FALSE
10MiscMouseAutohide=FALSE
11MiscToolbarDefault=FALSE
12MiscConfirmClose=TRUE
13MiscCycleTabs=TRUE
14MiscTabCloseButtons=TRUE
15MiscTabCloseMiddleClick=TRUE
16MiscTabPosition=GTK_POS_TOP
17MiscHighlightUrls=TRUE
18ScrollingLines=999999
19BackgroundDarkness=0.840000
20FontName=Source Code Pro 18
21TitleMode=TERMINAL_TITLE_REPLACE
22ColorForeground=#e3e3ea
23ColorBackground=#08052b
24MiscBellUrgent=FALSE
25MiscMouseWheelZoom=TRUE
26MiscMiddleClickOpensUri=FALSE
27MiscCopyOnSelect=FALSE
28MiscShowRelaunchDialog=TRUE
29MiscRewrapOnResize=TRUE
30MiscUseShiftArrowsToScroll=FALSE
31MiscSlimTabs=FALSE
32MiscNewTabAdjacent=FALSE
33MiscSearchDialogOpacity=100
34MiscShowUnsafePasteDialog=TRUE
35MiscRightClickAction=TERMINAL_RIGHT_CLICK_ACTION_CONTEXT_MENU
36ScrollingUnlimited=TRUE
37ColorCursorForeground=#FFFFFF
38ColorCursor=#ff7f7f
39ColorCursorUseDefault=FALSE
40ColorBold=#7fbaff
41ColorPalette=rgb(8,5,43);rgb(255,127,127);rgb(71,179,93);rgb(204,57,128);rgb(127,186,255);rgb(127,63,191);rgb(127,127,255);rgb(205,204,219);rgb(127,186,255);rgb(255,127,127);rgb(153,153,204);rgb(255,127,127);rgb(127,127,255);rgb(127,63,191);rgb(127,127,255);rgb(227,227,234)
42ColorBoldIsBright=FALSE
43TabActivityColor=#47B35D
44
diff --git a/dot_fzf.zsh b/dot_fzf.zsh
new file mode 100644
index 0000000..f8035d9
--- /dev/null
+++ b/dot_fzf.zsh
@@ -0,0 +1,14 @@
1# Setup fzf
2# ---------
3if [[ ! "$PATH" == *${FZF_PATH}/bin* ]]; then
4 export PATH="$PATH:${FZF_PATH}/bin"
5fi
6
7# Auto-completion
8# ---------------
9[[ $- == *i* ]] && source "${FZF_PATH}/shell/completion.zsh" 2> /dev/null
10
11# Key bindings
12# ------------
13source "${FZF_PATH}/shell/key-bindings.zsh"
14
diff --git a/dot_gitconfig b/dot_gitconfig
new file mode 100644
index 0000000..b7eae45
--- /dev/null
+++ b/dot_gitconfig
@@ -0,0 +1,3 @@
1[user]
2 name = clarkzjw
3 email = [email protected]
diff --git a/dot_nanorc b/dot_nanorc
new file mode 100644
index 0000000..0108a07
--- /dev/null
+++ b/dot_nanorc
@@ -0,0 +1,2 @@
1include /usr/share/nano/*.nanorc
2include /usr/share/nano-syntax-highlighting/*.nanorc
diff --git a/dot_profile b/dot_profile
new file mode 100644
index 0000000..8c1f0ab
--- /dev/null
+++ b/dot_profile
@@ -0,0 +1,9 @@
1export TERMINAL=xfce4-terminal
2#export QT_QPA_PLATFORMTHEME=qt5ct
3#export QT_QPA_PLATFORMTHEME=qt6ct
4#export GDK_SCALE=2
5#export QT_AUTO_SCREEN_SCALE_FACTOR=2
6
7# Added by Toolbox App
8export PATH="$PATH:/home/clarkzjw/.local/share/JetBrains/Toolbox/scripts"
9
diff --git a/dot_screenlayout/private_executable_monitor.sh b/dot_screenlayout/private_executable_monitor.sh
new file mode 100644
index 0000000..c7940ce
--- /dev/null
+++ b/dot_screenlayout/private_executable_monitor.sh
@@ -0,0 +1,2 @@
1#!/bin/sh
2xrandr --output eDP-1 --primary --mode 2256x1504 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output DP-4 --off
diff --git a/dot_spacemacs b/dot_spacemacs
new file mode 100644
index 0000000..0efe7db
--- /dev/null
+++ b/dot_spacemacs
@@ -0,0 +1,570 @@
1;; -*- mode: emacs-lisp; lexical-binding: t -*-
2;; This file is loaded by Spacemacs at startup.
3;; It must be stored in your home directory.
4
5(defun dotspacemacs/layers ()
6 "Layer configuration:
7This function should only modify configuration layer settings."
8 (setq-default
9 ;; Base distribution to use. This is a layer contained in the directory
10 ;; `+distribution'. For now available distributions are `spacemacs-base'
11 ;; or `spacemacs'. (default 'spacemacs)
12 dotspacemacs-distribution 'spacemacs
13
14 ;; Lazy installation of layers (i.e. layers are installed only when a file
15 ;; with a supported type is opened). Possible values are `all', `unused'
16 ;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
17 ;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
18 ;; lazy install any layer that support lazy installation even the layers
19 ;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
20 ;; installation feature and you have to explicitly list a layer in the
21 ;; variable `dotspacemacs-configuration-layers' to install it.
22 ;; (default 'unused)
23 dotspacemacs-enable-lazy-installation 'unused
24
25 ;; If non-nil then Spacemacs will ask for confirmation before installing
26 ;; a layer lazily. (default t)
27 dotspacemacs-ask-for-lazy-installation t
28
29 ;; List of additional paths where to look for configuration layers.
30 ;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
31 dotspacemacs-configuration-layer-path '()
32
33 ;; List of configuration layers to load.
34 dotspacemacs-configuration-layers
35 '(
36 ;; ----------------------------------------------------------------
37 ;; Example of useful layers you may want to use right away.
38 ;; Uncomment some layer names and press `SPC f e R' (Vim style) or
39 ;; `M-m f e R' (Emacs style) to install them.
40 ;; ----------------------------------------------------------------
41 ;; auto-completion
42 ;; better-defaults
43 emacs-lisp
44 ;; git
45 helm
46 ;; lsp
47 ;; markdown
48 multiple-cursors
49 ;; org
50 ;; (shell :variables
51 ;; shell-default-height 30
52 ;; shell-default-position 'bottom)
53 ;; spell-checking
54 ;; syntax-checking
55 ;; version-control
56 treemacs)
57
58
59 ;; List of additional packages that will be installed without being wrapped
60 ;; in a layer (generally the packages are installed only and should still be
61 ;; loaded using load/require/use-package in the user-config section below in
62 ;; this file). If you need some configuration for these packages, then
63 ;; consider creating a layer. You can also put the configuration in
64 ;; `dotspacemacs/user-config'. To use a local version of a package, use the
65 ;; `:location' property: '(your-package :location "~/path/to/your-package/")
66 ;; Also include the dependencies as they will not be resolved automatically.
67 dotspacemacs-additional-packages '()
68
69 ;; A list of packages that cannot be updated.
70 dotspacemacs-frozen-packages '()
71
72 ;; A list of packages that will not be installed and loaded.
73 dotspacemacs-excluded-packages '()
74
75 ;; Defines the behaviour of Spacemacs when installing packages.
76 ;; Possible values are `used-only', `used-but-keep-unused' and `all'.
77 ;; `used-only' installs only explicitly used packages and deletes any unused
78 ;; packages as well as their unused dependencies. `used-but-keep-unused'
79 ;; installs only the used packages but won't delete unused ones. `all'
80 ;; installs *all* packages supported by Spacemacs and never uninstalls them.
81 ;; (default is `used-only')
82 dotspacemacs-install-packages 'used-only))
83
84(defun dotspacemacs/init ()
85 "Initialization:
86This function is called at the very beginning of Spacemacs startup,
87before layer configuration.
88It should only modify the values of Spacemacs settings."
89 ;; This setq-default sexp is an exhaustive list of all the supported
90 ;; spacemacs settings.
91 (setq-default
92 ;; If non-nil then enable support for the portable dumper. You'll need to
93 ;; compile Emacs 27 from source following the instructions in file
94 ;; EXPERIMENTAL.org at to root of the git repository.
95 ;;
96 ;; WARNING: pdumper does not work with Native Compilation, so it's disabled
97 ;; regardless of the following setting when native compilation is in effect.
98 ;;
99 ;; (default nil)
100 dotspacemacs-enable-emacs-pdumper nil
101
102 ;; Name of executable file pointing to emacs 27+. This executable must be
103 ;; in your PATH.
104 ;; (default "emacs")
105 dotspacemacs-emacs-pdumper-executable-file "emacs"
106
107 ;; Name of the Spacemacs dump file. This is the file will be created by the
108 ;; portable dumper in the cache directory under dumps sub-directory.
109 ;; To load it when starting Emacs add the parameter `--dump-file'
110 ;; when invoking Emacs 27.1 executable on the command line, for instance:
111 ;; ./emacs --dump-file=$HOME/.emacs.d/.cache/dumps/spacemacs-27.1.pdmp
112 ;; (default (format "spacemacs-%s.pdmp" emacs-version))
113 dotspacemacs-emacs-dumper-dump-file (format "spacemacs-%s.pdmp" emacs-version)
114
115 ;; If non-nil ELPA repositories are contacted via HTTPS whenever it's
116 ;; possible. Set it to nil if you have no way to use HTTPS in your
117 ;; environment, otherwise it is strongly recommended to let it set to t.
118 ;; This variable has no effect if Emacs is launched with the parameter
119 ;; `--insecure' which forces the value of this variable to nil.
120 ;; (default t)
121 dotspacemacs-elpa-https t
122
123 ;; Maximum allowed time in seconds to contact an ELPA repository.
124 ;; (default 5)
125 dotspacemacs-elpa-timeout 5
126
127 ;; Set `gc-cons-threshold' and `gc-cons-percentage' when startup finishes.
128 ;; This is an advanced option and should not be changed unless you suspect
129 ;; performance issues due to garbage collection operations.
130 ;; (default '(100000000 0.1))
131 dotspacemacs-gc-cons '(100000000 0.1)
132
133 ;; Set `read-process-output-max' when startup finishes.
134 ;; This defines how much data is read from a foreign process.
135 ;; Setting this >= 1 MB should increase performance for lsp servers
136 ;; in emacs 27.
137 ;; (default (* 1024 1024))
138 dotspacemacs-read-process-output-max (* 1024 1024)
139
140 ;; If non-nil then Spacelpa repository is the primary source to install
141 ;; a locked version of packages. If nil then Spacemacs will install the
142 ;; latest version of packages from MELPA. Spacelpa is currently in
143 ;; experimental state please use only for testing purposes.
144 ;; (default nil)
145 dotspacemacs-use-spacelpa nil
146
147 ;; If non-nil then verify the signature for downloaded Spacelpa archives.
148 ;; (default t)
149 dotspacemacs-verify-spacelpa-archives t
150
151 ;; If non-nil then spacemacs will check for updates at startup
152 ;; when the current branch is not `develop'. Note that checking for
153 ;; new versions works via git commands, thus it calls GitHub services
154 ;; whenever you start Emacs. (default nil)
155 dotspacemacs-check-for-update nil
156
157 ;; If non-nil, a form that evaluates to a package directory. For example, to
158 ;; use different package directories for different Emacs versions, set this
159 ;; to `emacs-version'. (default 'emacs-version)
160 dotspacemacs-elpa-subdirectory 'emacs-version
161
162 ;; One of `vim', `emacs' or `hybrid'.
163 ;; `hybrid' is like `vim' except that `insert state' is replaced by the
164 ;; `hybrid state' with `emacs' key bindings. The value can also be a list
165 ;; with `:variables' keyword (similar to layers). Check the editing styles
166 ;; section of the documentation for details on available variables.
167 ;; (default 'vim)
168 dotspacemacs-editing-style 'vim
169
170 ;; If non-nil show the version string in the Spacemacs buffer. It will
171 ;; appear as (spacemacs version)@(emacs version)
172 ;; (default t)
173 dotspacemacs-startup-buffer-show-version t
174
175 ;; Specify the startup banner. Default value is `official', it displays
176 ;; the official spacemacs logo. An integer value is the index of text
177 ;; banner, `random' chooses a random text banner in `core/banners'
178 ;; directory. A string value must be a path to an image format supported
179 ;; by your Emacs build.
180 ;; If the value is nil then no banner is displayed. (default 'official)
181 dotspacemacs-startup-banner 'official
182
183 ;; Scale factor controls the scaling (size) of the startup banner. Default
184 ;; value is `auto' for scaling the logo automatically to fit all buffer
185 ;; contents, to a maximum of the full image height and a minimum of 3 line
186 ;; heights. If set to a number (int or float) it is used as a constant
187 ;; scaling factor for the default logo size.
188 dotspacemacs-startup-banner-scale 'auto
189
190 ;; List of items to show in startup buffer or an association list of
191 ;; the form `(list-type . list-size)`. If nil then it is disabled.
192 ;; Possible values for list-type are:
193 ;; `recents' `recents-by-project' `bookmarks' `projects' `agenda' `todos'.
194 ;; List sizes may be nil, in which case
195 ;; `spacemacs-buffer-startup-lists-length' takes effect.
196 ;; The exceptional case is `recents-by-project', where list-type must be a
197 ;; pair of numbers, e.g. `(recents-by-project . (7 . 5))', where the first
198 ;; number is the project limit and the second the limit on the recent files
199 ;; within a project.
200 dotspacemacs-startup-lists '((recents . 5)
201 (projects . 7))
202
203 ;; True if the home buffer should respond to resize events. (default t)
204 dotspacemacs-startup-buffer-responsive t
205
206 ;; Show numbers before the startup list lines. (default t)
207 dotspacemacs-show-startup-list-numbers t
208
209 ;; The minimum delay in seconds between number key presses. (default 0.4)
210 dotspacemacs-startup-buffer-multi-digit-delay 0.4
211
212 ;; If non-nil, show file icons for entries and headings on Spacemacs home buffer.
213 ;; This has no effect in terminal or if "all-the-icons" package or the font
214 ;; is not installed. (default nil)
215 dotspacemacs-startup-buffer-show-icons nil
216
217 ;; Default major mode for a new empty buffer. Possible values are mode
218 ;; names such as `text-mode'; and `nil' to use Fundamental mode.
219 ;; (default `text-mode')
220 dotspacemacs-new-empty-buffer-major-mode 'text-mode
221
222 ;; Default major mode of the scratch buffer (default `text-mode')
223 dotspacemacs-scratch-mode 'text-mode
224
225 ;; If non-nil, *scratch* buffer will be persistent. Things you write down in
226 ;; *scratch* buffer will be saved and restored automatically.
227 dotspacemacs-scratch-buffer-persistent nil
228
229 ;; If non-nil, `kill-buffer' on *scratch* buffer
230 ;; will bury it instead of killing.
231 dotspacemacs-scratch-buffer-unkillable nil
232
233 ;; Initial message in the scratch buffer, such as "Welcome to Spacemacs!"
234 ;; (default nil)
235 dotspacemacs-initial-scratch-message nil
236
237 ;; List of themes, the first of the list is loaded when spacemacs starts.
238 ;; Press `SPC T n' to cycle to the next theme in the list (works great
239 ;; with 2 themes variants, one dark and one light)
240 dotspacemacs-themes '(spacemacs-dark
241 spacemacs-light)
242
243 ;; Set the theme for the Spaceline. Supported themes are `spacemacs',
244 ;; `all-the-icons', `custom', `doom', `vim-powerline' and `vanilla'. The
245 ;; first three are spaceline themes. `doom' is the doom-emacs mode-line.
246 ;; `vanilla' is default Emacs mode-line. `custom' is a user defined themes,
247 ;; refer to the DOCUMENTATION.org for more info on how to create your own
248 ;; spaceline theme. Value can be a symbol or list with additional properties.
249 ;; (default '(spacemacs :separator wave :separator-scale 1.5))
250 dotspacemacs-mode-line-theme '(spacemacs :separator wave :separator-scale 1.5)
251
252 ;; If non-nil the cursor color matches the state color in GUI Emacs.
253 ;; (default t)
254 dotspacemacs-colorize-cursor-according-to-state t
255
256 ;; Default font or prioritized list of fonts. The `:size' can be specified as
257 ;; a non-negative integer (pixel size), or a floating-point (point size).
258 ;; Point size is recommended, because it's device independent. (default 10.0)
259 dotspacemacs-default-font '("Source Code Pro"
260 :size 10.0
261 :weight normal
262 :width normal)
263
264 ;; The leader key (default "SPC")
265 dotspacemacs-leader-key "SPC"
266
267 ;; The key used for Emacs commands `M-x' (after pressing on the leader key).
268 ;; (default "SPC")
269 dotspacemacs-emacs-command-key "SPC"
270
271 ;; The key used for Vim Ex commands (default ":")
272 dotspacemacs-ex-command-key ":"
273
274 ;; The leader key accessible in `emacs state' and `insert state'
275 ;; (default "M-m")
276 dotspacemacs-emacs-leader-key "M-m"
277
278 ;; Major mode leader key is a shortcut key which is the equivalent of
279 ;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
280 dotspacemacs-major-mode-leader-key ","
281
282 ;; Major mode leader key accessible in `emacs state' and `insert state'.
283 ;; (default "C-M-m" for terminal mode, "<M-return>" for GUI mode).
284 ;; Thus M-RET should work as leader key in both GUI and terminal modes.
285 ;; C-M-m also should work in terminal mode, but not in GUI mode.
286 dotspacemacs-major-mode-emacs-leader-key (if window-system "<M-return>" "C-M-m")
287
288 ;; These variables control whether separate commands are bound in the GUI to
289 ;; the key pairs `C-i', `TAB' and `C-m', `RET'.
290 ;; Setting it to a non-nil value, allows for separate commands under `C-i'
291 ;; and TAB or `C-m' and `RET'.
292 ;; In the terminal, these pairs are generally indistinguishable, so this only
293 ;; works in the GUI. (default nil)
294 dotspacemacs-distinguish-gui-tab nil
295
296 ;; Name of the default layout (default "Default")
297 dotspacemacs-default-layout-name "Default"
298
299 ;; If non-nil the default layout name is displayed in the mode-line.
300 ;; (default nil)
301 dotspacemacs-display-default-layout nil
302
303 ;; If non-nil then the last auto saved layouts are resumed automatically upon
304 ;; start. (default nil)
305 dotspacemacs-auto-resume-layouts nil
306
307 ;; If non-nil, auto-generate layout name when creating new layouts. Only has
308 ;; effect when using the "jump to layout by number" commands. (default nil)
309 dotspacemacs-auto-generate-layout-names nil
310
311 ;; Size (in MB) above which spacemacs will prompt to open the large file
312 ;; literally to avoid performance issues. Opening a file literally means that
313 ;; no major mode or minor modes are active. (default is 1)
314 dotspacemacs-large-file-size 1
315
316 ;; Location where to auto-save files. Possible values are `original' to
317 ;; auto-save the file in-place, `cache' to auto-save the file to another
318 ;; file stored in the cache directory and `nil' to disable auto-saving.
319 ;; (default 'cache)
320 dotspacemacs-auto-save-file-location 'cache
321
322 ;; Maximum number of rollback slots to keep in the cache. (default 5)
323 dotspacemacs-max-rollback-slots 5
324
325 ;; If non-nil, the paste transient-state is enabled. While enabled, after you
326 ;; paste something, pressing `C-j' and `C-k' several times cycles through the
327 ;; elements in the `kill-ring'. (default nil)
328 dotspacemacs-enable-paste-transient-state nil
329
330 ;; Which-key delay in seconds. The which-key buffer is the popup listing
331 ;; the commands bound to the current keystroke sequence. (default 0.4)
332 dotspacemacs-which-key-delay 0.4
333
334 ;; Which-key frame position. Possible values are `right', `bottom' and
335 ;; `right-then-bottom'. right-then-bottom tries to display the frame to the
336 ;; right; if there is insufficient space it displays it at the bottom.
337 ;; (default 'bottom)
338 dotspacemacs-which-key-position 'bottom
339
340 ;; Control where `switch-to-buffer' displays the buffer. If nil,
341 ;; `switch-to-buffer' displays the buffer in the current window even if
342 ;; another same-purpose window is available. If non-nil, `switch-to-buffer'
343 ;; displays the buffer in a same-purpose window even if the buffer can be
344 ;; displayed in the current window. (default nil)
345 dotspacemacs-switch-to-buffer-prefers-purpose nil
346
347 ;; If non-nil a progress bar is displayed when spacemacs is loading. This
348 ;; may increase the boot time on some systems and emacs builds, set it to
349 ;; nil to boost the loading time. (default t)
350 dotspacemacs-loading-progress-bar t
351
352 ;; If non-nil the frame is fullscreen when Emacs starts up. (default nil)
353 ;; (Emacs 24.4+ only)
354 dotspacemacs-fullscreen-at-startup nil
355
356 ;; If non-nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
357 ;; Use to disable fullscreen animations in OSX. (default nil)
358 dotspacemacs-fullscreen-use-non-native nil
359
360 ;; If non-nil the frame is maximized when Emacs starts up.
361 ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
362 ;; (default nil) (Emacs 24.4+ only)
363 dotspacemacs-maximized-at-startup nil
364
365 ;; If non-nil the frame is undecorated when Emacs starts up. Combine this
366 ;; variable with `dotspacemacs-maximized-at-startup' in OSX to obtain
367 ;; borderless fullscreen. (default nil)
368 dotspacemacs-undecorated-at-startup nil
369
370 ;; A value from the range (0..100), in increasing opacity, which describes
371 ;; the transparency level of a frame when it's active or selected.
372 ;; Transparency can be toggled through `toggle-transparency'. (default 90)
373 dotspacemacs-active-transparency 90
374
375 ;; A value from the range (0..100), in increasing opacity, which describes
376 ;; the transparency level of a frame when it's inactive or deselected.
377 ;; Transparency can be toggled through `toggle-transparency'. (default 90)
378 dotspacemacs-inactive-transparency 90
379
380 ;; If non-nil show the titles of transient states. (default t)
381 dotspacemacs-show-transient-state-title t
382
383 ;; If non-nil show the color guide hint for transient state keys. (default t)
384 dotspacemacs-show-transient-state-color-guide t
385
386 ;; If non-nil unicode symbols are displayed in the mode line.
387 ;; If you use Emacs as a daemon and wants unicode characters only in GUI set
388 ;; the value to quoted `display-graphic-p'. (default t)
389 dotspacemacs-mode-line-unicode-symbols t
390
391 ;; If non-nil smooth scrolling (native-scrolling) is enabled. Smooth
392 ;; scrolling overrides the default behavior of Emacs which recenters point
393 ;; when it reaches the top or bottom of the screen. (default t)
394 dotspacemacs-smooth-scrolling t
395
396 ;; Show the scroll bar while scrolling. The auto hide time can be configured
397 ;; by setting this variable to a number. (default t)
398 dotspacemacs-scroll-bar-while-scrolling t
399
400 ;; Control line numbers activation.
401 ;; If set to `t', `relative' or `visual' then line numbers are enabled in all
402 ;; `prog-mode' and `text-mode' derivatives. If set to `relative', line
403 ;; numbers are relative. If set to `visual', line numbers are also relative,
404 ;; but only visual lines are counted. For example, folded lines will not be
405 ;; counted and wrapped lines are counted as multiple lines.
406 ;; This variable can also be set to a property list for finer control:
407 ;; '(:relative nil
408 ;; :visual nil
409 ;; :disabled-for-modes dired-mode
410 ;; doc-view-mode
411 ;; markdown-mode
412 ;; org-mode
413 ;; pdf-view-mode
414 ;; text-mode
415 ;; :size-limit-kb 1000)
416 ;; When used in a plist, `visual' takes precedence over `relative'.
417 ;; (default nil)
418 dotspacemacs-line-numbers nil
419
420 ;; Code folding method. Possible values are `evil', `origami' and `vimish'.
421 ;; (default 'evil)
422 dotspacemacs-folding-method 'evil
423
424 ;; If non-nil and `dotspacemacs-activate-smartparens-mode' is also non-nil,
425 ;; `smartparens-strict-mode' will be enabled in programming modes.
426 ;; (default nil)
427 dotspacemacs-smartparens-strict-mode nil
428
429 ;; If non-nil smartparens-mode will be enabled in programming modes.
430 ;; (default t)
431 dotspacemacs-activate-smartparens-mode t
432
433 ;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
434 ;; over any automatically added closing parenthesis, bracket, quote, etc...
435 ;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
436 dotspacemacs-smart-closing-parenthesis nil
437
438 ;; Select a scope to highlight delimiters. Possible values are `any',
439 ;; `current', `all' or `nil'. Default is `all' (highlight any scope and
440 ;; emphasis the current one). (default 'all)
441 dotspacemacs-highlight-delimiters 'all
442
443 ;; If non-nil, start an Emacs server if one is not already running.
444 ;; (default nil)
445 dotspacemacs-enable-server nil
446
447 ;; Set the emacs server socket location.
448 ;; If nil, uses whatever the Emacs default is, otherwise a directory path
449 ;; like \"~/.emacs.d/server\". It has no effect if
450 ;; `dotspacemacs-enable-server' is nil.
451 ;; (default nil)
452 dotspacemacs-server-socket-dir nil
453
454 ;; If non-nil, advise quit functions to keep server open when quitting.
455 ;; (default nil)
456 dotspacemacs-persistent-server nil
457
458 ;; List of search tool executable names. Spacemacs uses the first installed
459 ;; tool of the list. Supported tools are `rg', `ag', `pt', `ack' and `grep'.
460 ;; (default '("rg" "ag" "pt" "ack" "grep"))
461 dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep")
462
463 ;; Format specification for setting the frame title.
464 ;; %a - the `abbreviated-file-name', or `buffer-name'
465 ;; %t - `projectile-project-name'
466 ;; %I - `invocation-name'
467 ;; %S - `system-name'
468 ;; %U - contents of $USER
469 ;; %b - buffer name
470 ;; %f - visited file name
471 ;; %F - frame name
472 ;; %s - process status
473 ;; %p - percent of buffer above top of window, or Top, Bot or All
474 ;; %P - percent of buffer above bottom of window, perhaps plus Top, or Bot or All
475 ;; %m - mode name
476 ;; %n - Narrow if appropriate
477 ;; %z - mnemonics of buffer, terminal, and keyboard coding systems
478 ;; %Z - like %z, but including the end-of-line format
479 ;; If nil then Spacemacs uses default `frame-title-format' to avoid
480 ;; performance issues, instead of calculating the frame title by
481 ;; `spacemacs/title-prepare' all the time.
482 ;; (default "%I@%S")
483 dotspacemacs-frame-title-format "%I@%S"
484
485 ;; Format specification for setting the icon title format
486 ;; (default nil - same as frame-title-format)
487 dotspacemacs-icon-title-format nil
488
489 ;; Color highlight trailing whitespace in all prog-mode and text-mode derived
490 ;; modes such as c++-mode, python-mode, emacs-lisp, html-mode, rst-mode etc.
491 ;; (default t)
492 dotspacemacs-show-trailing-whitespace t
493
494 ;; Delete whitespace while saving buffer. Possible values are `all'
495 ;; to aggressively delete empty line and long sequences of whitespace,
496 ;; `trailing' to delete only the whitespace at end of lines, `changed' to
497 ;; delete only whitespace for changed lines or `nil' to disable cleanup.
498 ;; (default nil)
499 dotspacemacs-whitespace-cleanup nil
500
501 ;; If non-nil activate `clean-aindent-mode' which tries to correct
502 ;; virtual indentation of simple modes. This can interfere with mode specific
503 ;; indent handling like has been reported for `go-mode'.
504 ;; If it does deactivate it here.
505 ;; (default t)
506 dotspacemacs-use-clean-aindent-mode t
507
508 ;; Accept SPC as y for prompts if non-nil. (default nil)
509 dotspacemacs-use-SPC-as-y nil
510
511 ;; If non-nil shift your number row to match the entered keyboard layout
512 ;; (only in insert state). Currently supported keyboard layouts are:
513 ;; `qwerty-us', `qwertz-de' and `querty-ca-fr'.
514 ;; New layouts can be added in `spacemacs-editing' layer.
515 ;; (default nil)
516 dotspacemacs-swap-number-row nil
517
518 ;; Either nil or a number of seconds. If non-nil zone out after the specified
519 ;; number of seconds. (default nil)
520 dotspacemacs-zone-out-when-idle nil
521
522 ;; Run `spacemacs/prettify-org-buffer' when
523 ;; visiting README.org files of Spacemacs.
524 ;; (default nil)
525 dotspacemacs-pretty-docs nil
526
527 ;; If nil the home buffer shows the full path of agenda items
528 ;; and todos. If non-nil only the file name is shown.
529 dotspacemacs-home-shorten-agenda-source nil
530
531 ;; If non-nil then byte-compile some of Spacemacs files.
532 dotspacemacs-byte-compile nil))
533
534(defun dotspacemacs/user-env ()
535 "Environment variables setup.
536This function defines the environment variables for your Emacs session. By
537default it calls `spacemacs/load-spacemacs-env' which loads the environment
538variables declared in `~/.spacemacs.env' or `~/.spacemacs.d/.spacemacs.env'.
539See the header of this file for more information."
540 (spacemacs/load-spacemacs-env)
541)
542
543(defun dotspacemacs/user-init ()
544 "Initialization for user code:
545This function is called immediately after `dotspacemacs/init', before layer
546configuration.
547It is mostly for variables that should be set before packages are loaded.
548If you are unsure, try setting them in `dotspacemacs/user-config' first."
549)
550
551
552(defun dotspacemacs/user-load ()
553 "Library to load while dumping.
554This function is called only while dumping Spacemacs configuration. You can
555`require' or `load' the libraries of your choice that will be included in the
556dump."
557)
558
559
560(defun dotspacemacs/user-config ()
561 "Configuration for user code:
562This function is called at the very end of Spacemacs startup, after layer
563configuration.
564Put your configuration code here, except for variables that should be set
565before packages are loaded."
566)
567
568
569;; Do not write anything past this comment. This is where Emacs will
570;; auto-generate custom variable definitions.
diff --git a/dot_zshrc b/dot_zshrc
new file mode 100644
index 0000000..5dc158b
--- /dev/null
+++ b/dot_zshrc
@@ -0,0 +1,140 @@
1# If you come from bash you might have to change your $PATH.
2# export PATH=$HOME/bin:/usr/local/bin:$PATH
3
4# Path to your oh-my-zsh installation.
5export ZSH="$HOME/.oh-my-zsh"
6
7# Set name of the theme to load --- if set to "random", it will
8# load a random theme each time oh-my-zsh is loaded, in which case,
9# to know which specific one was loaded, run: echo $RANDOM_THEME
10# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
11ZSH_THEME="robbyrussell"
12
13# Set list of themes to pick from when loading at random
14# Setting this variable when ZSH_THEME=random will cause zsh to load
15# a theme from this variable instead of looking in $ZSH/themes/
16# If set to an empty array, this variable will have no effect.
17# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
18
19# Uncomment the following line to use case-sensitive completion.
20# CASE_SENSITIVE="true"
21
22# Uncomment the following line to use hyphen-insensitive completion.
23# Case-sensitive completion must be off. _ and - will be interchangeable.
24# HYPHEN_INSENSITIVE="true"
25
26# Uncomment one of the following lines to change the auto-update behavior
27# zstyle ':omz:update' mode disabled # disable automatic updates
28# zstyle ':omz:update' mode auto # update automatically without asking
29# zstyle ':omz:update' mode reminder # just remind me to update when it's time
30
31# Uncomment the following line to change how often to auto-update (in days).
32# zstyle ':omz:update' frequency 13
33
34# Uncomment the following line if pasting URLs and other text is messed up.
35# DISABLE_MAGIC_FUNCTIONS="true"
36
37# Uncomment the following line to disable colors in ls.
38# DISABLE_LS_COLORS="true"
39
40# Uncomment the following line to disable auto-setting terminal title.
41# DISABLE_AUTO_TITLE="true"
42
43# Uncomment the following line to enable command auto-correction.
44# ENABLE_CORRECTION="true"
45
46# Uncomment the following line to display red dots whilst waiting for completion.
47# You can also set it to another string to have that shown instead of the default red dots.
48# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
49# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
50# COMPLETION_WAITING_DOTS="true"
51
52# Uncomment the following line if you want to disable marking untracked files
53# under VCS as dirty. This makes repository status check for large repositories
54# much, much faster.
55# DISABLE_UNTRACKED_FILES_DIRTY="true"
56
57# Uncomment the following line if you want to change the command execution time
58# stamp shown in the history command output.
59# You can set one of the optional three formats:
60# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
61# or set a custom format using the strftime function format specifications,
62# see 'man strftime' for details.
63HIST_STAMPS="mm/dd/yyyy"
64
65# Would you like to use another custom folder than $ZSH/custom?
66# ZSH_CUSTOM=/path/to/new-custom-folder
67
68# Which plugins would you like to load?
69# Standard plugins can be found in $ZSH/plugins/
70# Custom plugins may be added to $ZSH_CUSTOM/plugins/
71# Example format: plugins=(rails git textmate ruby lighthouse)
72# Add wisely, as too many plugins slow down shell startup.
73plugins=(git fzf-zsh-plugin)
74
75source $ZSH/oh-my-zsh.sh
76
77# User configuration
78
79# export MANPATH="/usr/local/man:$MANPATH"
80
81# You may need to manually set your language environment
82export LANG=en_US.UTF-8
83export LC_ALL=en_US.UTF-8
84export LC_COLLATE="en_US.UTF-8"
85
86# Preferred editor for local and remote sessions
87# if [[ -n $SSH_CONNECTION ]]; then
88# export EDITOR='vim'
89# else
90# export EDITOR='mvim'
91# fi
92
93# Compilation flags
94# export ARCHFLAGS="-arch x86_64"
95
96# Set personal aliases, overriding those provided by oh-my-zsh libs,
97# plugins, and themes. Aliases can be placed here, though oh-my-zsh
98# users are encouraged to define aliases within the ZSH_CUSTOM folder.
99# For a full list of active aliases, run `alias`.
100#
101# Example aliases
102# alias zshconfig="mate ~/.zshrc"
103# alias ohmyzsh="mate ~/.oh-my-zsh"
104export EDITOR=vim
105export VISUAL=vim
106export OP_BIOMETRIC_UNLOCK_ENABLED=true
107export GOPATH="/home/clarkzjw/Documents/code/go"
108
109alias open="xdg-open"
110
111function addPATH {
112 case ":$PATH:" in
113 *":$1:"*) :;; # already there
114 *) PATH="$1:$PATH";; # or PATH="$PATH:$1"
115 esac
116}
117
118function addPATHBefore {
119 case ":$PATH:" in
120 *":$1:"*) :;; # already there
121 *) PATH="$1:$PATH";; # or PATH="$PATH:$1"
122 esac
123}
124
125[[ -s /etc/profile.d/autojump.sh ]] && source /etc/profile.d/autojump.sh
126
127addPATH /Users/clarkzjw/.local/bin
128addPATH $GOPATH/bin
129
130alias emacs="emacs -nw"
131alias sl="ls"
132alias ssh="ssh -o ServerAliveInterval=60"
133alias youtube-dl="yt-dlp"
134alias m="make -j`nproc --all`"
135alias t="xfce4-terminal"
136alias w="/home/clarkzjw/Documents/sync/UVic/PanLab/Code/picoquic"
137alias nas="sudo mount -t cifs -o user=clarkzjw //192.168.1.201/pool1 /mnt/truenas"
138alias dnas="sudo umount /mnt/truenas"
139alias chez="/usr/bin/chezmoi"
140alias log="/home/clarkzjw/Documents/sync/UVic/PanLab/Code/picoquic/picoquic/picolog_t -f qlog"
diff --git a/executable_dot_Xresources b/executable_dot_Xresources
new file mode 100644
index 0000000..0a5d8b2
--- /dev/null
+++ b/executable_dot_Xresources
@@ -0,0 +1,4 @@
1xterm*saveLines: 100000
2xterm*font: *-fixed-*-*-*-20-*
3Xcursor.theme: Qogir
4Xcursor.size: 16
Powered by cgit v1.2.3 (git 2.41.0)