├── .gitignore ├── .travis.yml ├── README.md ├── desktop.png ├── files ├── bspwmrc ├── compton.conf ├── gtk.css ├── launcher │ ├── eclipse.desktop │ ├── electrum_main.desktop │ ├── electrum_regtest.desktop │ ├── electrum_testnet.desktop │ ├── telegram.desktop │ ├── termite.desktop │ ├── tor.desktop │ └── zotero.desktop ├── lock ├── ncmpcpp.config ├── polybar.config ├── rofi-playlist ├── sxhkdrc ├── termite.config └── tmux.conf ├── meta └── main.yml ├── tasks ├── desktop.yml ├── dev.yml ├── main.yml ├── media.yml ├── repos.yml ├── security.yml ├── terminal.yml └── text.yml └── test └── example.yml /.gitignore: -------------------------------------------------------------------------------- 1 | *.retry 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | sudo: required 3 | language: python 4 | services: 5 | - docker 6 | before_install: 7 | - sudo apt-get -qq update 8 | install: 9 | - pip install molecule docker ansible ansible-lint 10 | script: 11 | - ansible-lint -x 401,405 . 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Linux Desktop container role 2 | 3 | Creates a linux development environment with the tools that I use. It will look 4 | like it when you finish running it. 5 | 6 | ![desktop](desktop.png) 7 | 8 | # Install 9 | 10 | You can install directly with: 11 | 12 | `ansible-galaxy install opsxcq.linux_desktop` 13 | 14 | Or add to your `requirements.yml` 15 | 16 | # Variables 17 | 18 | - `username` - Username that will have the configuration files installed. 19 | - `gpg_hash` - The respective hash of your GPG key. 20 | - `git_name` - The name that you want to be displayed in your commits 21 | - `git_email` - Your email 22 | - `extra_git_repos` - A list of `{repo:... dest:...}` of additional git 23 | repositories to clone. 24 | 25 | # Notes 26 | 27 | - Save your wallpaper to `${HOME}/.wallpaper.jpg` 28 | - You need to recompile termite and put it in `${HOME}/.bin` 29 | - You need to recompile polybar and put it somewhere in the `$PATH`. 30 | - You must run as **root** 31 | 32 | ## Requirements 33 | 34 | This role is meant to be run in a **Debian Linux** system. 35 | 36 | ## Example Playbook 37 | 38 | 39 | ```yaml 40 | - name: Apply desktop configuration 41 | hosts: desktop 42 | vars: 43 | username: "opsxcq" 44 | git_name: "OPSXCQ" 45 | git_email: "opsxcq@strm.sh" 46 | gpg_hash: "66ED4A9A4D70D36FE48196419AD730FE9CDE5661" 47 | roles: 48 | - opsxcq.linux_desktop 49 | ``` 50 | 51 | # List of other things to install 52 | 53 | - [Firefox Extension to use pass](https://addons.mozilla.org/en-US/firefox/addon/passff/) 54 | -------------------------------------------------------------------------------- /desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opsxcq/ansible-role-linux-desktop/73362e64247369026bc209eb3e430dbe404d2573/desktop.png -------------------------------------------------------------------------------- /files/bspwmrc: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Reload sxhkd 4 | pkill sxhkd 5 | sxhkd & 6 | 7 | # Add steroids and cocaine to my keyboard 8 | xset r rate 300 50 9 | setxkbmap -option caps:swapescape 10 | 11 | # Reload polybar 12 | pkill polybar 13 | polybar -c ~/.config/polybar/config top & 14 | 15 | # Reload xsettingsd 16 | pkill xsettingsd 17 | xsettingsd & 18 | 19 | # set the wallpaper 20 | feh --bg-fill ~/.wallpaper.jpg 21 | 22 | # Reload compton 23 | pkill compton 24 | compton -b & 25 | 26 | # Set cursor theme 27 | xsetroot -cursor_name left_ptr 28 | 29 | # Init the color temperature management 30 | redshift -l 50.4501:30.5234 & 31 | #.bin/eclipse/eclipse/eclipse & 32 | emacsclient -c & 33 | 34 | # Let the important things running with some priority 35 | sudo renice -n -10 $(pgrep bspwm) 36 | sudo renice -n -10 $(pgrep sxhkd) 37 | sudo renice -n -10 $(pgrep compton) 38 | sudo renice -n -10 $(pgrep polybar) 39 | sudo renice -n -10 $(pgrep emacs) 40 | 41 | ################### 42 | ## configuration ## 43 | ################### 44 | 45 | ## workspace name 46 | bspc monitor -d '' '' '' '' '' '' '' '' '' 47 | #bspc monitor -d '' '' '' '' '' '' '' '' '' '' 48 | #bspc monitor -d 'I' 'II' 'III' 'IV' 'V' 'VI' 'VII' 'VIII' 49 | 50 | ## common bspwm configuration 51 | bspc config border_width 0 52 | bspc config window_gap 14 53 | bspc config split_ratio 0.5 54 | bspc config borderless_monocle true 55 | bspc config gapless_monocle true 56 | bspc config focus_follows_pointer true 57 | bspc config top_padding 44 58 | bspc config bottom_padding 0 59 | bspc config left_padding 0 60 | bspc config right_padding 0 61 | 62 | 63 | ## color settings 64 | bspc config focused_border_color "#8f8f8f" 65 | bspc config normal_border_color "#2f343f" 66 | bspc config border_width 0 67 | 68 | # Rules 69 | 70 | # Floaters 71 | bspc rule -a URxvt:float state=floating follow=on 72 | bspc rule -a Termite:float state=floating follow=on 73 | bspc rule -a feh state=pseudo_tiled follow=on 74 | 75 | # Configure the music desktop 76 | #bspc rule -a Vlc desktop='^8' follow=on focus=on 77 | MUSIC_DESKTOP=$(bspc query -D | tr '\n' ' ' | cut -d ' ' -f 8) 78 | 79 | bspc config -d $MUSIC_DESKTOP window_gap 80 80 | bspc config -d $MUSIC_DESKTOP top_padding 60 81 | bspc config -d $MUSIC_DESKTOP bottom_padding 40 82 | bspc config -d $MUSIC_DESKTOP left_padding 8 0 83 | bspc config -d $MUSIC_DESKTOP right_padding 0 84 | 85 | # Start the stream daemon 86 | mkdir -p /var/run/snapclient/ 87 | chown ${USER}:${USER} /var/run/snapclient 88 | ${HOME}/.bin/snapclient -h localhost -p 1704 --user ${USER} -d 89 | 90 | # If emacs isn't started, start it in server mode 91 | if ! pgrep 'emacs' > /dev/null 92 | then 93 | emacs --daemon 94 | fi 95 | -------------------------------------------------------------------------------- /files/compton.conf: -------------------------------------------------------------------------------- 1 | # Shadow 2 | shadow = true; 3 | no-dnd-shadow = true; 4 | no-dock-shadow = false; 5 | clear-shadow = true; 6 | shadow-radius = 7; 7 | shadow-offset-x = -7; 8 | shadow-offset-y = -7; 9 | shadow-opacity = 0.8; 10 | shadow-red = 0.0; 11 | shadow-green = 0.0; 12 | shadow-blue = 0.0; 13 | 14 | shadow-exclude = [ 15 | "class_g = 'Firefox' && argb", 16 | "class_i = 'Telegram' && argb" 17 | ]; 18 | 19 | # shadow-exclude = "n:e:Notification"; 20 | # shadow-exclude-reg = "x10+0+0"; 21 | # xinerama-shadow-crop = true; 22 | 23 | # Opacity 24 | menu-opacity = 0.9; 25 | #inactive-opacity = 0.8; 26 | #active-opacity = 0.8; 27 | #frame-opacity = 0.9; 28 | #inactive-opacity-override = false; 29 | #alpha-step = 0.06; 30 | # inactive-dim = 0.2; 31 | # inactive-dim-fixed = true; 32 | #blur-background = true; 33 | #blur-background-frame = true; 34 | #blur-kern = "3x3box" 35 | # blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" 36 | # blur-background-fixed = true; 37 | #blur-background-exclude = [ 38 | # "window_type = 'dock'", 39 | # "window_type = 'desktop'", 40 | # "_GTK_FRAME_EXTENTS@:c" 41 | #]; 42 | # opacity-rule = [ 43 | # "93:class_g = 'URxvt'", 44 | # "93:class_g= 'Zathura'", 45 | # "93:class_g= 'qutebrowser'", 46 | # "93:class_g= 'Firefox'", 47 | # "93:class_g= 'Pcmanfm'" 48 | # ]; 49 | 50 | # Fading 51 | fading = true; 52 | # fade-delta = 30; 53 | fade-in-step = 0.03; 54 | fade-out-step = 0.03; 55 | # no-fading-openclose = true; 56 | # no-fading-destroyed-argb = true; 57 | fade-exclude = [ ]; 58 | 59 | # Other 60 | #backend = "xrender" 61 | #mark-wmwin-focused = true; 62 | #mark-ovredir-focused = true; 63 | # use-ewmh-active-win = true; 64 | detect-rounded-corners = true; 65 | detect-client-opacity = true; 66 | refresh-rate = 0; 67 | vsync = "none"; 68 | dbe = false; 69 | paint-on-overlay = true; 70 | # sw-opti = true; 71 | # unredir-if-possible = true; 72 | # unredir-if-possible-delay = 5000; 73 | # unredir-if-possible-exclude = [ ]; 74 | #focus-exclude = [ "class_g = 'Cairo-clock'" ]; 75 | #detect-transient = true; 76 | #detect-client-leader = true; 77 | #invert-color-include = [ ]; 78 | # resize-damage = 1; 79 | 80 | # GLX backend 81 | # glx-no-stencil = true; 82 | #glx-copy-from-front = false; 83 | # glx-use-copysubbuffermesa = true; 84 | # glx-no-rebind-pixmap = true; 85 | #glx-swap-method = "undefined"; 86 | # glx-use-gpushader4 = true; 87 | # xrender-sync = true; 88 | # xrender-sync-fence = true; 89 | 90 | # Window type settings 91 | #wintypes: 92 | #{ 93 | # tooltip = { fade = true; shadow = true; opacity = 0.90; focus = true; }; 94 | #}; 95 | 96 | -------------------------------------------------------------------------------- /files/gtk.css: -------------------------------------------------------------------------------- 1 | VteTerminal, vte-terminal { 2 | padding: 20px; 3 | padding: 20px; 4 | } 5 | -------------------------------------------------------------------------------- /files/launcher/eclipse.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Eclipse 4 | Comment=Eclipse Integrated Development Environment 5 | Icon=~.bin/eclipse/icon.xpm 6 | Exec=~/.bin/eclipse/eclipse 7 | Terminal=false 8 | Categories=Development;IDE;Java; 9 | StartupWMClass=Eclipse 10 | -------------------------------------------------------------------------------- /files/launcher/electrum_main.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Electrum Main Network 4 | Comment=Electrum Bitcoin Wallet 5 | Exec=/usr/local/bin/electrum 6 | Terminal=false 7 | Categories=Finance 8 | StartupWMClass=Electrum 9 | -------------------------------------------------------------------------------- /files/launcher/electrum_regtest.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Electrum Regtest Network 4 | Comment=Electrum Bitcoin Wallet 5 | Exec=/usr/local/bin/electrum --regtest 6 | Terminal=false 7 | Categories=Finance 8 | StartupWMClass=Electrum 9 | -------------------------------------------------------------------------------- /files/launcher/electrum_testnet.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Electrum Testnet Network 4 | Comment=Electrum Bitcoin Wallet 5 | Exec=/usr/local/bin/electrum --testnet 6 | Terminal=false 7 | Categories=Finance 8 | StartupWMClass=Electrum 9 | -------------------------------------------------------------------------------- /files/launcher/telegram.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Telegram 4 | Comment=Telegram chat 5 | Exec=bash -c 'docker run --rm -d --cpuset-cpus 1 -e DISPLAY -v /etc/localtime:/etc/localtime:ro -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/.TelegramDesktop:/root/.local/share/TelegramDesktop/ -v $HOME/Downloads:/root/Downloads -v $HOME/Pictures:/root/Pictures strm/telegram' 6 | Terminal=false 7 | Categories=Chat 8 | StartupWMClass=Telegram 9 | -------------------------------------------------------------------------------- /files/launcher/termite.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Termite 3 | Comment=Use the command line 4 | Exec=bash -c '$HOME/.bin/termite' 5 | Icon=utilities-terminal 6 | Type=Application 7 | Categories=GTK;System;TerminalEmulator; 8 | StartupNotify=true 9 | -------------------------------------------------------------------------------- /files/launcher/tor.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ./Browser/execdesktop 2 | # 3 | # This file is a self-modifying .desktop file that can be run from the shell. 4 | # It preserves arguments and environment for the start-tor-browser script. 5 | # 6 | # Run './start-tor-browser.desktop --help' to display the full set of options. 7 | # 8 | # When invoked from the shell, this file must always be in a Tor Browser root 9 | # directory. When run from the file manager or desktop GUI, it is relocatable. 10 | # 11 | # After first invocation, it will update itself with the absolute path to the 12 | # current TBB location, to support relocation of this .desktop file for GUI 13 | # invocation. You can also add Tor Browser to your desktop's application menu 14 | # by running './start-tor-browser.desktop --register-app' 15 | # 16 | # If you use --register-app, and then relocate your TBB directory, Tor Browser 17 | # will no longer launch from your desktop's app launcher/dock. However, if you 18 | # re-run --register-app from inside that new directory, the script 19 | # will correct the absolute paths and re-register itself. 20 | # 21 | # This file will also still function if the path changes when TBB is used as a 22 | # portable app, so long as it is run directly from that new directory, either 23 | # via the shell or via the file manager. 24 | 25 | [Desktop Entry] 26 | Type=Application 27 | Name=Tor Browser 28 | GenericName=Web Browser 29 | Comment=Tor Browser is +1 for privacy and -1 for mass surveillance 30 | Categories=Network;WebBrowser;Security; 31 | Exec=sh -c '"$HOME/.bin/tor/Browser/start-tor-browser" --detach || ([ ! -x "$HOME/.bin/tor/Browser/start-tor-browser" ] && "$(dirname "$*")"/Browser/start-tor-browser --detach)' dummy %k 32 | X-TorBrowser-ExecShell=./Browser/start-tor-browser --detach 33 | Icon=~/.bin/tor/Browser/browser/chrome/icons/default/default128.png 34 | StartupWMClass=Tor Browser 35 | -------------------------------------------------------------------------------- /files/launcher/zotero.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Zotero 3 | Exec=~.bin/zotero/zotero-bin -app application.ini 4 | Icon=zotero.ico 5 | Type=Application 6 | Terminal=false 7 | Categories=Office; 8 | MimeType=text/plain 9 | -------------------------------------------------------------------------------- /files/lock: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Author: Dolores Portalatin 3 | # Dependencies: imagemagick, i3lock-color-git, scrot, wmctrl (optional) 4 | set -o errexit -o noclobber -o nounset 5 | 6 | # get path where the script is located to find the lock icon 7 | scriptpath=$(readlink -f -- "$0") 8 | scriptpath=${scriptpath%/*} 9 | 10 | hue=(-level "0%,100%,0.6") 11 | effect=(-filter Gaussian -resize 20% -define "filter:sigma=1.5" -resize 500.5%) 12 | # default system sans-serif font 13 | font=$(convert -list font | awk "{ a[NR] = \$2 } /family: $(fc-match sans -f "%{family}\n")/ { print a[NR-1]; exit }") 14 | image=$(mktemp --suffix=.png) 15 | shot=(import -window root) 16 | desktop="" 17 | i3lock_cmd=(i3lock -i "$image") 18 | shot_custom=false 19 | 20 | options="Options: 21 | -h, --help This help menu. 22 | 23 | -d, --desktop Attempt to minimize all windows before locking. 24 | 25 | -g, --greyscale Set background to greyscale instead of color. 26 | 27 | -p, --pixelate Pixelate the background instead of blur, runs faster. 28 | 29 | -f , --font Set a custom font. 30 | 31 | -t , --text Set a custom text prompt. 32 | 33 | -l, --listfonts Display a list of possible fonts for use with -f/--font. 34 | Note: this option will not lock the screen, it displays 35 | the list and exits immediately. 36 | 37 | -n, --nofork Do not fork i3lock after starting. 38 | 39 | -- Must be last option. Set command to use for taking a 40 | screenshot. Default is 'import -window root'. Using 'scrot' 41 | or 'maim' will increase script speed and allow setting 42 | custom flags like having a delay." 43 | 44 | # move pipefail down as for some reason "convert -list font" returns 1 45 | set -o pipefail 46 | trap 'rm -f "$image"' EXIT 47 | temp="$(getopt -o :hdnpglt:f: -l desktop,help,listfonts,nofork,pixelate,greyscale,text:,font: --name "$0" -- "$@")" 48 | eval set -- "$temp" 49 | 50 | # l10n support 51 | text="Type password to unlock" 52 | case "${LANG:-}" in 53 | de_* ) text="Bitte Passwort eingeben" ;; # Deutsch 54 | da_* ) text="Indtast adgangskode" ;; # Danish 55 | en_* ) text="Type password to unlock" ;; # English 56 | es_* ) text="Ingrese su contraseña" ;; # Española 57 | fr_* ) text="Entrez votre mot de passe" ;; # Français 58 | id_* ) text="Masukkan kata sandi Anda" ;; # Bahasa Indonesia 59 | it_* ) text="Inserisci la password" ;; # Italian 60 | lv_* ) text="Ievadi paroli" ;; # Latvian 61 | pl_* ) text="Podaj hasło" ;; # Polish 62 | pt_* ) text="Digite a senha para desbloquear" ;; # Português 63 | ru_* ) text="Введите пароль" ;; # Russian 64 | * ) text="Type password to unlock" ;; # Default to English 65 | esac 66 | 67 | while true ; do 68 | case "$1" in 69 | -h|--help) 70 | printf "Usage: %s [options]\n\n%s\n\n" "${0##*/}" "$options"; exit 1 ;; 71 | -d|--desktop) desktop=$(command -V wmctrl) ; shift ;; 72 | -g|--greyscale) hue=(-level "0%,100%,0.6" -set colorspace Gray -separate -average) ; shift ;; 73 | -p|--pixelate) effect=(-scale 10% -scale 1000%) ; shift ;; 74 | -f|--font) 75 | case "$2" in 76 | "") shift 2 ;; 77 | *) font=$2 ; shift 2 ;; 78 | esac ;; 79 | -t|--text) text=$2 ; shift 2 ;; 80 | -l|--listfonts) 81 | convert -list font | awk -F: '/Font: / { print $2 }' | sort -du | command -- ${PAGER:-less} 82 | exit 0 ;; 83 | -n|--nofork) i3lock_cmd+=(--nofork) ; shift ;; 84 | --) shift; shot_custom=true; break ;; 85 | *) echo "error" ; exit 1 ;; 86 | esac 87 | done 88 | 89 | if "$shot_custom" && [[ $# -gt 0 ]]; then 90 | shot=("$@"); 91 | fi 92 | 93 | command -- "${shot[@]}" "$image" 94 | 95 | value="60" #brightness value to compare to 96 | 97 | color=$(convert "$image" -gravity center -crop 100x100+0+0 +repage -colorspace hsb \ 98 | -resize 1x1 txt:- | awk -F '[%$]' 'NR==2{gsub(",",""); printf "%.0f\n", $(NF-1)}'); 99 | 100 | if [[ $color -gt $value ]]; then #white background image and black text 101 | bw="black" 102 | icon="$scriptpath/icons/lockdark.png" 103 | param=("--textcolor=00000000" "--insidecolor=0000001c" "--ringcolor=0000003e" \ 104 | "--linecolor=00000000" "--keyhlcolor=ffffff80" "--ringvercolor=ffffff00" \ 105 | "--separatorcolor=22222260" "--insidevercolor=ffffff1c" \ 106 | "--ringwrongcolor=ffffff55" "--insidewrongcolor=ffffff1c") 107 | else #black 108 | bw="white" 109 | icon="$scriptpath/icons/lock.png" 110 | param=("--textcolor=ffffff00" "--insidecolor=ffffff1c" "--ringcolor=ffffff3e" \ 111 | "--linecolor=ffffff00" "--keyhlcolor=00000080" "--ringvercolor=00000000" \ 112 | "--separatorcolor=22222260" "--insidevercolor=0000001c" \ 113 | "--ringwrongcolor=00000055" "--insidewrongcolor=0000001c") 114 | fi 115 | 116 | convert "$image" "${hue[@]}" "${effect[@]}" -font "$font" -pointsize 26 -fill "$bw" -gravity center \ 117 | -annotate +0+160 "$text" "$icon" -gravity center -composite "$image" 118 | 119 | # If invoked with -d/--desktop, we'll attempt to minimize all windows (ie. show 120 | # the desktop) before locking. 121 | ${desktop} ${desktop:+-k on} 122 | 123 | # try to use i3lock with prepared parameters 124 | if ! "${i3lock_cmd[@]}" "${param[@]}" >/dev/null 2>&1; then 125 | # We have failed, lets get back to stock one 126 | "${i3lock_cmd[@]}" 127 | fi 128 | 129 | # As above, if we were passed -d/--desktop, we'll attempt to restore all windows 130 | # after unlocking. 131 | ${desktop} ${desktop:+-k off} 132 | -------------------------------------------------------------------------------- /files/ncmpcpp.config: -------------------------------------------------------------------------------- 1 | visualizer_fifo_path = "/data/tmp/audio-output/visualizer" 2 | visualizer_output_name = "my_fifo" 3 | visualizer_sync_interval = "20" 4 | visualizer_in_stereo = "yes" 5 | visualizer_type = "spectrum" 6 | visualizer_look = "+|" 7 | # Playlist 8 | song_columns_list_format = "$L(9)[white]{l} (20)[red]{a} (30)[green]{b}$R(20)[cyan]{t}" 9 | now_playing_prefix = "$b" 10 | #now_playing_subfix = "/$b" 11 | playlist_display_mode = "classic" (classic/columns) 12 | autocenter_mode = "no" 13 | centered_cursor = "no" 14 | cyclic_scrolling = "yes" 15 | mouse_list_scroll_whole_page = "no" 16 | #song_list_format = "{$8$9}{[%l] >> }{%t }$R{%a - %b}" 17 | song_list_format = "{ $8%a $1» $2}{%t} $R$1%b" 18 | 19 | song_library_format = "{%n > }{%t}|{%f}" 20 | 21 | # Bars 22 | song_status_format = "{%a - }{%t - }{%b}" 23 | #progressbar_look = "|> " 24 | progressbar_look = "─╼ " 25 | titles_visibility = "no" 26 | header_visibility = "no" 27 | statusbar_visibility = "no" 28 | 29 | # Browser 30 | browser_playlist_prefix = "$2plist »$9 " 31 | browser_display_mode = "classic" (classic/columns) 32 | 33 | # Colors 34 | discard_colors_if_item_is_selected = "yes" 35 | header_window_color = "cyan" 36 | volume_color = "cyan" 37 | state_line_color = "cyan" 38 | state_flags_color = "green" 39 | main_window_color = "blue" 40 | color1 = "cyan" 41 | color2 = "yellow" 42 | main_window_highlight_color = "cyan" 43 | progressbar_color = "black" 44 | statusbar_color = "cyan" 45 | active_column_color = "red" 46 | visualizer_color = "cyan" 47 | 48 | # Others 49 | song_window_title_format = "MPD: {%a > }{%t}{ [%b{ Disc %d}]}|{%f}" 50 | search_engine_display_mode = "columns" (classic/columns) 51 | follow_now_playing_lyrics = "yes" 52 | mpd_connection_timeout = 30 53 | -------------------------------------------------------------------------------- /files/polybar.config: -------------------------------------------------------------------------------- 1 | [colors] 2 | background = #2f343f 3 | background-alt = #4f545f 4 | foreground = #d8dee8 5 | foreground-alt = #787e68 6 | accent = #81a1c1 7 | alert = #ebcb8b 8 | 9 | [bar/top] 10 | height = 32 11 | fixed-center = true 12 | background = ${colors.background} 13 | foreground = ${colors.foreground} 14 | padding-left = 2 15 | padding-right = 2 16 | padding-top = 2 17 | padding-bottom = 2 18 | margin-top = 8 19 | margin-bittom = 30 20 | module-margin-left = 1 21 | module-margin-right = 1 22 | width = 70% 23 | offset-x = 15% 24 | offset-y = 10 25 | ;font-0 = Hack:Regular:size=8;2;2 26 | font-0 = Tamsyn:size=13;2 27 | font-1 = FontAwesome:size=8;2 28 | ;tray-position = right 29 | ;tray-padding = 2 30 | ;tray-background = ${colors.background} 31 | wm-restack = bspwm 32 | 33 | modules-left = mpd 34 | modules-center = bspwm 35 | modules-right = temperature-cpu date 36 | 37 | ;radius = 5.0 38 | radius = 0.0 39 | 40 | [module/bspwm] 41 | 42 | type = internal/bspwm 43 | label-focused =  44 | label-focused-background= ${colors.background} 45 | label-focused-padding = 1 46 | label-occupied = %name% 47 | label-occupied-padding = 1 48 | label-occupied-foreground= ${colors.foreground} 49 | label-urgent = %name% 50 | label-urgent-background = ${colors.alert} 51 | label-urgent-padding = 1 52 | label-empty = %name% 53 | label-empty-foreground = ${colors.foreground-alt} 54 | label-empty-padding = 1 55 | 56 | 57 | [module/xwindow] 58 | 59 | type = internal/xwindow 60 | label = %title:0:100:...% 61 | 62 | 63 | [module/mpd] 64 | 65 | type = internal/mpd 66 | format-online = - 67 | ;format-online = 68 | format-online-overline = ${root.background} 69 | format-online-underline = ${root.background} 70 | format-offline = 71 | label-offline = 72 | 73 | icon-play =  74 | icon-pause =  75 | icon-stop =  76 | icon-prev =  77 | icon-next =  78 | icon-random =  79 | icon-repeat =  80 | 81 | toggle-on-foreground = 82 | toggle-off-foreground = #55 83 | 84 | label-time = %elapsed% / %total% 85 | 86 | bar-progress-width = 22 87 | bar-progress-format = %{+o +u}%fill%%{-o -u}%indicator%%{+o +u}%empty%%{-u -o} 88 | bar-progress-indicator = - 89 | bar-progress-indicator-foreground = #ff 90 | bar-progress-indicator-font = 3 91 | bar-progress-fill = - 92 | bar-progress-fill-foreground = #bb 93 | bar-progress-fill-font = 3 94 | bar-progress-empty = 95 | bar-progress-empty-font = 3 96 | bar-progress-empty-foreground = #44 97 | 98 | [module/date] 99 | 100 | type = internal/date 101 | interval = 30 102 | label = " %date% %time%" 103 | date-alt = %a %d 104 | time = %H:%M 105 | format-prefix-foreground = ${colors.accent} 106 | 107 | [module/temperature-cpu] 108 | type = internal/temperature 109 | thermal-zone = 0 110 | warn-temperature = 60 111 | hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input 112 | format-underline = ${colors.foreground} 113 | format-foreground = ${colors.foreground} 114 | format-prefix = " " 115 | format-prefix-foreground = ${colors.foreground} 116 | -------------------------------------------------------------------------------- /files/rofi-playlist: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z "$1" ] 4 | then 5 | mpc lsplaylists 6 | else 7 | mpc clear >/dev/null 8 | mpc load $1 >/dev/null 9 | mpc play >/dev/null 10 | fi 11 | -------------------------------------------------------------------------------- /files/sxhkdrc: -------------------------------------------------------------------------------- 1 | #### Applications 2 | 3 | ## launch terminal 4 | super + Return 5 | ${HOME}/.bin/termite 6 | ## launch alternative terminal 7 | super + shift + Return 8 | ${HOME}/.bin/termite --name=float 9 | 10 | ## launch Nautilus 11 | super + shift + f 12 | nautilus 13 | 14 | ## launch Firefox 15 | super + shift + w 16 | firefox 17 | 18 | ## launch Emacs 19 | super + shift + g 20 | emacsclient -c 21 | 22 | 23 | #### Meta 24 | 25 | super + shift + d 26 | rofi -modi run,drun,window,playlist:${HOME}/.bin/rofi-playlist -lines 20 -padding 18 -width 20 -location 0 -show window -sidebar-mode -columns 1 -font "Tamsyn 12" 27 | super + d 28 | rofi -modi run,drun,window,playlist:${HOME}/.bin/rofi-playlist -lines 20 -padding 18 -width 20 -location 0 -show drun -sidebar-mode -columns 1 -font "Tamsyn 12" 29 | super + m 30 | rofi -modi run,drun,window,playlist:${HOME}.bin/rofi-playlist -lines 20 -padding 18 -width 20 -location 0 -show playlist -sidebar-mode -columns 1 -font "Tamsyn 12" 31 | 32 | ## Reload 33 | #super + s 34 | # pkill -USR1 -x sxhkd 35 | 36 | ## Lockscreen 37 | super + q 38 | ~/.bin/lock 39 | 40 | 41 | #### Multimedia 42 | 43 | XF86Audio{Next,Prev,Play,Stop} 44 | mpc {next,prev,toggle,stop} 45 | 46 | XF86Audio{RaiseVolume,LowerVolume,Mute} 47 | amixer {sset Master '5%+',sset Master '5%-',set Master toggle} 48 | 49 | Print 50 | scrot 'scrot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f ~/Pictures/ ; feh ~/Pictures/$f' 51 | 52 | Print + shift 53 | scrot -s 'scrot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f ~/Pictures/ ; feh ~/Pictures/$f' 54 | 55 | 56 | #### Window manager 57 | 58 | ## quit bspwm normally 59 | super + control + Escape 60 | bspc quit 61 | 62 | ## close app 63 | super + Escape 64 | bspc node -c 65 | 66 | ## kill app 67 | super + shift + Escape 68 | bspc node -k 69 | 70 | 71 | #### Layout 72 | 73 | ## Use all area (not full screen) 74 | super + f 75 | bspc desktop -l next 76 | 77 | ## Split window V=vertical C=horizontal 78 | super + {c,v} 79 | bspc node -p {east,south} 80 | 81 | ## Aspect ratio 82 | super + ctrl + {1-9} 83 | bspc node -o 0.{1-9} 84 | 85 | ## Cancel (when creating new windows) 86 | super + r 87 | bspc node -p cancel 88 | 89 | ## Tiled and peusdo tiled 90 | super + p 91 | bspc node -t "~"{pseudo_tiled,tiled} 92 | 93 | ## Float and tilled 94 | super + space 95 | bspc node -t "~"{floating,tiled} 96 | 97 | ## Set tiled 98 | super + t 99 | bspc node -t tiled 100 | 101 | ## Move window 102 | super + {_,shift + }{h,j,k,l} 103 | bspc node -{f,s} {west,south,north,east} 104 | 105 | super + {_,shift + }{Left,Down,Up,Right} 106 | bspc node -{f,s} {west,south,north,east} 107 | 108 | 109 | #### Focus 110 | 111 | ## Next 112 | alt + Tab 113 | bspc node -f next.local 114 | 115 | ## Previous 116 | alt + shift + Tab 117 | bspc node -f prev.local 118 | 119 | ## Previous/next desktop 120 | ctrl + alt + {Left,Right} 121 | bspc desktop -f {prev.local,next.local} 122 | 123 | ## Send window to another desktop 124 | super + {_,shift + }{1-9} 125 | bspc {desktop -f,node -d} '^{1-9}' 126 | 127 | ## jump to another workspace 128 | super + {1-8} 129 | bspc desktop --focus^{1-8} 130 | 131 | ## expanding windows 132 | super + ctrl + {Left,Right,Up,Down} 133 | bspc node -z {left -5 0,right 5 0,top 0 -5,bottom 0 5} 134 | 135 | ## shrinking windows 136 | super + alt + {Left,Right,Up,Down} 137 | bspc node -z {left 5 0,right -5 0,top 0 5,bottom 0 -5} 138 | 139 | ## move floating windows 140 | ctrl + shift + {Left,Down,Up,Right} 141 | bspc node -v {-10 0,0 10,0 -10,10 0} 142 | -------------------------------------------------------------------------------- /files/termite.config: -------------------------------------------------------------------------------- 1 | 2 | [options] 3 | #https://github.com/thestinger/termite/blob/master/config 4 | allow_bold = true 5 | audible_bell = false 6 | browser = xdg-open 7 | clickable_url = true 8 | cursor_blink = system 9 | cursor_shape = block 10 | dynamic_title = true 11 | filter_unmatched_urls = true 12 | font = TamSyn 10 13 | geometry = 480x280 14 | icon_name = terminal 15 | modify_other_keys = false 16 | mouse_autohide = true 17 | scroll_on_output = false 18 | scroll_on_keystroke = true 19 | scrollback_lines = 15000 20 | size_hints = false 21 | search_wrap = true 22 | urgent_on_bell = true 23 | highlight = #30343e 24 | 25 | [colors] 26 | 27 | # special 28 | foreground = #c5c8c6 29 | foreground_bold = #c5c8c6 30 | cursor = #c5c8c6 31 | background = #1d1f21 32 | 33 | # black 34 | color0 = #1d1f21 35 | color8 = #969896 36 | 37 | # red 38 | color1 = #cc6666 39 | color9 = #cc6666 40 | 41 | # green 42 | color2 = #b5bd68 43 | color10 = #b5bd68 44 | 45 | # yellow 46 | color3 = #f0c674 47 | color11 = #f0c674 48 | 49 | # blue 50 | color4 = #81a2be 51 | color12 = #81a2be 52 | 53 | # magenta 54 | color5 = #b294bb 55 | color13 = #b294bb 56 | 57 | # cyan 58 | color6 = #8abeb7 59 | color14 = #8abeb7 60 | 61 | # white 62 | color7 = #c5c8c6 63 | color15 = #ffffff 64 | 65 | -------------------------------------------------------------------------------- /files/tmux.conf: -------------------------------------------------------------------------------- 1 | #unbind C-b 2 | #set -g prefix C-a 3 | 4 | # panes 5 | set -g pane-border-fg black 6 | set -g pane-active-border-fg brightred 7 | 8 | ## Status bar design 9 | # status line 10 | set -g status-justify left 11 | set -g status-bg default 12 | set -g status-fg colour12 13 | set -g status-interval 2 14 | 15 | # messaging 16 | set -g message-fg black 17 | set -g message-bg yellow 18 | set -g message-command-fg blue 19 | set -g message-command-bg black 20 | 21 | #window mode 22 | setw -g mode-bg colour6 23 | setw -g mode-fg colour0 24 | 25 | # window status 26 | setw -g window-status-format " #F#I:#W#F " 27 | setw -g window-status-current-format " #F#I:#W#F " 28 | setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W " 29 | setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W " 30 | setw -g window-status-current-bg colour0 31 | setw -g window-status-current-fg colour11 32 | setw -g window-status-current-attr dim 33 | setw -g window-status-bg green 34 | setw -g window-status-fg black 35 | setw -g window-status-attr reverse 36 | 37 | # Info on left (I don't have a session display for now 38 | set -g status-left '' 39 | 40 | # loud or quiet? 41 | set-option -g visual-activity off 42 | set-option -g visual-bell off 43 | set-option -g visual-silence off 44 | set-window-option -g monitor-activity off 45 | set-option -g bell-action none 46 | 47 | set -g default-terminal "screen-256color" 48 | 49 | # The modes 50 | setw -g clock-mode-colour colour135 51 | setw -g mode-attr bold 52 | setw -g mode-fg colour196 53 | setw -g mode-bg colour238 54 | 55 | # The panes 56 | set -g pane-border-bg colour235 57 | set -g pane-border-fg colour238 58 | set -g pane-active-border-bg colour236 59 | set -g pane-active-border-fg colour51 60 | 61 | # The statusbar 62 | set -g status-position bottom 63 | set -g status-bg colour234 64 | set -g status-fg colour137 65 | set -g status-attr dim 66 | set -g status-left '' 67 | set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S ' 68 | set -g status-right-length 50 69 | set -g status-left-length 20 70 | 71 | setw -g window-status-current-fg colour81 72 | setw -g window-status-current-bg colour238 73 | setw -g window-status-current-attr bold 74 | setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F ' 75 | 76 | setw -g window-status-fg colour138 77 | setw -g window-status-bg colour235 78 | setw -g window-status-attr none 79 | setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' 80 | 81 | setw -g window-status-bell-attr bold 82 | setw -g window-status-bell-fg colour255 83 | setw -g window-status-bell-bg colour1 84 | 85 | # The messages 86 | 87 | set -g message-attr bold 88 | set -g message-fg colour232 89 | set -g message-bg colour166 90 | 91 | ######## 92 | 93 | unbind r 94 | bind r source-file ~/.tmux.conf 95 | set -g automatic-rename off 96 | set -g allow-rename off 97 | set-window-option -g mode-key vi 98 | bind R set -g renumber-windows on\; new-window\; kill-window\; set -g renumber-windows off\; display-message "Windows reordered..." 99 | 100 | ## My panel resize features 101 | bind-key -r - resize-pane -L 1 102 | bind-key -r _ resize-pane -R 1 103 | bind-key -r = resize-pane -U 1 104 | bind-key -r + resize-pane -D 1 105 | 106 | 107 | -------------------------------------------------------------------------------- /meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: OPSXCQ 3 | role_name: linux_desktop 4 | description: Linux desktop configuration 5 | company: STRM 6 | license: GPLv3 7 | min_ansible_version: 2.4 8 | platforms: 9 | - name: Debian 10 | versions: 11 | - buster 12 | galaxy_tags: [linux, desktop] 13 | -------------------------------------------------------------------------------- /tasks/desktop.yml: -------------------------------------------------------------------------------- 1 | # Install the desktop environment 2 | 3 | - name: Linux Desktop | Interface | Install desktop tools 4 | become: yes 5 | apt: 6 | state: present 7 | name: 8 | - bspwm 9 | - sxhkd 10 | - feh 11 | - compton 12 | - rofi 13 | - i3lock 14 | - fonts-font-awesome 15 | - fontconfig 16 | - flatpak 17 | - redshift 18 | - ranger 19 | 20 | - name: Linux Desktop | Interface | Install Adapta GTK theme dependencies 21 | become: yes 22 | apt: 23 | state: present 24 | name: 25 | - lxappearance 26 | - fonts-roboto 27 | - fonts-noto-cjk 28 | - gtk2-engines-pixbuf 29 | 30 | - name: Linux Desktop | Interface | Create directories 31 | block: 32 | - name: Linux Desktop | Interface | Checking folders 33 | stat: 34 | path: "{{ item }}" 35 | register: folder_stats 36 | with_items: 37 | - "/home/{{ username }}/.local/share/application" 38 | - "/home/{{ username }}/.config/sxhkd" 39 | - "/home/{{ username }}/.config/bspwm" 40 | - "/home/{{ username }}/.config/polybar" 41 | - "/home/{{ username }}/.config/gtk-3.0" 42 | - "/home/{{ username }}/.bin" 43 | - name: Linux Desktop | Interface | Creating folders 44 | file: 45 | path: "{{ item.item }}" 46 | state: directory 47 | mode: 0700 48 | group: "{{ username }}" 49 | owner: "{{ username }}" 50 | when: not item.stat.exists 51 | with_items: 52 | - "{{ folder_stats.results }}" 53 | 54 | - name: Linux Desktop | Interface | Copy launcher files 55 | copy: 56 | src: "{{ item }}" 57 | dest: "/home/{{ username }}/.local/share/application" 58 | mode: 0700 59 | group: "{{ username }}" 60 | owner: "{{ username }}" 61 | with_fileglob: 62 | - files/launcher/* 63 | 64 | - name: Linux Desktop | Interface | Copy compton configuration 65 | copy: 66 | src: "compton.conf" 67 | dest: "/home/{{ username }}/.config/compton.conf" 68 | mode: 0700 69 | group: "{{ username }}" 70 | owner: "{{ username }}" 71 | 72 | - name: Linux Desktop | Interface | Copy compton configuration 73 | copy: 74 | src: "sxhkdrc" 75 | dest: "/home/{{ username }}/.config/sxhkd/sxhkdrc" 76 | mode: 0700 77 | group: "{{ username }}" 78 | owner: "{{ username }}" 79 | 80 | 81 | - name: Linux Desktop | Interface | Copy bspwm configuration 82 | copy: 83 | src: "bspwmrc" 84 | dest: "/home/{{ username }}/.config/bspwm/bspwmrc" 85 | mode: 0700 86 | group: "{{ username }}" 87 | owner: "{{ username }}" 88 | 89 | - name: Linux Desktop | Interface | Copy polybar configuration 90 | copy: 91 | src: "polybar.config" 92 | dest: "/home/{{ username }}/.config/polybar/config" 93 | mode: 0700 94 | group: "{{ username }}" 95 | owner: "{{ username }}" 96 | 97 | - name: Linux Desktop | Interface | Install lockscreen script 98 | copy: 99 | src: "lock" 100 | dest: "/home/{{ username }}/.bin/lock" 101 | mode: 0700 102 | group: "{{ username }}" 103 | owner: "{{ username }}" 104 | 105 | - name: Linux Desktop | Interface | Install GTK3 customizations 106 | copy: 107 | src: "gtk.css" 108 | dest: "/home/{{ username }}/.config/gtk-3.0/gtk.css" 109 | mode: 0700 110 | group: "{{ username }}" 111 | owner: "{{ username }}" 112 | 113 | - name: Linux Desktop | Interface | Install termine configuration 114 | copy: 115 | src: "termite.config" 116 | dest: "/home/{{ username }}/.config/termite/config" 117 | mode: 0700 118 | group: "{{ username }}" 119 | owner: "{{ username }}" 120 | -------------------------------------------------------------------------------- /tasks/dev.yml: -------------------------------------------------------------------------------- 1 | # Development environment setup 2 | 3 | - name: Linux Desktop | Dev | Install Yarn key 4 | become: yes 5 | apt_key: 6 | url: https://dl.yarnpkg.com/debian/pubkey.gpg 7 | state: present 8 | 9 | - name: Linux Desktop | Dev | Install Yarn repository 10 | become: yes 11 | file: 12 | path: /etc/apt/sources.list.d/yarn.list 13 | owner: root 14 | mode: 0644 15 | state: touch 16 | 17 | - name: Linux Desktop | Dev | Install Yarn repository 18 | become: yes 19 | lineinfile: 20 | dest: /etc/apt/sources.list.d/yarn.list 21 | regexp: "deb http://dl.yarnpkg.com/debian/ stable main" 22 | line: "deb http://dl.yarnpkg.com/debian/ stable main" 23 | state: present 24 | 25 | - name: Linux Desktop | Dev | Update apt cache 26 | become: yes 27 | apt: 28 | update_cache: yes 29 | 30 | - name: Linux Desktop | Dev | Install the desktop environment for programming 31 | become: yes 32 | apt: 33 | state: present 34 | name: 35 | - yarn 36 | - git 37 | - tig 38 | - openjdk-11-jdk 39 | - maven 40 | - python3 41 | - python3-pip 42 | - bpython3 43 | - dnsutils 44 | 45 | # To check the last version of kubectl check with 46 | # curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt 47 | - name: Linux Desktop | Dev | Install auxiliary tools 48 | become: yes 49 | get_url: 50 | url: "{{ item }}" 51 | dest: /usr/bin/ 52 | mode: '0755' 53 | with_items: 54 | - https://dl.minio.io/client/mc/release/linux-amd64/mc 55 | - https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/amd64/kubectl 56 | - https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 57 | 58 | - name: Linux Desktop | Dev | Install SpacEmacs 59 | git: 60 | repo: https://github.com/syl20bnr/spacemacs 61 | dest: ~/.emacs.d/ 62 | update: yes 63 | clone: yes 64 | accept_hostkey: yes 65 | 66 | - name: Linux Desktop | Dev | Configure git 67 | block: 68 | - name: Configuring a global git ignore 69 | git_config: 70 | name: core.excludefiles 71 | scope: global 72 | value: "~/.global-gitignore" 73 | - name: Configuring window memory 74 | git_config: 75 | name: pack.windowMemory 76 | scope: global 77 | value: "100m" 78 | - name: Configuring packet size limit 79 | git_config: 80 | name: pack.packetSizeLimit 81 | scope: global 82 | value: "512m" 83 | - name: Configuring threads 84 | git_config: 85 | name: pack.threads 86 | scope: global 87 | value: "1" 88 | - name: Configuring rebase autosquash 89 | git_config: 90 | name: rebase.autosquash 91 | scope: global 92 | value: "true" 93 | 94 | - name: Linux Desktop | Dev | Configure git to use GPG 95 | block: 96 | - name: Linux Desktop | Dev | Configure git to sign with GPG 97 | git_config: 98 | name: commit.gpgsign 99 | scope: global 100 | value: "true" 101 | - name: Linux Desktop | Dev | Configure git sign key 102 | git_config: 103 | name: user.signingkey 104 | scope: global 105 | value: "{{ gpg_hash }}" 106 | when: gpg is defined 107 | -------------------------------------------------------------------------------- /tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Linux desktop main task 3 | 4 | - include: terminal.yml 5 | - include: security.yml 6 | - include: desktop.yml 7 | - include: media.yml 8 | - include: text.yml 9 | - include: dev.yml 10 | - include: repos.yml 11 | -------------------------------------------------------------------------------- /tasks/media.yml: -------------------------------------------------------------------------------- 1 | # Media related configs 2 | 3 | - name: Linux Desktop | Media | Install media player features 4 | become: yes 5 | apt: 6 | state: present 7 | name: 8 | - mpv 9 | - mpc 10 | - moc 11 | - ncmpcpp 12 | 13 | - name: Linux Desktop | Media | Install ncmpcpp config 14 | file: 15 | path: "/home/{{ username }}/.ncmpcpp/" 16 | state: directory 17 | mode: 0700 18 | group: "{{ username }}" 19 | owner: "{{ username }}" 20 | 21 | - name: Linux Desktop | Media | Install ncmpcpp config 22 | copy: 23 | src: "ncmpcpp.config" 24 | dest: "/home/{{ username }}/.ncmpcpp/config" 25 | mode: 0700 26 | group: "{{ username }}" 27 | owner: "{{ username }}" 28 | 29 | - name: Linux Desktop | Media | Install rofi playlist script 30 | copy: 31 | src: "rofi-playlist" 32 | dest: "/home/{{ username }}/.bin/rofi-playlist" 33 | mode: 0700 34 | group: "{{ username }}" 35 | owner: "{{ username }}" 36 | -------------------------------------------------------------------------------- /tasks/repos.yml: -------------------------------------------------------------------------------- 1 | # Extra git repos 2 | 3 | - name: Linux Desktop | Extra git repos 4 | git: 5 | repo: "{{ item.repo }}" 6 | dest: "{{ item.dest }}" 7 | update: yes 8 | clone: yes 9 | accept_hostkey: yes 10 | with_items: "{{ extra_git_repos }}" 11 | when: extra_git_repos is defined 12 | 13 | 14 | - name: Linux Desktop | Extra git repos permissions 15 | file: path="{{ item.dest }}" owner="{{ username }}" group="{{ username }}" mode=0700 state=directory recurse=yes 16 | with_items: "{{ extra_git_repos }}" 17 | when: extra_git_repos is defined 18 | -------------------------------------------------------------------------------- /tasks/security.yml: -------------------------------------------------------------------------------- 1 | # Security tools 2 | 3 | - name: Linux Desktop | Install security tools 4 | become: yes 5 | apt: 6 | state: present 7 | name: 8 | - pass 9 | - gnupg 10 | - nmap 11 | - tor 12 | - proxychains 13 | - mtr 14 | - hydra 15 | -------------------------------------------------------------------------------- /tasks/terminal.yml: -------------------------------------------------------------------------------- 1 | # Terminal tools 2 | 3 | - name: Linux Desktop | Terminal | Install tools 4 | become: yes 5 | apt: 6 | state: present 7 | name: 8 | - tmux 9 | - htop 10 | - iotop 11 | - slurm 12 | - w3m 13 | - w3m-img 14 | - jq 15 | - csvtool 16 | - transmission-remote-cli 17 | - unrar-free 18 | - unzip 19 | - curl 20 | - wget 21 | 22 | 23 | - name: Linux Desktop | Terminal | Copy tmux configuration 24 | copy: 25 | src: "tmux.conf" 26 | dest: "/home/{{ username }}/.tmux.conf" 27 | mode: 0700 28 | group: "{{ username }}" 29 | owner: "{{ username }}" 30 | -------------------------------------------------------------------------------- /tasks/text.yml: -------------------------------------------------------------------------------- 1 | # Text processing tools 2 | 3 | - name: Linux Desktop | Install text processing tools 4 | become: yes 5 | apt: 6 | state: present 7 | name: 8 | - vim 9 | - emacs 10 | #- aspell-pt-br 11 | #- texlive-lang-portuguese 12 | - texlive-fonts-extra 13 | - texlive-latex-extra 14 | - texlive-math-extra 15 | - latex-xcolor 16 | - texlive-xetex 17 | # Removed because the current version is crashing on Debian 9.6 18 | #- zotero-standalone 19 | - calibre 20 | - mupdf 21 | - zathura 22 | - dvipng 23 | -------------------------------------------------------------------------------- /test/example.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - hosts: all 4 | roles: 5 | - role: ../.. 6 | --------------------------------------------------------------------------------