X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/7564bd4dd624d1504dcf819dd1fb20ff16dbdd9d..d714451509a87c2eff518f0e72f63d884830c01b:/rc.org?ds=inline
diff --git a/rc.org b/rc.org
index de4435a..96a7dd5 100644
--- a/rc.org
+++ b/rc.org
@@ -625,13 +625,71 @@ timeout = 0
Helvetica
-
+
Liberation Sans
-
+
#+end_src
+** getmail
+
+*** getmailrc
+:PROPERTIES:
+:header-args+: :tangle ~/.getmail/getmailrc
+:END:
+
+#+begin_src conf
+[retriever]
+type = SimplePOP3SSLRetriever
+server = fencepost.gnu.org
+username = aminb
+password_command = ("gpg2", "--no-tty", "-q", "-d", "/home/amin/.passwd/gnu.gpg")
+port = 995
+use_apop = True
+
+[destination]
+type = Maildir
+path = ~/mail/gnu/Inbox/
+
+[options]
+delete = True
+#+end_src
+
+*** getmail.service
+:PROPERTIES:
+:header-args+: :tangle ~/.config/systemd/user/getmail.service
+:END:
+
+#+begin_src conf :tangle no
+[Unit]
+Description=getmail service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/getmail
+StandardOutput=syslog
+StandardError=syslog
+#+end_src
+
+*** getmail.timer
+:PROPERTIES:
+:header-args+: :tangle ~/.config/systemd/user/getmail.timer
+:END:
+
+#+begin_src conf :tangle no
+[Unit]
+Description=getmail timer
+
+[Timer]
+OnCalendar=*:0/30
+Persistent=true
+Unit=getmail.service
+
+[Install]
+WantedBy=timers.target
+#+end_src
+
** Git
*** gitconfig
@@ -643,8 +701,8 @@ timeout = 0
#+begin_src conf
[user]
name = Amin Bandali
- email = amin@aminb.org
- signingkey = 4E05246AB0BF7FFB
+ email = amin@gnu.org
+ signingkey = CDDE75F903538E71813CDA27D1FBA36627D65876
#+end_src
**** signing
@@ -686,6 +744,8 @@ timeout = 0
pr = pull --rebase
ps = push
psf = push --force
+ nmam = "!f() { notmuch show --format=raw $1 | git am -; }; f"
+ nmam3 = "!f() { notmuch show --format=raw $1 | git am -3 -; }; f"
#+end_src
**** color
@@ -721,8 +781,8 @@ timeout = 0
**** send-email
#+begin_src conf
[sendemail]
- smtpuser = amin@aminb.org
- smtpserver = nix.aminb.org
+ smtpuser = aminb
+ smtpserver = fencepost.gnu.org
smtpserverport = 587
smtpencryption = tls
annotate = yes
@@ -743,12 +803,60 @@ timeout = 0
*-autoloads.el
#+end_src
+** GnuPG
+:PROPERTIES:
+:header-args+: :tangle ~/.gnupg/gpg-agent.conf
+:END:
+
+#+begin_src conf
+default-cache-ttl 43200
+max-cache-ttl 43200
+
+default-cache-ttl-ssh 10800
+max-cache-ttl-ssh 10800
+
+# pinentry-program /usr/bin/pinentry-qt
+#+end_src
+
+** GTK
+
+*** gtk-2.0
+:PROPERTIES:
+:header-args+: :tangle ~/.gtkrc-2.0
+:END:
+
+#+begin_src conf
+gtk-theme-name="Greybird"
+gtk-icon-theme-name="Paper"
+gtk-font-name="Ubuntu 10"
+gtk-menu-images=0
+# gtk-key-theme-name = "Emacs"
+#+end_src
+
+*** gtk-3.0
+:PROPERTIES:
+:header-args+: :tangle ~/.config/gtk-3.0/settings.ini
+:END:
+
+#+begin_src conf :tangle no
+[Settings]
+gtk-icon-theme-name = Paper
+# gtk-theme-name = Adwaita
+
+gtk-theme-name = Greybird
+# gtk-theme-name = Arc-Darker
+# gtk-theme-name = Numix-ArchBlue
+
+gtk-font-name = Ubuntu 10
+# gtk-key-theme-name = Emacs
+#+end_src
+
** [[https://github.com/Leinnan/i3gs][i3gs]]
:PROPERTIES:
:header-args+: :tangle ~/.config/i3gs/config
:END:
-#+begin_src conf :comments none
+#+begin_src conf :comments none :tangle no
borders_width=0 0 2 0
separator_width=10
@@ -772,6 +880,11 @@ borders_color=#3D9970
#title= ï
#borders_color=#01FF70
+[volume]
+command=volume-info
+title=ï§
+borders_color=#7FDBFF
+
[battery]
preset=BAT
command=battery-percentage-time
@@ -785,151 +898,83 @@ borders_color=#01FF70
[date]
preset=DATE
-command=date '+%-I:%M, %a %b %d'
+command=date '+%-I:%M, %a %b %d '
title= ï
borders_color=#FFDC00
separator_width=0
#+end_src
-** Latexmk
-:PROPERTIES:
-:header-args+: :tangle ~/.latexmkrc
-:END:
-
-#+begin_src conf
-$pdf_previewer = "start zathura %O %S";
-$clean_ext = "aux out";
-
-# $pdf_update_method = 4;
-# $pdf_update_command = "zathura %O %S";
-
-# Synctex allows one to jump to from the PDF in Zathura to the source in Emacs
-# by Ctrl+click in the PDF.
-# Tell latexmk to use Zathura as a previewer, and run emacsclient as the Synctex
-# editor.
-# $pdf_previewer = 'exec zathura --synctex-forward -x \'emacsclient --no-wait +%{line} %{input}\' %O %S';
-#+end_src
-
-** libinput
-
-Improve XPS 15 9560's touchpad experience.
-
-# begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "plasma")) "/sudo::/etc/X11/xorg.conf.d/30-touchpad.conf")
-#+begin_src conf :tangle no
-Section "InputClass"
- Identifier "libinput touchpad catchall"
- Driver "libinput"
- MatchIsTouchpad "on"
- Option "ClickMethod" "clickfinger"
- Option "NaturalScrolling" "true"
- Option "Tapping" "on"
- Option "TappingButtonMap" "lrm"
-EndSection
-#+end_src
-
-** getmail
-
-*** getmailrc
-:PROPERTIES:
-:header-args+: :tangle ~/.getmail/getmailrc
-:END:
-
-#+begin_src conf
-[retriever]
-type = SimplePOP3SSLRetriever
-server = fencepost.gnu.org
-username = aminb
-password_command = ("gpg2", "--no-tty", "-q", "-d", "/home/amin/.passwd/gnu.gpg")
-port = 995
-use_apop = True
-
-[destination]
-type = Maildir
-path = ~/mail/gnu/Inbox/
-
-[options]
-delete = True
-#+end_src
-
-*** getmail.service
-:PROPERTIES:
-:header-args+: :tangle ~/.config/systemd/user/getmail.service
-:END:
-
-#+begin_src conf :tangle no
-[Unit]
-Description=getmail service
-
-[Service]
-Type=oneshot
-ExecStart=/usr/bin/getmail
-StandardOutput=syslog
-StandardError=syslog
-#+end_src
-
-*** getmail.timer
-:PROPERTIES:
-:header-args+: :tangle ~/.config/systemd/user/getmail.timer
-:END:
-
-#+begin_src conf :tangle no
-[Unit]
-Description=getmail timer
-
-[Timer]
-OnCalendar=*:0/30
-Persistent=true
-Unit=getmail.service
-
-[Install]
-WantedBy=timers.target
-#+end_src
-** GnuPG
+** i3status
:PROPERTIES:
-:header-args+: :tangle ~/.gnupg/gpg-agent.conf
+:header-args+: :tangle ~/.config/i3status/config
:END:
-#+begin_src conf
-default-cache-ttl 43200
-max-cache-ttl 43200
+#+begin_src conf :comments none
+# i3status configuration file.
+# see "man i3status" for documentation.
-default-cache-ttl-ssh 10800
-max-cache-ttl-ssh 10800
+# It is important that this file is edited as UTF-8.
+# The following line should contain a sharp s:
+# Ã
+# If the above line is not correctly displayed, fix your editor first!
-# pinentry-program /usr/bin/pinentry-qt
-#+end_src
+general {
+ colors = true
+ interval = 5
+}
-** GTK
+# order += "ipv6"
+order += "disk /"
+order += "disk /data"
+order += "wireless _first_"
+# order += "ethernet _first_"
+order += "battery 0"
+order += "volume master"
+order += "load"
+order += "tztime local"
+
+wireless _first_ {
+ format_up = "W:%quality %essid %ip"
+ format_down = "W: down"
+}
-*** gtk-2.0
-:PROPERTIES:
-:header-args+: :tangle ~/.gtkrc-2.0
-:END:
+# ethernet _first_ {
+# # if you use %speed, i3status requires root privileges
+# format_up = "E: %ip (%speed)"
+# format_down = "E: down"
+# }
+
+battery 0 {
+ format = "%status %percentage %remaining (%consumption)"
+ path = "/sys/class/power_supply/BAT%d/uevent"
+ low_threshold = "10"
+ threshold_type = "percentage"
+ last_full_capacity = true
+ integer_battery_capacity = true
+ hide_seconds = true
+}
-#+begin_src conf
-gtk-theme-name="Greybird"
-gtk-icon-theme-name="Paper"
-gtk-font-name="Ubuntu 10"
-gtk-menu-images=0
-# gtk-key-theme-name = "Emacs"
-#+end_src
+tztime local {
+ format = "%-I:%M%P %a %b %d"
+}
-*** gtk-3.0
-:PROPERTIES:
-:header-args+: :tangle ~/.config/gtk-3.0/settings.ini
-:END:
+volume master {
+ format = "⪠%volume"
+ format_muted = "ð %volume"
+ device = "pulse"
+}
-#+begin_src conf :tangle no
-[Settings]
-gtk-icon-theme-name = Paper
-# gtk-theme-name = Adwaita
+load {
+ format = "%1min"
+}
-gtk-theme-name = Greybird
-# gtk-theme-name = Arc-Darker
-# gtk-theme-name = Numix-ArchBlue
+disk "/" {
+ format = "/ %avail"
+}
-gtk-font-name = Ubuntu 10
-# gtk-key-theme-name = Emacs
+disk "/data" {
+ format = "/data %avail"
+}
#+end_src
** isync
@@ -1022,18 +1067,54 @@ Unit=mbsync.service
WantedBy=timers.target
#+end_src
-** mpd
+** Latexmk
:PROPERTIES:
-:header-args+: :tangle ~/.config/mpd/mpd.conf
+:header-args+: :tangle ~/.latexmkrc
:END:
#+begin_src conf
-# An example configuration file for MPD.
-# Read the user manual for documentation: http://www.musicpd.org/doc/user/
+$pdf_previewer = "start zathura %O %S";
+$clean_ext = "aux out";
+# $pdf_update_method = 4;
+# $pdf_update_command = "zathura %O %S";
-# Files and directories #######################################################
-#
+# Synctex allows one to jump to from the PDF in Zathura to the source in Emacs
+# by Ctrl+click in the PDF.
+# Tell latexmk to use Zathura as a previewer, and run emacsclient as the Synctex
+# editor.
+# $pdf_previewer = 'exec zathura --synctex-forward -x \'emacsclient --no-wait +%{line} %{input}\' %O %S';
+#+end_src
+
+** libinput
+
+Improve XPS 15 9560's touchpad experience.
+
+# begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "plasma")) "/sudo::/etc/X11/xorg.conf.d/30-touchpad.conf")
+#+begin_src conf :tangle no
+Section "InputClass"
+ Identifier "libinput touchpad catchall"
+ Driver "libinput"
+ MatchIsTouchpad "on"
+ Option "ClickMethod" "clickfinger"
+ Option "NaturalScrolling" "true"
+ Option "Tapping" "on"
+ Option "TappingButtonMap" "lrm"
+EndSection
+#+end_src
+
+** mpd
+:PROPERTIES:
+:header-args+: :tangle ~/.config/mpd/mpd.conf
+:END:
+
+#+begin_src conf
+# An example configuration file for MPD.
+# Read the user manual for documentation: http://www.musicpd.org/doc/user/
+
+
+# Files and directories #######################################################
+#
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
@@ -1454,7 +1535,8 @@ logfile ~/.msmtp.log
# aminb
account aminb
host nix.aminb.org
-tls_fingerprint 65:DD:B8:32:D8:CD:F1:DC:B6:34:EE:35:04:18:AC:09:F3:1D:6D:20:F2:4A:E2:BD:64:48:B7:1F:90:BD:C4:BA
+# use `msmtp -a aminb --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
+tls_fingerprint 98:C7:F0:02:7F:2B:D8:B6:D3:BF:E8:C1:D4:07:6B:B5:6C:B1:C7:5D:97:20:70:88:AB:9E:B5:09:5D:2C:DC:8E
tls_starttls on
from amin@aminb.org
user amin@aminb.org
@@ -1470,6 +1552,14 @@ from aminb@gnu.org
user aminb
passwordeval gpg2 --no-tty -q -d ~/.passwd/gnu.gpg
+# gnu (amin)
+account gnu-amin : gnu
+from amin@gnu.org
+
+# gnu (mab)
+account gnu-mab : gnu
+from mab@gnu.org
+
# uwaterloo
account uwaterloo
host connect.uwaterloo.ca
@@ -1479,10 +1569,6 @@ user abandali
passwordeval gpg2 --no-tty -q -d ~/.passwd/uwaterloo.gpg
tls_trust_file /etc/ssl/certs/ca-certificates.crt
-# uwaterloo (friendly address)
-account uwaterloo-friendly : uwaterloo
-from amin.bandali@uwaterloo.ca
-
# Set a default account
account default : aminb
#+end_src
@@ -2105,7 +2191,7 @@ path=/home/amin/mail
[user]
name=Amin Bandali
primary_email=amin@aminb.org
-other_email=abandali@uwaterloo.ca;amin.bandali@uwaterloo.ca;aminb@gnu.org;
+other_email=amin@gnu.org;abandali@uwaterloo.ca;mab@gnu.org;aminb@gnu.org;
# Configuration for "notmuch new"
#
@@ -2191,31 +2277,32 @@ sieve-filter -eW -o postmaster_address=postmaster@aminb.org \
#+begin_src sh
# apply sent tag to messages sent by me
-notmuch tag -new +sent -- from:amin@aminb.org or from:aminb@gnu.org or from:abandali@uwaterloo.ca or from:amin.bandali@uwaterloo.ca
+notmuch tag -new +sent -- from:amin@aminb.org or from:amin@gnu.org or from:mab@gnu.org or from:aminb@gnu.org or from:abandali@uwaterloo.ca
# initial tagging
-notmuch tag -latest -- tag:latest
+notmuch tag -latest -- tag:latest
notmuch tag +inbox +unread +latest -new -- tag:new
# apply tags to lists
#
-notmuch tag -inbox +lists/~sircmpwn/srht-admins -- folder:amin/lists/~sircmpwn/srht-admins
-notmuch tag -inbox +lists/~sircmpwn/srht-announce -- folder:amin/lists/~sircmpwn/srht-announce
-notmuch tag -inbox +lists/~sircmpwn/srht-dev -- folder:amin/lists/~sircmpwn/srht-dev
-notmuch tag -inbox +lists/~sircmpwn/srht-discuss -- folder:amin/lists/~sircmpwn/srht-discuss
-
notmuch tag -inbox +lists/hackernewsletter -- folder:amin/lists/hackernewsletter
notmuch tag -inbox +lists/haskell-weekly -- folder:amin/lists/haskell-weekly
-notmuch tag -inbox +pay -- folder:amin/pay
+notmuch tag -inbox +pay -- folder:amin/pay
+notmuch tag -inbox +banking -- folder:amin/banking
+notmuch tag -inbox +work -- folder:amin/work
#
#
-notmuch tag -inbox +uw/cs136 -- folder:uwaterloo/lists/cs136
-notmuch tag -inbox +uw/se463 -- folder:uwaterloo/lists/se463
+notmuch tag -inbox +uw/cs136 -- folder:uwaterloo/lists/cs136
+notmuch tag -inbox +uw/cs846 -- folder:uwaterloo/lists/cs846
+notmuch tag -inbox +uw/ece750 -- folder:uwaterloo/lists/ece750
+notmuch tag -inbox +uw/se212 -- folder:uwaterloo/lists/se212
+notmuch tag -inbox +uw/se463 -- folder:uwaterloo/lists/se463
+notmuch tag -inbox +lists/alloytools -- folder:uwaterloo/lists/alloytools
notmuch tag -inbox +lists/clvsingle -- folder:uwaterloo/lists/Clvsingle
notmuch tag -inbox +lists/gsa -- folder:uwaterloo/lists/GSA
notmuch tag -inbox +lists/math-grad -- folder:uwaterloo/lists/Math-grad
@@ -2224,22 +2311,28 @@ notmuch tag -inbox +lists/watform-students -- folder:uwaterloo/lists/Watform-stu
#
#
-notmuch tag -inbox +lists/emacs-devel -- folder:gnu/l/emacs-devel
-notmuch tag -inbox +lists/emacs-orgmode -- folder:gnu/l/emacs-orgmode
-notmuch tag -inbox +lists/emacsconf-discuss -- folder:gnu/l/emacsconf-discuss
-notmuch tag -inbox +lists/fencepost-users -- folder:gnu/l/fencepost-users
-notmuch tag -inbox +lists/guix-devel -- folder:gnu/l/guix-devel
-notmuch tag -inbox +lists/guile-devel -- folder:gnu/l/guile-devel
-notmuch tag -inbox +lists/help-gnu-emacs -- folder:gnu/l/help-gnu-emacs
-notmuch tag -inbox +lists/info-gnu-emacs -- folder:gnu/l/info-gnu-emacs
-notmuch tag -inbox +lists/www-commits -- folder:gnu/l/www-commits
-notmuch tag -inbox +lists/www-discuss -- folder:gnu/l/www-discuss
-notmuch tag -inbox +webmasters -- folder:gnu/webmasters
-
-notmuch tag -inbox +lists/deepspec -- folder:gnu/l/deepspec
-notmuch tag -inbox +lists/haskell-cafe -- folder:gnu/l/haskell-cafe
-notmuch tag -inbox +lists/haskell-art -- folder:gnu/l/haskell-art
-notmuch tag -inbox +lists/notmuch -- folder:gnu/l/notmuch
+notmuch tag -inbox +l/emacs-devel -- folder:gnu/l/emacs-devel
+notmuch tag -inbox +l/emacs-orgmode -- folder:gnu/l/emacs-orgmode
+notmuch tag -inbox +l/emacsconf-discuss -- folder:gnu/l/emacsconf-discuss
+notmuch tag -inbox +l/fencepost-users -- folder:gnu/l/fencepost-users
+notmuch tag -inbox +l/guix-devel -- folder:gnu/l/guix-devel
+notmuch tag -inbox +l/guile-devel -- folder:gnu/l/guile-devel
+notmuch tag -inbox +l/help-gnu-emacs -- folder:gnu/l/help-gnu-emacs
+notmuch tag -inbox +l/info-gnu-emacs -- folder:gnu/l/info-gnu-emacs
+notmuch tag -inbox +l/www-commits -- folder:gnu/l/www-commits
+notmuch tag -inbox +l/www-discuss -- folder:gnu/l/www-discuss
+notmuch tag -inbox +webmasters -- folder:gnu/webmasters
+
+notmuch tag -inbox +l/deepspec -- folder:gnu/l/deepspec
+notmuch tag -inbox +l/haskell-cafe -- folder:gnu/l/haskell-cafe
+notmuch tag -inbox +l/haskell-art -- folder:gnu/l/haskell-art
+notmuch tag -inbox +l/notmuch -- folder:gnu/l/notmuch
+
+notmuch tag -inbox +l/~aminb/test-priv -- folder:gnu/l/~aminb/test-priv
+notmuch tag -inbox +l/~sircmpwn/sr.ht-admins -- folder:gnu/l/~sircmpwn/sr.ht-admins
+notmuch tag -inbox +l/~sircmpwn/sr.ht-announce -- folder:gnu/l/~sircmpwn/sr.ht-announce
+notmuch tag -inbox +l/~sircmpwn/sr.ht-dev -- folder:gnu/l/~sircmpwn/sr.ht-dev
+notmuch tag -inbox +l/~sircmpwn/sr.ht-discuss -- folder:gnu/l/~sircmpwn/sr.ht-discuss
#
notmuch tag -inbox -unread +archive/notmuch -- path:archive/notmuch/**
@@ -2422,6 +2515,19 @@ if anyof (
fileinto :create "l/${listname}";
}
}
+
+if anyof (
+ header :contains "list-id" "<~aminb/test-priv@lists.sr.ht>",
+ header :contains "list-id" "<~sircmpwn/sr.ht-admins@lists.sr.ht>",
+ header :contains "list-id" "<~sircmpwn/sr.ht-announce@lists.sr.ht>",
+ header :contains "list-id" "<~sircmpwn/sr.ht-dev@lists.sr.ht>",
+ header :contains "list-id" "<~sircmpwn/sr.ht-discuss@lists.sr.ht>") {
+ if header :regex "list-id" "(~[a-z_0-9-]+)/([a-z_0-9.-]+)@" {
+ set :lower "username" "${1}";
+ set :lower "listname" "${2}";
+ fileinto :create "l/${username}/${listname}";
+ }
+}
#+end_src
** polybar
@@ -3712,193 +3818,510 @@ input "1739:31251:DLL07BE:01_06CB:7A13_Touchpad" {
click_method clickfinger
}
-input "1:1:AT_Translated_Set_2_keyboard" {
- repeat_delay 200
- repeat_rate 45
- xkb_layout us,ir
- xkb_options ctrl:nocaps,altwin:swap_alt_win,ctrl:rctrl_ralt,grp:shifts_toggle
-}
+input "1:1:AT_Translated_Set_2_keyboard" {
+ repeat_delay 200
+ repeat_rate 45
+ xkb_layout us,ir
+ xkb_options ctrl:nocaps,altwin:swap_alt_win,ctrl:rctrl_ralt,grp:shifts_toggle
+}
+
+
+### Key bindings
+#
+# Basics:
+#
+ # start a terminal
+ bindsym $mod+Return exec $term
+
+ # kill focused window
+ bindsym $mod+Shift+q kill
+
+ # start your launcher
+ bindsym $mod+d exec $menu
+
+ # password manager
+ bindsym $mod2+space exec rofi-pass
+
+ # Drag floating windows by holding down $mod and left mouse button.
+ # Resize them with right mouse button + $mod.
+ # Despite the name, also works for non-floating windows.
+ # Change normal to inverse to use left mouse button for resizing and right
+ # mouse button for dragging.
+ floating_modifier $mod normal
+
+ # reload the configuration file
+ bindsym $mod+Shift+c reload
+
+ # exit sway (logs you out of your wayland session)
+ bindsym $mod+Shift+e exit
+
+ bindsym $mod+apostrophe exec rofi-light # rofi-based brightness chooser
+ bindsym XF86MonBrightnessUp exec light -A 5 # increase screen brightness
+ bindsym XF86MonBrightnessDown exec light -U 5 # decrease screen brightness
+
+ bindsym XF86AudioRaiseVolume exec pamixer --allow-boost --increase 5
+ bindsym XF86AudioLowerVolume exec pamixer --allow-boost --decrease 5
+ bindsym XF86AudioMute exec pamixer --toggle-mute
+ bindsym XF86AudioMicMute exec pactl set-source-mute 1 toggle
+
+ # original sway workspace switch and window move
+ bindsym $mod+bracketleft workspace prev
+ bindsym $mod+bracketright workspace next
+ bindsym $mod+braceleft move container to workspace prev
+ bindsym $mod+braceright move container to workspace next
+
+ # bspwm-esque workspace switch and window move
+ bindsym $mod2+bracketleft exec sway-ws-util switch prev
+ bindsym $mod2+bracketright exec sway-ws-util switch next
+ bindsym $mod2+braceleft exec sway-ws-util move prev follow
+ bindsym $mod2+braceright exec sway-ws-util move next follow
+#
+# Moving around:
+#
+ # Move your focus around
+ bindsym $mod+$left focus left
+ bindsym $mod+$down focus down
+ bindsym $mod+$up focus up
+ bindsym $mod+$right focus right
+ # or use $mod+[up|down|left|right]
+ bindsym $mod+Left focus left
+ bindsym $mod+Down focus down
+ bindsym $mod+Up focus up
+ bindsym $mod+Right focus right
+
+ # _move_ the focused window with the same, but add Shift
+ bindsym $mod+Shift+$left move left
+ bindsym $mod+Shift+$down move down
+ bindsym $mod+Shift+$up move up
+ bindsym $mod+Shift+$right move right
+ # ditto, with arrow keys
+ bindsym $mod+Shift+Left move left
+ bindsym $mod+Shift+Down move down
+ bindsym $mod+Shift+Up move up
+ bindsym $mod+Shift+Right move right
+#
+# Workspaces:
+#
+ # switch to workspace
+ bindsym $mod+1 workspace 1
+ bindsym $mod+2 workspace 2
+ bindsym $mod+3 workspace 3
+ bindsym $mod+4 workspace 4
+ bindsym $mod+5 workspace 5
+ bindsym $mod+6 workspace 6
+ bindsym $mod+7 workspace 7
+ bindsym $mod+8 workspace 8
+ bindsym $mod+9 workspace 9
+ bindsym $mod+0 workspace 10
+ # move focused container to workspace
+ bindsym $mod+Shift+1 move container to workspace 1
+ bindsym $mod+Shift+2 move container to workspace 2
+ bindsym $mod+Shift+3 move container to workspace 3
+ bindsym $mod+Shift+4 move container to workspace 4
+ bindsym $mod+Shift+5 move container to workspace 5
+ bindsym $mod+Shift+6 move container to workspace 6
+ bindsym $mod+Shift+7 move container to workspace 7
+ bindsym $mod+Shift+8 move container to workspace 8
+ bindsym $mod+Shift+9 move container to workspace 9
+ bindsym $mod+Shift+0 move container to workspace 10
+ # Note: workspaces can have any name you want, not just numbers.
+ # We just use 1-10 as the default.
+#
+# Layout stuff:
+#
+ # You can "split" the current object of your focus with
+ # $mod+b or $mod+v, for horizontal and vertical splits
+ # respectively.
+ bindsym $mod+b splith
+ bindsym $mod+v splitv
+
+ # Switch the current container between different layout styles
+ bindsym $mod+s layout stacking
+ bindsym $mod+w layout tabbed
+ bindsym $mod+e layout toggle split
+
+ # Make the current focus fullscreen
+ bindsym $mod+f fullscreen
+
+ # Toggle the current focus between tiling and floating mode
+ bindsym $mod+Shift+space floating toggle
+
+ # Swap focus between the tiling area and the floating area
+ bindsym $mod+space focus mode_toggle
+
+ # move focus to the parent container
+ bindsym $mod+a focus parent
+#
+# Scratchpad:
+#
+ # Sway has a "scratchpad", which is a bag of holding for windows.
+ # You can send windows there and get them back later.
+
+ # Move the currently focused window to the scratchpad
+ bindsym $mod+Shift+minus move scratchpad
+
+ # Show the next scratchpad window or hide the focused scratchpad window.
+ # If there are multiple scratchpad windows, this command cycles through them.
+ bindsym $mod+minus scratchpad show
+#
+# Resizing containers:
+#
+mode "resize" {
+ # left will shrink the containers width
+ # right will grow the containers width
+ # up will shrink the containers height
+ # down will grow the containers height
+ bindsym $left resize shrink width 10px
+ bindsym $down resize grow height 10px
+ bindsym $up resize shrink height 10px
+ bindsym $right resize grow width 10px
+
+ # ditto, with arrow keys
+ bindsym Left resize shrink width 10px
+ bindsym Down resize grow height 10px
+ bindsym Up resize shrink height 10px
+ bindsym Right resize grow width 10px
+
+ # return to default mode
+ bindsym Return mode "default"
+ bindsym Escape mode "default"
+}
+bindsym $mod+Shift+r mode "resize"
+
+#
+# Status Bar:
+#
+# Read `man 5 sway-bar` for more information about this section.
+bar {
+ position bottom
+ colors {
+ statusline #ffffff
+ background #323232
+ inactive_workspace #32323200 #32323200 #5c5c5c
+ }
+ status_command i3status
+}
+
+include /etc/sway/config.d/*
+#+end_src
+
+** TLP
+
+*** langa
+
+#+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "langa")) "/sudo::/etc/default/tlp")
+# ------------------------------------------------------------------------------
+# tlp - Parameters for power saving
+# See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
+
+# Hint: some features are disabled by default, remove the leading # to enable
+# them.
+
+# Set to 0 to disable, 1 to enable TLP.
+TLP_ENABLE=1
+
+# Operation mode when no power supply can be detected: AC, BAT.
+# Concerns some desktop and embedded hardware only.
+TLP_DEFAULT_MODE=AC
+
+# Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
+# Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
+TLP_PERSISTENT_DEFAULT=0
+
+# Seconds laptop mode has to wait after the disk goes idle before doing a sync.
+# Non-zero value enables, zero disables laptop mode.
+DISK_IDLE_SECS_ON_AC=0
+DISK_IDLE_SECS_ON_BAT=2
+
+# Dirty page values (timeouts in secs).
+MAX_LOST_WORK_SECS_ON_AC=15
+MAX_LOST_WORK_SECS_ON_BAT=60
+
+# Hint: CPU parameters below are disabled by default, remove the leading #
+# to enable them, otherwise kernel default values are used.
+
+# Select a CPU frequency scaling governor.
+# Intel Core i processor with intel_pstate driver:
+# powersave(*), performance.
+# Older hardware with acpi-cpufreq driver:
+# ondemand(*), powersave, performance, conservative, schedutil.
+# (*) is recommended.
+# Hint: use tlp-stat -p to show the active driver and available governors.
+# Important:
+# powersave for intel_pstate and ondemand for acpi-cpufreq are power
+# efficient for *almost all* workloads and therefore kernel and most
+# distributions have chosen them as defaults. If you still want to change,
+# you should know what you're doing! You *must* disable your distribution's
+# governor settings or conflicts will occur.
+#CPU_SCALING_GOVERNOR_ON_AC=powersave
+#CPU_SCALING_GOVERNOR_ON_BAT=powersave
+
+# Set the min/max frequency available for the scaling governor.
+# Possible values strongly depend on your CPU. For available frequencies see
+# the output of tlp-stat -p.
+#CPU_SCALING_MIN_FREQ_ON_AC=0
+#CPU_SCALING_MAX_FREQ_ON_AC=0
+#CPU_SCALING_MIN_FREQ_ON_BAT=0
+#CPU_SCALING_MAX_FREQ_ON_BAT=0
+
+# Set energy performance hints (HWP) for Intel P-state governor:
+# performance, balance_performance, default, balance_power, power
+# Values are given in order of increasing power saving.
+# Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
+CPU_HWP_ON_AC=balance_performance
+CPU_HWP_ON_BAT=balance_power
+
+# Set Intel P-state performance: 0..100 (%).
+# Limit the max/min P-state to control the power dissipation of the CPU.
+# Values are stated as a percentage of the available performance.
+# Requires an Intel Core i processor with intel_pstate driver.
+#CPU_MIN_PERF_ON_AC=0
+#CPU_MAX_PERF_ON_AC=100
+#CPU_MIN_PERF_ON_BAT=0
+#CPU_MAX_PERF_ON_BAT=30
+
+# Set the CPU "turbo boost" feature: 0=disable, 1=allow
+# Requires an Intel Core i processor.
+# Important:
+# - This may conflict with your distribution's governor settings
+# - A value of 1 does *not* activate boosting, it just allows it
+#CPU_BOOST_ON_AC=1
+#CPU_BOOST_ON_BAT=0
+
+# Minimize number of used CPU cores/hyper-threads under light load conditions:
+# 0=disable, 1=enable.
+SCHED_POWERSAVE_ON_AC=0
+SCHED_POWERSAVE_ON_BAT=1
+
+# Kernel NMI Watchdog:
+# 0=disable (default, saves power), 1=enable (for kernel debugging only).
+NMI_WATCHDOG=0
+
+# Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
+# Frequency voltage pairs are written to:
+# /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
+# CAUTION: only use this, if you thoroughly understand what you are doing!
+#PHC_CONTROLS="F:V F:V F:V F:V"
+
+# Set CPU performance versus energy savings policy:
+# performance, balance-performance, default, balance-power, power.
+# Values are given in order of increasing power saving.
+# Requires kernel module msr and x86_energy_perf_policy from linux-tools.
+ENERGY_PERF_POLICY_ON_AC=performance
+ENERGY_PERF_POLICY_ON_BAT=balance-power
+
+# Disk devices; separate multiple devices with spaces (default: sda).
+# Devices can be specified by disk ID also (lookup with: tlp diskid).
+DISK_DEVICES="sda sdb"
+
+# Disk advanced power management level: 1..254, 255 (max saving, min, off).
+# Levels 1..127 may spin down the disk; 255 allowable on most drives.
+# Separate values for multiple disks with spaces. Use the special value 'keep'
+# to keep the hardware default for the particular disk.
+DISK_APM_LEVEL_ON_AC="254 254"
+DISK_APM_LEVEL_ON_BAT="128 128"
+
+# Hard disk spin down timeout:
+# 0: spin down disabled
+# 1..240: timeouts from 5s to 20min (in units of 5s)
+# 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
+# See 'man hdparm' for details.
+# Separate values for multiple disks with spaces. Use the special value 'keep'
+# to keep the hardware default for the particular disk.
+#DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
+#DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
+
+# Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq).
+# Separate values for multiple disks with spaces. Use the special value 'keep'
+# to keep the kernel default scheduler for the particular disk.
+#DISK_IOSCHED="cfq cfq"
+
+# AHCI link power management (ALPM) for disk devices:
+# min_power, med_power_with_dipm(*), medium_power, max_performance.
+# (*) Kernel >= 4.15 required, then recommended.
+# Multiple values separated with spaces are tried sequentially until success.
+SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
+SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
+
+# Exclude host devices from AHCI link power management.
+# Separate multiple hosts with spaces.
+#SATA_LINKPWR_BLACKLIST="host1"
+
+# Runtime Power Management for AHCI host and disks devices:
+# on=disable, auto=enable.
+# EXPERIMENTAL ** WARNING: auto will most likely cause system lockups/data loss.
+#AHCI_RUNTIME_PM_ON_AC=on
+#AHCI_RUNTIME_PM_ON_BAT=on
+
+# Seconds of inactivity before disk is suspended.
+AHCI_RUNTIME_PM_TIMEOUT=15
+
+# PCI Express Active State Power Management (PCIe ASPM):
+# default, performance, powersave.
+PCIE_ASPM_ON_AC=performance
+PCIE_ASPM_ON_BAT=powersave
+
+# Radeon graphics clock speed (profile method): low, mid, high, auto, default;
+# auto = mid on BAT, high on AC; default = use hardware defaults.
+RADEON_POWER_PROFILE_ON_AC=high
+RADEON_POWER_PROFILE_ON_BAT=low
+
+# Radeon dynamic power management method (DPM): battery, performance.
+RADEON_DPM_STATE_ON_AC=performance
+RADEON_DPM_STATE_ON_BAT=battery
+
+# Radeon DPM performance level: auto, low, high; auto is recommended.
+RADEON_DPM_PERF_LEVEL_ON_AC=auto
+RADEON_DPM_PERF_LEVEL_ON_BAT=auto
+
+# WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
+WIFI_PWR_ON_AC=off
+WIFI_PWR_ON_BAT=on
+
+# Disable wake on LAN: Y/N.
+WOL_DISABLE=Y
+
+# Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
+# A value of 0 disables, >=1 enables power saving (recommended: 1).
+SOUND_POWER_SAVE_ON_AC=0
+SOUND_POWER_SAVE_ON_BAT=0
+
+# Disable controller too (HDA only): Y/N.
+SOUND_POWER_SAVE_CONTROLLER=N
+
+# Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
+# Drive can be powered on again by releasing (and reinserting) the eject lever
+# or by pressing the disc eject button on newer models.
+# Note: an UltraBay/MediaBay hard disk is never powered off.
+BAY_POWEROFF_ON_AC=0
+BAY_POWEROFF_ON_BAT=0
+# Optical drive device to power off (default sr0).
+BAY_DEVICE="sr0"
+
+# Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
+RUNTIME_PM_ON_AC=on
+RUNTIME_PM_ON_BAT=auto
+
+# Exclude PCI(e) device adresses the following list from Runtime PM
+# (separate with spaces). Use lspci to get the adresses (1st column).
+#RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
+
+# Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
+# Default when unconfigured is "amdgpu nouveau nvidia radeon" which
+# prevents accidential power-on of dGPU in hybrid graphics setups.
+# Use "" to disable the feature completely.
+# Separate multiple drivers with spaces.
+#RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon"
+
+# Set to 0 to disable, 1 to enable USB autosuspend feature.
+USB_AUTOSUSPEND=1
+# Exclude listed devices from USB autosuspend (separate with spaces).
+# Use lsusb to get the ids.
+# Note: input devices (usbhid) are excluded automatically
+#USB_BLACKLIST="1111:2222 3333:4444"
-### Key bindings
-#
-# Basics:
-#
- # start a terminal
- bindsym $mod+Return exec $term
+# Bluetooth devices are excluded from USB autosuspend:
+# 0=do not exclude, 1=exclude.
+USB_BLACKLIST_BTUSB=0
- # kill focused window
- bindsym $mod+Shift+q kill
+# Phone devices are excluded from USB autosuspend:
+# 0=do not exclude, 1=exclude (enable charging).
+USB_BLACKLIST_PHONE=0
- # start your launcher
- bindsym $mod+d exec $menu
+# Printers are excluded from USB autosuspend:
+# 0=do not exclude, 1=exclude.
+USB_BLACKLIST_PRINTER=1
- # Drag floating windows by holding down $mod and left mouse button.
- # Resize them with right mouse button + $mod.
- floating_modifier $mod
+# WWAN devices are excluded from USB autosuspend:
+# 0=do not exclude, 1=exclude.
+USB_BLACKLIST_WWAN=1
- # reload the configuration file
- bindsym $mod+Shift+c reload
+# Include listed devices into USB autosuspend even if already excluded
+# by the blacklists above (separate with spaces).
+# Use lsusb to get the ids.
+#USB_WHITELIST="1111:2222 3333:4444"
- # exit sway (logs you out of your wayland session)
- bindsym $mod+Shift+e exit
+# Set to 1 to disable autosuspend before shutdown, 0 to do nothing
+# (workaround for USB devices that cause shutdown problems).
+#USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
- bindsym $mod+apostrophe exec rofi-light # rofi-based brightness chooser
- bindsym XF86MonBrightnessUp exec light -A 5 # increase screen brightness
- bindsym XF86MonBrightnessDown exec light -U 5 # decrease screen brightness
+# Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
+# on system startup: 0=disable, 1=enable.
+# Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
+# are ignored when this is enabled!
+#RESTORE_DEVICE_STATE_ON_STARTUP=0
+RESTORE_DEVICE_STATE_ON_STARTUP=1
- bindsym XF86AudioRaiseVolume exec pamixer --allow-boost --increase 5
- bindsym XF86AudioLowerVolume exec pamixer --allow-boost --decrease 5
- bindsym XF86AudioMute exec pamixer --toggle-mute
- bindsym XF86AudioMicMute exec pactl set-source-mute 1 toggle
+# Radio devices to disable on startup: bluetooth, wifi, wwan.
+# Separate multiple devices with spaces.
+#DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
- # original sway workspace switch and window move
- bindsym $mod+bracketleft workspace prev
- bindsym $mod+bracketright workspace next
- bindsym $mod+braceleft move container to workspace prev
- bindsym $mod+braceright move container to workspace next
+# Radio devices to enable on startup: bluetooth, wifi, wwan.
+# Separate multiple devices with spaces.
+#DEVICES_TO_ENABLE_ON_STARTUP="wifi"
- # bspwm-esque workspace switch and window move
- bindsym $mod2+bracketleft exec sway-ws-util switch prev
- bindsym $mod2+bracketright exec sway-ws-util switch next
- bindsym $mod2+braceleft exec sway-ws-util move prev follow
- bindsym $mod2+braceright exec sway-ws-util move next follow
-#
-# Moving around:
-#
- # Move your focus around
- bindsym $mod+$left focus left
- bindsym $mod+$down focus down
- bindsym $mod+$up focus up
- bindsym $mod+$right focus right
- # or use $mod+[up|down|left|right]
- bindsym $mod+Left focus left
- bindsym $mod+Down focus down
- bindsym $mod+Up focus up
- bindsym $mod+Right focus right
+# Radio devices to disable on shutdown: bluetooth, wifi, wwan.
+# (workaround for devices that are blocking shutdown).
+#DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
- # _move_ the focused window with the same, but add Shift
- bindsym $mod+Shift+$left move left
- bindsym $mod+Shift+$down move down
- bindsym $mod+Shift+$up move up
- bindsym $mod+Shift+$right move right
- # ditto, with arrow keys
- bindsym $mod+Shift+Left move left
- bindsym $mod+Shift+Down move down
- bindsym $mod+Shift+Up move up
- bindsym $mod+Shift+Right move right
-#
-# Workspaces:
-#
- # switch to workspace
- bindsym $mod+1 workspace 1
- bindsym $mod+2 workspace 2
- bindsym $mod+3 workspace 3
- bindsym $mod+4 workspace 4
- bindsym $mod+5 workspace 5
- bindsym $mod+6 workspace 6
- bindsym $mod+7 workspace 7
- bindsym $mod+8 workspace 8
- bindsym $mod+9 workspace 9
- bindsym $mod+0 workspace 10
- # move focused container to workspace
- bindsym $mod+Shift+1 move container to workspace 1
- bindsym $mod+Shift+2 move container to workspace 2
- bindsym $mod+Shift+3 move container to workspace 3
- bindsym $mod+Shift+4 move container to workspace 4
- bindsym $mod+Shift+5 move container to workspace 5
- bindsym $mod+Shift+6 move container to workspace 6
- bindsym $mod+Shift+7 move container to workspace 7
- bindsym $mod+Shift+8 move container to workspace 8
- bindsym $mod+Shift+9 move container to workspace 9
- bindsym $mod+Shift+0 move container to workspace 10
- # Note: workspaces can have any name you want, not just numbers.
- # We just use 1-10 as the default.
-#
-# Layout stuff:
-#
- # You can "split" the current object of your focus with
- # $mod+b or $mod+v, for horizontal and vertical splits
- # respectively.
- bindsym $mod+b splith
- bindsym $mod+v splitv
+# Radio devices to enable on shutdown: bluetooth, wifi, wwan.
+# (to prevent other operating systems from missing radios).
+#DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
- # Switch the current container between different layout styles
- bindsym $mod+s layout stacking
- bindsym $mod+w layout tabbed
- bindsym $mod+e layout toggle split
+# Radio devices to enable on AC: bluetooth, wifi, wwan.
+#DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
- # Make the current focus fullscreen
- bindsym $mod+f fullscreen
+# Radio devices to disable on battery: bluetooth, wifi, wwan.
+#DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
- # Toggle the current focus between tiling and floating mode
- bindsym $mod+Shift+space floating toggle
+# Radio devices to disable on battery when not in use (not connected):
+# bluetooth, wifi, wwan.
+#DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
- # Swap focus between the tiling area and the floating area
- bindsym $mod+space focus mode_toggle
+# Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
+# required). Charging starts when the remaining capacity falls below the
+# START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
+# Main / Internal battery (values in %)
+#START_CHARGE_THRESH_BAT0=75
+#STOP_CHARGE_THRESH_BAT0=80
+# Ultrabay / Slice / Replaceable battery (values in %)
+#START_CHARGE_THRESH_BAT1=75
+#STOP_CHARGE_THRESH_BAT1=80
- # move focus to the parent container
- bindsym $mod+a focus parent
-#
-# Scratchpad:
-#
- # Sway has a "scratchpad", which is a bag of holding for windows.
- # You can send windows there and get them back later.
+# Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
+#RESTORE_THRESHOLDS_ON_BAT=1
- # Move the currently focused window to the scratchpad
- bindsym $mod+Shift+minus move scratchpad
+# ------------------------------------------------------------------------------
+# tlp-rdw - Parameters for the radio device wizard
+# Possible devices: bluetooth, wifi, wwan.
- # Show the next scratchpad window or hide the focused scratchpad window.
- # If there are multiple scratchpad windows, this command cycles through them.
- bindsym $mod+minus scratchpad show
-#
-# Resizing containers:
-#
-mode "resize" {
- # left will shrink the containers width
- # right will grow the containers width
- # up will shrink the containers height
- # down will grow the containers height
- bindsym $left resize shrink width 10px
- bindsym $down resize grow height 10px
- bindsym $up resize shrink height 10px
- bindsym $right resize grow width 10px
+# Hints:
+# - Parameters are disabled by default, remove the leading # to enable them
+# - Separate multiple radio devices with spaces
- # ditto, with arrow keys
- bindsym Left resize shrink width 10px
- bindsym Down resize grow height 10px
- bindsym Up resize shrink height 10px
- bindsym Right resize grow width 10px
+# Radio devices to disable on connect.
+#DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
+#DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
+#DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
- # return to default mode
- bindsym Return mode "default"
- bindsym Escape mode "default"
-}
-bindsym $mod+Shift+r mode "resize"
+# Radio devices to enable on disconnect.
+#DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
+#DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
+#DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
-#
-# Status Bar:
-#
-# Read `man 5 sway-bar` for more information about this section.
-bar {
- position bottom
- colors {
- statusline #ffffff
- background #323232
- inactive_workspace #32323200 #32323200 #5c5c5c
- }
- status_command i3gs ~/.config/i3gs/config
-}
+# Radio devices to enable/disable when docked.
+#DEVICES_TO_ENABLE_ON_DOCK=""
+#DEVICES_TO_DISABLE_ON_DOCK=""
-include /etc/sway/config.d/*
+# Radio devices to enable/disable when undocked.
+#DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
+#DEVICES_TO_DISABLE_ON_UNDOCK=""
#+end_src
-** TLP
-
-*** TODO enigma
-*** plasma
+*** pary
-#+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "plasma")) "/sudo::/etc/default/tlp")
+#+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "pary")) "/sudo::/etc/default/tlp")
# ------------------------------------------------------------------------------
# tlp - Parameters for power saving
# See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
@@ -4709,7 +5132,7 @@ zhighlighters=(main brackets pattern)
#
# Load these ssh identities with the ssh module
-zssh_ids=(id_rsa plasma_id_rsa id_ed25519 id_rsa_aur)
+zssh_ids=(id_ed25519_amin)
#
@@ -4822,7 +5245,7 @@ ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
setopt globdots
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
-source ~/.zsh/zsh-autopair/autopair.zsh
+# source ~/.zsh/zsh-autopair/autopair.zsh
### fzf ###
@@ -4881,7 +5304,7 @@ exact brightness value.
:header-args+: :tangle ~/.local/bin/battery-percentage-time :shebang "#!/bin/sh"
:END:
-#+begin_src sh
+#+begin_src sh :tangle no
dbus_send() {
label=$1
dbus-send --print-reply=literal --system \
@@ -4901,7 +5324,7 @@ elif [ "$state" -eq 1 ]; then # Charging
secs=$(dbus_send 'TimeToFull')
fi
-printf '%s%%%%%2dh%02dm\n' "$perc" $((secs / 3600)) $((secs % 3600 / 60))
+printf '%s%%%%%2dh%02dm \n' "$perc" $((secs / 3600)) $((secs % 3600 / 60))
#+end_src
** rofi-light
@@ -4970,7 +5393,7 @@ fi
:header-args+: :tangle ~/.local/bin/toggle-layout :shebang "#!/bin/bash"
:END:
-#+begin_src bash
+#+begin_src bash :tangle no
lang="$(setxkbmap -print | grep xkb_symbols | cut -d'+' -f 2)"
if [ "$lang" = "us" ]; then
@@ -4986,7 +5409,7 @@ fi
:header-args+: :tangle ~/.local/bin/toggle-presentation-mode :shebang "#!/bin/bash"
:END:
-#+begin_src bash
+#+begin_src bash :tangle no
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T
#+end_src
@@ -5005,7 +5428,7 @@ a few things:
- properly rotates the stylus pen and touch screen pointers, and
- toggles between RGB and Vertical BGR sub-pixel order.
-#+begin_src bash
+#+begin_src bash :tangle no
case $(xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation) in
0) # Screen is not rotated, we should rotate it right (90°)
xrandr -o 3
@@ -5033,12 +5456,27 @@ esac
:header-args+: :tangle ~/.local/bin/unlock-def-gk.py :shebang "#!/usr/bin/env python2"
:END:
-#+begin_src python
+#+begin_src python :tangle no
import gnomekeyring as gk
# list_item_ids_sync('login')[0] == 1L
gk.unlock_sync('Default_keyring',gk.item_get_info_sync('login',1L).get_secret())
#+end_src
+** volume-info
+:PROPERTIES:
+:header-args+: :tangle ~/.local/bin/volume-info :shebang "#!/bin/sh"
+:END:
+
+#+begin_src sh :tangle no
+cur_vol=$(pamixer --get-volume)
+
+if [ $(pamixer --get-mute) = true ]; then
+ printf 'mt \n' "$cur_vol"
+else
+ printf '%02d \n' "$cur_vol"
+fi
+#+end_src
+
** wp
My little wallpaper changer script.